Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

Commit

Permalink
cs cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kriswallsmith committed May 13, 2013
1 parent ecc00c6 commit 3d44c26
Show file tree
Hide file tree
Showing 22 changed files with 59 additions and 62 deletions.
33 changes: 11 additions & 22 deletions AsseticBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,7 @@

namespace Symfony\Bundle\AsseticBundle;

use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\TemplateResourcesPass;
use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\AssetFactoryPass;
use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\AssetManagerPass;
use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\CheckYuiFilterPass;
use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\FilterManagerPass;
use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\CheckCssEmbedFilterPass;
use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\CheckClosureFilterPass;
use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\TemplatingPass;
use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\SprocketsFilterPass;
use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\RouterResourcePass;
use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\Bundle;

Expand All @@ -33,17 +24,15 @@ class AsseticBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
parent::build($container);

$container->addCompilerPass(new TemplateResourcesPass());
$container->addCompilerPass(new CheckClosureFilterPass());
$container->addCompilerPass(new CheckCssEmbedFilterPass());
$container->addCompilerPass(new CheckYuiFilterPass());
$container->addCompilerPass(new SprocketsFilterPass());
$container->addCompilerPass(new TemplatingPass());
$container->addCompilerPass(new AssetFactoryPass());
$container->addCompilerPass(new AssetManagerPass());
$container->addCompilerPass(new FilterManagerPass());
$container->addCompilerPass(new RouterResourcePass());
$container->addCompilerPass(new Compiler\TemplateResourcesPass());
$container->addCompilerPass(new Compiler\CheckClosureFilterPass());
$container->addCompilerPass(new Compiler\CheckCssEmbedFilterPass());
$container->addCompilerPass(new Compiler\CheckYuiFilterPass());
$container->addCompilerPass(new Compiler\SprocketsFilterPass());
$container->addCompilerPass(new Compiler\TemplatingPass());
$container->addCompilerPass(new Compiler\AssetFactoryPass());
$container->addCompilerPass(new Compiler\AssetManagerPass());
$container->addCompilerPass(new Compiler\FilterManagerPass());
$container->addCompilerPass(new Compiler\RouterResourcePass());
}
}
2 changes: 1 addition & 1 deletion CacheWarmer/AssetManagerCacheWarmer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Symfony\Bundle\AsseticBundle\CacheWarmer;

use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface;

