Skip to content

Commit

Permalink
Merge pull request #81 from mmoreram/feature/php-cs-fixer
Browse files Browse the repository at this point in the history
Applied Fabpot php-cs-fixer to all code
  • Loading branch information
ddeboer committed Jun 16, 2014
2 parents 9693d74 + a05d345 commit e96f1d5
Show file tree
Hide file tree
Showing 26 changed files with 19 additions and 37 deletions.
4 changes: 2 additions & 2 deletions CacheManager.php
Expand Up @@ -87,8 +87,8 @@ public function invalidateRoute($name, array $parameters = array())
/**
* Refresh a route
*
* @param string $route Route name
* @param array $parameters Route parameters (optional)
* @param string $route Route name
* @param array $parameters Route parameters (optional)
*
* @return $this
*/
Expand Down
3 changes: 0 additions & 3 deletions Command/BaseInvalidateCommand.php
Expand Up @@ -12,9 +12,6 @@
namespace FOS\HttpCacheBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;

use FOS\HttpCacheBundle\CacheManager;

Expand Down
1 change: 0 additions & 1 deletion Command/InvalidatePathCommand.php
Expand Up @@ -11,7 +11,6 @@

namespace FOS\HttpCacheBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
Expand Down
1 change: 0 additions & 1 deletion Command/InvalidateRegexCommand.php
Expand Up @@ -11,7 +11,6 @@

namespace FOS\HttpCacheBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
Expand Down
1 change: 0 additions & 1 deletion Command/InvalidateTagCommand.php
Expand Up @@ -11,7 +11,6 @@

namespace FOS\HttpCacheBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
Expand Down
1 change: 0 additions & 1 deletion Command/RefreshPathCommand.php
Expand Up @@ -11,7 +11,6 @@

namespace FOS\HttpCacheBundle\Command;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputArgument;
Expand Down
2 changes: 1 addition & 1 deletion Configuration/InvalidatePath.php
Expand Up @@ -59,4 +59,4 @@ public function allowArray()
{
return true;
}
}
}
2 changes: 1 addition & 1 deletion Configuration/InvalidateRoute.php
Expand Up @@ -80,4 +80,4 @@ public function allowArray()
{
return true;
}
}
}
2 changes: 1 addition & 1 deletion Configuration/Tag.php
Expand Up @@ -74,4 +74,4 @@ public function allowArray()
{
return true;
}
}
}
8 changes: 4 additions & 4 deletions DependencyInjection/Configuration.php
Expand Up @@ -168,13 +168,13 @@ private function addMatchSection(NodeBuilder $rules)
->info('Request host name.')
->end()
->arrayNode('methods')
->beforeNormalization()->ifString()->then(function($v) { return preg_split('/\s*,\s*/', $v); })->end()
->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end()
->useAttributeAsKey('name')
->prototype('scalar')->end()
->info('Request HTTP methods.')
->end()
->arrayNode('ips')
->beforeNormalization()->ifString()->then(function($v) { return preg_split('/\s*,\s*/', $v); })->end()
->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end()
->useAttributeAsKey('name')
->prototype('scalar')->end()
->info('List of client IPs.')
Expand Down Expand Up @@ -220,7 +220,7 @@ private function addHeaderSection(NodeBuilder $rules)
->info('Specify an X-Reverse-Proxy-TTL header with a time in seconds for a caching proxy under your control.')
->end()
->arrayNode('vary')
->beforeNormalization()->ifString()->then(function($v) { return preg_split('/\s*,\s*/', $v); })->end()
->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end()
->prototype('scalar')->end()
->info('Define a list of additional headers on which the response varies.')
->end()
Expand All @@ -242,7 +242,7 @@ private function addProxyClientSection(ArrayNodeDefinition $rootNode)
->arrayNode('varnish')
->children()
->arrayNode('servers')
->beforeNormalization()->ifString()->then(function($v) { return preg_split('/\s*,\s*/', $v); })->end()
->beforeNormalization()->ifString()->then(function ($v) { return preg_split('/\s*,\s*/', $v); })->end()
->useAttributeAsKey('name')
->isRequired()
->requiresAtLeastOneElement()
Expand Down
2 changes: 1 addition & 1 deletion EventListener/AbstractRuleSubscriber.php
Expand Up @@ -27,7 +27,7 @@ class AbstractRuleSubscriber
* request and response are matched.
*
* @param RuleMatcherInterface $ruleMatcher The headers apply to responses matched by this matcher.
* @param array $settings An array of header configuration.
* @param array $settings An array of header configuration.
* @param int $priority Optional priority of this matcher. Higher priority is applied first.
*/
public function addRule(
Expand Down
4 changes: 2 additions & 2 deletions EventListener/FlashMessageSubscriber.php
Expand Up @@ -39,8 +39,8 @@ class FlashMessageSubscriber implements EventSubscriberInterface
/**
* Set a serializer instance
*
* @param Session $session A session instance
* @param array $options
* @param Session $session A session instance
* @param array $options
*/
public function __construct($session, array $options = array())
{
Expand Down
1 change: 0 additions & 1 deletion EventListener/TagSubscriber.php
Expand Up @@ -13,7 +13,6 @@

use FOS\HttpCacheBundle\CacheManager;
use FOS\HttpCacheBundle\Configuration\Tag;
use FOS\HttpCacheBundle\Http\RuleMatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
Expand Down
2 changes: 1 addition & 1 deletion Exception/InvalidTagException.php
Expand Up @@ -17,4 +17,4 @@ public function __construct($tag, $char)
{
parent:__construct(sprintf('Tag %s is invalid because it contains %s'));
}
}
}
2 changes: 1 addition & 1 deletion Invalidator/Invalidator.php
Expand Up @@ -69,4 +69,4 @@ public function addInvalidatedRoute($route, array $config = array())

return $this;
}
}
}
2 changes: 1 addition & 1 deletion Invalidator/InvalidatorCollection.php
Expand Up @@ -78,4 +78,4 @@ public function getInvalidatedRoutes($route)

return $routes;
}
}
}
2 changes: 1 addition & 1 deletion Invalidator/InvalidatorCollectionFactory.php
Expand Up @@ -33,4 +33,4 @@ public static function getInvalidatorCollection(array $configs)

return $collection;
}
}
}
2 changes: 1 addition & 1 deletion Invalidator/InvalidatorInterface.php
Expand Up @@ -54,4 +54,4 @@ public function addInvalidatedRoute($route, array $config);
* @return array
*/
public function getInvalidatedRoutes();
}
}
2 changes: 0 additions & 2 deletions Tests/Functional/Command/InvalidatePathCommandTest.php
Expand Up @@ -11,9 +11,7 @@

namespace FOS\HttpCacheBundle\Tests\Functional\Command;

use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Output\StreamOutput;

class InvalidatePathCommandTest extends CommandTestCase
{
Expand Down
2 changes: 0 additions & 2 deletions Tests/Functional/Command/InvalidateRegexCommandTest.php
Expand Up @@ -11,9 +11,7 @@

namespace FOS\HttpCacheBundle\Tests\Functional\Command;

use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Output\StreamOutput;

class InvalidateRegexCommandTest extends CommandTestCase
{
Expand Down
2 changes: 0 additions & 2 deletions Tests/Functional/Command/InvalidateTagCommandTest.php
Expand Up @@ -11,9 +11,7 @@

namespace FOS\HttpCacheBundle\Tests\Functional\Command;

use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Output\StreamOutput;

class InvalidateTagCommandTest extends CommandTestCase
{
Expand Down
2 changes: 0 additions & 2 deletions Tests/Functional/Command/RefreshPathCommandTest.php
Expand Up @@ -11,9 +11,7 @@

namespace FOS\HttpCacheBundle\Tests\Functional\Command;

use Symfony\Component\Console\Input\StringInput;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Output\StreamOutput;

class RefreshPathCommandTest extends CommandTestCase
{
Expand Down
Expand Up @@ -13,7 +13,6 @@

use FOS\HttpCacheBundle\DependencyInjection\FOSHttpCacheExtension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use \Mockery;
use Symfony\Component\DependencyInjection\DefinitionDecorator;

class FOSHttpCacheExtensionTest extends \PHPUnit_Framework_TestCase
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/EventListener/TagSubscriberTest.php
Expand Up @@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/

namespace FOS\HttpCacheBundle\Test\Unit\EventListener;
namespace FOS\HttpCacheBundle\Tests\Unit\EventListener;

use FOS\HttpCacheBundle\CacheManager;
use FOS\HttpCacheBundle\Configuration\Tag;
Expand Down
1 change: 0 additions & 1 deletion Tests/Unit/EventListener/UserContextSubscriberTest.php
Expand Up @@ -38,7 +38,6 @@ public function testOnKernelRequest()

$response = $event->getResponse();


$this->assertNotNull($response);
$this->assertInstanceOf('\Symfony\Component\HttpFoundation\Response', $response);
$this->assertEquals('hash', $response->headers->get('X-Hash'));
Expand Down
2 changes: 1 addition & 1 deletion Tests/Unit/UserContext/RequestMatcherTest.php
Expand Up @@ -48,4 +48,4 @@ public function testNoMatch()

$this->assertFalse($requestMatcher->matches($request));
}
}
}

0 comments on commit e96f1d5

Please sign in to comment.