/**
* The AssetManagerCacheWarmer warms up the formula loader.
Expand Down
8 changes: 3 additions & 5 deletions Command/DumpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@

namespace Symfony\Bundle\AsseticBundle\Command;

use Assetic\Util\PathUtils;

use Assetic\AssetWriter;
use Assetic\Asset\AssetInterface;
use Assetic\AssetWriter;
use Assetic\Util\PathUtils;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
Expand Down Expand Up @@ -46,8 +45,6 @@ protected function configure()

protected function initialize(InputInterface $input, OutputInterface $output)
{
parent::initialize($input, $output);

$this->basePath = $input->getArgument('write_to') ?: $this->getContainer()->getParameter('assetic.write_to');
$this->verbose = $input->getOption('verbose');
$this->am = $this->getContainer()->get('assetic.asset_manager');
Expand Down Expand Up @@ -120,6 +117,7 @@ private function watch(InputInterface $input, OutputInterface $output)
$error = $msg;
}
}

sleep($input->getOption('period'));
}
}
Expand Down
5 changes: 2 additions & 3 deletions Controller/AsseticController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@

namespace Symfony\Bundle\AsseticBundle\Controller;

use Assetic\ValueSupplierInterface;

use Assetic\Asset\AssetCache;
use Assetic\Asset\AssetInterface;
use Assetic\Factory\LazyAssetManager;
use Assetic\Cache\CacheInterface;
use Assetic\Factory\LazyAssetManager;
use Assetic\ValueSupplierInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
Expand Down
11 changes: 10 additions & 1 deletion DefaultValueSupplier.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the Symfony framework.
*
* (c) Fabien Potencier <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/

namespace Symfony\Bundle\AsseticBundle;

use Assetic\ValueSupplierInterface;
Expand Down Expand Up @@ -32,4 +41,4 @@ public function getValues()
'env' => $this->container->getParameter('kernel.environment'),
);
}
}
}
2 changes: 1 addition & 1 deletion DependencyInjection/AsseticExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Symfony\Bundle\AsseticBundle\DependencyInjection;

use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Definition\Processor;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\DefinitionDecorator;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Compiler/AssetFactoryPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

namespace Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

/**
* Adds services tagged as workers to the asset factory.
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Compiler/AssetManagerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

namespace Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

/**
* Adds services tagged as assets to the asset manager.
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/CheckClosureFilterPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
* Tags either the closure JAR or API filter for the filter manager.
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/CheckCssEmbedFilterPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
* Checks that the location of the CssEmbed JAR has been configured.
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/CheckYuiFilterPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
* Checks that the location of the YUI JAR has been configured.
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Compiler/FilterManagerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

namespace Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;

/**
* Adds services tagged as filters to the filter manager.
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/RouterResourcePass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Yaml\Yaml;

/**
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/SprocketsFilterPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
* Finishes configuration of the Sprockets filter.
Expand Down
4 changes: 2 additions & 2 deletions DependencyInjection/Compiler/TemplateResourcesPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

namespace Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Bundle\AsseticBundle\DependencyInjection\DirectoryResourceDefinition;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
* This pass adds directory resources to scan for assetic assets.
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Compiler/TemplatingPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

namespace Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler;

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

/**
* This pass removes services associated with unused templating engines.
Expand Down
2 changes: 1 addition & 1 deletion DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

namespace Symfony\Bundle\AsseticBundle\DependencyInjection;

use Symfony\Component\Process\ExecutableFinder;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\Process\ExecutableFinder;

/**
* This class contains the configuration information for the bundle
Expand Down
16 changes: 9 additions & 7 deletions Tests/Controller/AsseticControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@

class AsseticControllerTest extends \PHPUnit_Framework_TestCase
{
protected $request;
protected $headers;
protected $am;
protected $cache;

protected $controller;
private $request;
private $headers;
private $am;
private $cache;
private $controller;

protected function setUp()
{
Expand All @@ -29,14 +28,17 @@ protected function setUp()
}

$this->request = $this->getMock('Symfony\\Component\\HttpFoundation\\Request');
$this->request->expects($this->any())->method('isMethodSafe')->will($this->returnValue(true));
$this->headers = $this->getMock('Symfony\\Component\\HttpFoundation\\ParameterBag');
$this->request->headers = $this->headers;
$this->am = $this->getMockBuilder('Assetic\\Factory\\LazyAssetManager')
->disableOriginalConstructor()
->getMock();
$this->cache = $this->getMock('Assetic\\Cache\\CacheInterface');

$this->request->expects($this->any())
->method('isMethodSafe')
->will($this->returnValue(true));

$this->controller = new AsseticController($this->request, $this->am, $this->cache);
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/DependencyInjection/AsseticExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
namespace Symfony\Bundle\AsseticBundle\Tests\DependencyInjection;

use Symfony\Bundle\AsseticBundle\DependencyInjection\AsseticExtension;
use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\CheckYuiFilterPass;
use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\CheckClosureFilterPass;
use Symfony\Bundle\AsseticBundle\DependencyInjection\Compiler\CheckYuiFilterPass;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
Expand Down
6 changes: 3 additions & 3 deletions Tests/Factory/AssetFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

class AssetFactoryTest extends \PHPUnit_Framework_TestCase
{
protected $kernel;
protected $factory;
protected $container;
private $kernel;
private $factory;
private $container;

protected function setUp()
{
Expand Down
4 changes: 2 additions & 2 deletions Tests/FunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
namespace Symfony\Bundle\AsseticBundle\Tests;

use Symfony\Component\DomCrawler\Crawler;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpFoundation\Request;

/**
* @group functional
*/
class FunctionalTest extends \PHPUnit_Framework_TestCase
{
protected $cacheDir;
private $cacheDir;

protected function setUp()
{
Expand Down
2 changes: 1 addition & 1 deletion Twig/AsseticExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

namespace Symfony\Bundle\AsseticBundle\Twig;

use Assetic\ValueSupplierInterface;
use Assetic\Extension\Twig\AsseticExtension as BaseAsseticExtension;
use Assetic\Factory\AssetFactory;
use Assetic\ValueSupplierInterface;
use Symfony\Component\Templating\TemplateNameParserInterface;

/**
Expand Down

0 comments on commit 3d44c26

Please sign in to comment.