diff --git a/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php b/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php index 61d7bddaa8..2510f24920 100644 --- a/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/HttpKernelExtension.php @@ -36,7 +36,7 @@ class HttpKernelExtension extends \Twig_Extension public function getFunctions() { return array( - new \Twig_SimpleFunction('render',array($this, 'renderFragment'), array('is_safe' => array('html'))), + new \Twig_SimpleFunction('render', array($this, 'renderFragment'), array('is_safe' => array('html'))), new \Twig_SimpleFunction('render_*', array($this, 'renderFragmentStrategy'), array('is_safe' => array('html'))), new \Twig_SimpleFunction('controller', array($this, 'controller')), ); diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 28139a3755..0988c5fe1b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -226,7 +226,7 @@ class FrameworkExtension extends Extension 'memcached' => 'Symfony\Component\HttpKernel\Profiler\MemcachedProfilerStorage', 'redis' => 'Symfony\Component\HttpKernel\Profiler\RedisProfilerStorage', ); - list($class, ) = explode(':', $config['dsn'], 2); + list($class,) = explode(':', $config['dsn'], 2); if (!isset($supported[$class])) { throw new \LogicException(sprintf('Driver "%s" is not supported for the profiler.', $class)); } @@ -663,7 +663,7 @@ class FrameworkExtension extends Extension return $files; } - private function registerAnnotationsConfiguration(array $config, ContainerBuilder $container,$loader) + private function registerAnnotationsConfiguration(array $config, ContainerBuilder $container, $loader) { $loader->load('annotations.xml'); diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php index 54833e7717..84edf5db03 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php @@ -100,9 +100,9 @@ class TemplateManagerTest extends TestCase ->will($this->returnCallback(array($this, 'profileHasCollectorCallback'))); $result = $this->templateManager->getTemplates($profile); - $this->assertArrayHasKey('foo',$result); - $this->assertArrayNotHasKey('bar',$result); - $this->assertArrayNotHasKey('baz',$result); + $this->assertArrayHasKey('foo', $result); + $this->assertArrayNotHasKey('bar', $result); + $this->assertArrayNotHasKey('baz', $result); } public function profilerHasCallback($panel) diff --git a/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php b/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php index 3deef66c60..4da4404e24 100644 --- a/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php +++ b/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php @@ -202,9 +202,9 @@ class CookieJarTest extends \PHPUnit_Framework_TestCase $cookieJar->set($cookie1 = new Cookie('foo', 'bar', null, '/', '.example.com')); $cookieJar->set($cookie2 = new Cookie('foo1', 'bar', null, '/', 'test.example.com')); - $this->assertEquals($cookie1, $cookieJar->get('foo','/','foo.example.com')); - $this->assertEquals($cookie1, $cookieJar->get('foo','/','example.com')); - $this->assertEquals($cookie2, $cookieJar->get('foo1','/','test.example.com')); + $this->assertEquals($cookie1, $cookieJar->get('foo', '/', 'foo.example.com')); + $this->assertEquals($cookie1, $cookieJar->get('foo', '/', 'example.com')); + $this->assertEquals($cookie2, $cookieJar->get('foo1', '/', 'test.example.com')); } public function testCookieGetWithSubdirectory() @@ -213,11 +213,11 @@ class CookieJarTest extends \PHPUnit_Framework_TestCase $cookieJar->set($cookie1 = new Cookie('foo', 'bar', null, '/test', '.example.com')); $cookieJar->set($cookie2 = new Cookie('foo1', 'bar1', null, '/', '.example.com')); - $this->assertNull($cookieJar->get('foo','/','.example.com')); - $this->assertNull($cookieJar->get('foo','/bar','.example.com')); - $this->assertEquals($cookie1, $cookieJar->get('foo','/test','example.com')); - $this->assertEquals($cookie2, $cookieJar->get('foo1','/','example.com')); - $this->assertEquals($cookie2, $cookieJar->get('foo1','/bar','example.com')); + $this->assertNull($cookieJar->get('foo', '/', '.example.com')); + $this->assertNull($cookieJar->get('foo', '/bar', '.example.com')); + $this->assertEquals($cookie1, $cookieJar->get('foo', '/test', 'example.com')); + $this->assertEquals($cookie2, $cookieJar->get('foo1', '/', 'example.com')); + $this->assertEquals($cookie2, $cookieJar->get('foo1', '/bar', 'example.com')); } public function testCookieWithWildcardDomain() diff --git a/src/Symfony/Component/Config/Loader/FileLoader.php b/src/Symfony/Component/Config/Loader/FileLoader.php index b76390bcbb..8e8cb0be6c 100644 --- a/src/Symfony/Component/Config/Loader/FileLoader.php +++ b/src/Symfony/Component/Config/Loader/FileLoader.php @@ -91,7 +91,7 @@ abstract class FileLoader extends Loader } $resources = is_array($resource) ? $resource : array($resource); - for ($i = 0; $i < $resourcesCount = count($resources); $i++ ) { + for ($i = 0; $i < $resourcesCount = count($resources); $i++) { if (isset(self::$loading[$resources[$i]])) { if ($i == $resourcesCount-1) { throw new FileLoaderImportCircularReferenceException(array_keys(self::$loading)); diff --git a/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php index 9f233d3528..e3639365e7 100644 --- a/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php @@ -116,10 +116,10 @@ class ArrayNodeTest extends \PHPUnit_Framework_TestCase 'string_key' => 'just value', ), array( - 0 => array ( + 0 => array( 'name' => 'something', ), - 5 => array ( + 5 => array( 0 => 'this won\'t work too', 'new_key' => 'some other value', ), diff --git a/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php b/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php index f12a19c840..cde19e0c0a 100644 --- a/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php +++ b/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php @@ -33,16 +33,16 @@ class ExprBuilderTest extends \PHPUnit_Framework_TestCase $this->assertFinalizedValueIs('new_value', $test, array('key' => true)); $test = $this->getTestBuilder() - ->ifTrue( function ($v) { return true; }) + ->ifTrue(function ($v) { return true; }) ->then($this->returnClosure('new_value')) ->end(); $this->assertFinalizedValueIs('new_value', $test); $test = $this->getTestBuilder() - ->ifTrue( function ($v) { return false; }) + ->ifTrue(function ($v) { return false; }) ->then($this->returnClosure('new_value')) ->end(); - $this->assertFinalizedValueIs('value',$test); + $this->assertFinalizedValueIs('value', $test); } public function testIfStringExpression() diff --git a/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php b/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php index 770af38c93..b293f3aa58 100644 --- a/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php +++ b/src/Symfony/Component/Console/Descriptor/MarkdownDescriptor.php @@ -117,7 +117,7 @@ class MarkdownDescriptor extends Descriptor $blocks[] = implode("\n", array_map(function ($commandName) { return '* '.$commandName; - } , $namespace['commands'])); + }, $namespace['commands'])); } foreach ($description->getCommands() as $command) { diff --git a/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php b/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php index df95d8dfd5..6c234166ee 100644 --- a/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php +++ b/src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php @@ -126,9 +126,9 @@ class FlattenExceptionTest extends \PHPUnit_Framework_TestCase $flattened->setPrevious($flattened2); - $this->assertSame($flattened2,$flattened->getPrevious()); + $this->assertSame($flattened2, $flattened->getPrevious()); - $this->assertSame(array($flattened2),$flattened->getAllPrevious()); + $this->assertSame(array($flattened2), $flattened->getAllPrevious()); } /** @@ -162,7 +162,7 @@ class FlattenExceptionTest extends \PHPUnit_Framework_TestCase 'message' => 'test', 'class' => 'Exception', 'trace' => array(array( - 'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => '', 'file' => 'foo.php', 'line' => 123, + 'namespace' => '', 'short_class' => '', 'class' => '', 'type' => '', 'function' => '', 'file' => 'foo.php', 'line' => 123, 'args' => array(), )), ), @@ -214,12 +214,12 @@ class FlattenExceptionTest extends \PHPUnit_Framework_TestCase 'class' => 'Exception', 'trace' => array( array( - 'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => '', + 'namespace' => '', 'short_class' => '', 'class' => '', 'type' => '', 'function' => '', 'file' => 'foo.php', 'line' => 123, 'args' => array(), ), array( - 'namespace' => '', 'short_class' => '', 'class' => '','type' => '','function' => 'test', + 'namespace' => '', 'short_class' => '', 'class' => '', 'type' => '', 'function' => 'test', 'file' => __FILE__, 'line' => 123, 'args' => array( array( diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php index 98e0c871e0..fb2bb5fca3 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php @@ -147,9 +147,9 @@ class ResolveDefinitionTemplatesPassTest extends \PHPUnit_Framework_TestCase { $container = new ContainerBuilder(); - $container->register('parent','stdClass'); + $container->register('parent', 'stdClass'); - $container->setDefinition('child1',new DefinitionDecorator('parent')) + $container->setDefinition('child1', new DefinitionDecorator('parent')) ->setLazy(true) ; @@ -162,11 +162,11 @@ class ResolveDefinitionTemplatesPassTest extends \PHPUnit_Framework_TestCase { $container = new ContainerBuilder(); - $container->register('parent','stdClass') + $container->register('parent', 'stdClass') ->setLazy(true) ; - $container->setDefinition('child1',new DefinitionDecorator('parent')); + $container->setDefinition('child1', new DefinitionDecorator('parent')); $this->process($container); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/createphar.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/createphar.php index 1640020d93..cfe9425c50 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/createphar.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/createphar.php @@ -6,7 +6,7 @@ if (is_file($file)) { } $phar = new Phar($file, 0, 'ProjectWithXsdExtensionInPhar.phar'); -$phar->addFromString('ProjectWithXsdExtensionInPhar.php',<<addFromString('ProjectWithXsdExtensionInPhar.php', <<assertEquals('Bar', $this->createTestCrawler()->filterXPath('//a[5]')->html()); - $this->assertEquals('' - , trim($this->createTestCrawler()->filterXPath('//form[@id="FooFormId"]')->html())); + $this->assertEquals('', trim($this->createTestCrawler()->filterXPath('//form[@id="FooFormId"]')->html())); try { $this->createTestCrawler()->filterXPath('//ol')->html(); diff --git a/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php b/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php index 66abdc1b42..744bdae12a 100644 --- a/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php +++ b/src/Symfony/Component/Finder/Tests/Iterator/FilecontentFilterIteratorTest.php @@ -53,28 +53,28 @@ class FilecontentFilterIteratorTest extends IteratorTestCase 'name' => 'a.txt', 'contents' => 'Lorem ipsum...', 'type' => 'file', - 'mode' => 'r+',) + 'mode' => 'r+', ) ); $inner[] = new MockSplFileInfo(array( 'name' => 'b.yml', 'contents' => 'dolor sit...', 'type' => 'file', - 'mode' => 'r+',) + 'mode' => 'r+', ) ); $inner[] = new MockSplFileInfo(array( 'name' => 'some/other/dir/third.php', 'contents' => 'amet...', 'type' => 'file', - 'mode' => 'r+',) + 'mode' => 'r+', ) ); $inner[] = new MockSplFileInfo(array( 'name' => 'unreadable-file.txt', 'contents' => false, 'type' => 'file', - 'mode' => 'r+',) + 'mode' => 'r+', ) ); return array( diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php index 6cc3a836e5..6929fb8867 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/ArrayToPartsTransformer.php @@ -32,7 +32,7 @@ class ArrayToPartsTransformer implements DataTransformerInterface $array = array(); } - if (!is_array($array) ) { + if (!is_array($array)) { throw new TransformationFailedException('Expected an array.'); } @@ -51,7 +51,7 @@ class ArrayToPartsTransformer implements DataTransformerInterface public function reverseTransform($array) { - if (!is_array($array) ) { + if (!is_array($array)) { throw new TransformationFailedException('Expected an array.'); } diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php index 0e3934bc9d..fdaab2f2f8 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ValidatorTypeGuesserTest.php @@ -113,7 +113,7 @@ class ValidatorTypeGuesserTest extends \PHPUnit_Framework_TestCase public function maxLengthTypeProvider() { - return array ( + return array( array('double'), array('float'), array('numeric'), diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php index 73607bff96..75a8074105 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php +++ b/src/Symfony/Component/Form/Tests/Extension/Validator/ViolationMapper/ViolationMapperTest.php @@ -168,7 +168,7 @@ class ViolationMapperTest extends \PHPUnit_Framework_TestCase $child = $this->getForm('address', 'address', null, array(), false, false); // even though "street" is synchronized, it should not have any errors // due to its parent not being synchronized - $grandChild = $this->getForm('street' , 'street'); + $grandChild = $this->getForm('street', 'street'); $parent->add($child); $child->add($grandChild); diff --git a/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php b/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php index e6c4c35016..def1c7a378 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/CookieTest.php @@ -51,7 +51,7 @@ class CookieTest extends \PHPUnit_Framework_TestCase */ public function testInvalidExpiration() { - $cookie = new Cookie('MyCookie', 'foo','bar'); + $cookie = new Cookie('MyCookie', 'foo', 'bar'); } /** diff --git a/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php b/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php index b64d5f5121..1f89c391d5 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/File/FileTest.php @@ -116,7 +116,7 @@ class FileTest extends \PHPUnit_Framework_TestCase copy(__DIR__.'/Fixtures/test.gif', $path); $file = new File($path); - $movedFile = $file->move($targetDir,$filename); + $movedFile = $file->move($targetDir, $filename); $this->assertInstanceOf('Symfony\Component\HttpFoundation\File\File', $movedFile); $this->assertTrue(file_exists($targetPath)); diff --git a/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php index f1a0ef2c9b..3ea9a57d21 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/HeaderBagTest.php @@ -97,18 +97,18 @@ class HeaderBagTest extends \PHPUnit_Framework_TestCase public function testGet() { $bag = new HeaderBag(array('foo' => 'bar', 'fuzz' => 'bizz')); - $this->assertEquals( 'bar', $bag->get('foo'), '->get return current value'); - $this->assertEquals( 'bar', $bag->get('FoO'), '->get key in case insensitive'); - $this->assertEquals( array('bar'), $bag->get('foo', 'nope', false), '->get return the value as array'); + $this->assertEquals('bar', $bag->get('foo'), '->get return current value'); + $this->assertEquals('bar', $bag->get('FoO'), '->get key in case insensitive'); + $this->assertEquals(array('bar'), $bag->get('foo', 'nope', false), '->get return the value as array'); // defaults $this->assertNull($bag->get('none'), '->get unknown values returns null'); - $this->assertEquals( 'default', $bag->get('none', 'default'), '->get unknown values returns default'); - $this->assertEquals( array('default'), $bag->get('none', 'default', false), '->get unknown values returns default as array'); + $this->assertEquals('default', $bag->get('none', 'default'), '->get unknown values returns default'); + $this->assertEquals(array('default'), $bag->get('none', 'default', false), '->get unknown values returns default as array'); $bag->set('foo', 'bor', false); - $this->assertEquals( 'bar', $bag->get('foo'), '->get return first value'); - $this->assertEquals( array('bar', 'bor'), $bag->get('foo', 'nope', false), '->get return all values as array'); + $this->assertEquals('bar', $bag->get('foo'), '->get return first value'); + $this->assertEquals(array('bar', 'bor'), $bag->get('foo', 'nope', false), '->get return all values as array'); } public function testSetAssociativeArray() @@ -125,16 +125,16 @@ class HeaderBagTest extends \PHPUnit_Framework_TestCase public function testContains() { $bag = new HeaderBag(array('foo' => 'bar', 'fuzz' => 'bizz')); - $this->assertTrue( $bag->contains('foo', 'bar'), '->contains first value'); - $this->assertTrue( $bag->contains('fuzz', 'bizz'), '->contains second value'); - $this->assertFalse( $bag->contains('nope', 'nope'), '->contains unknown value'); - $this->assertFalse( $bag->contains('foo', 'nope'), '->contains unknown value'); + $this->assertTrue($bag->contains('foo', 'bar'), '->contains first value'); + $this->assertTrue($bag->contains('fuzz', 'bizz'), '->contains second value'); + $this->assertFalse($bag->contains('nope', 'nope'), '->contains unknown value'); + $this->assertFalse($bag->contains('foo', 'nope'), '->contains unknown value'); // Multiple values $bag->set('foo', 'bor', false); - $this->assertTrue( $bag->contains('foo', 'bar'), '->contains first value'); - $this->assertTrue( $bag->contains('foo', 'bor'), '->contains second value'); - $this->assertFalse( $bag->contains('foo', 'nope'), '->contains unknown value'); + $this->assertTrue($bag->contains('foo', 'bar'), '->contains first value'); + $this->assertTrue($bag->contains('foo', 'bor'), '->contains second value'); + $this->assertFalse($bag->contains('foo', 'nope'), '->contains unknown value'); } public function testCacheControlDirectiveAccessors() diff --git a/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php index 6bb5c108c1..e7743c47a6 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/ParameterBagTest.php @@ -212,12 +212,12 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertFalse($bag->filter('dec', '', false, FILTER_VALIDATE_INT, array( 'flags' => FILTER_FLAG_ALLOW_HEX, - 'options' => array('min_range' => 1, 'max_range' => 0xff),) + 'options' => array('min_range' => 1, 'max_range' => 0xff)) ), '->filter() gets a value of parameter as integer between boundaries'); $this->assertFalse($bag->filter('hex', '', false, FILTER_VALIDATE_INT, array( 'flags' => FILTER_FLAG_ALLOW_HEX, - 'options' => array('min_range' => 1, 'max_range' => 0xff),) + 'options' => array('min_range' => 1, 'max_range' => 0xff)) ), '->filter() gets a value of parameter as integer between boundaries'); $this->assertEquals(array('bang'), $bag->filter('array', '', false), '->filter() gets a value of parameter as an array'); diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index c145bf3e03..1c93bbfee9 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -217,7 +217,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase $this->assertEquals(80, $request->getPort()); $this->assertEquals('test.com', $request->getHttpHost()); $this->assertEquals('username', $request->getUser()); - $this->assertSame('',$request->getPassword()); + $this->assertSame('', $request->getPassword()); $this->assertFalse($request->isSecure()); $request = Request::create('http://test.com/?foo'); @@ -501,7 +501,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase $request = new Request(); - $request->initialize(array(), array(), array(), array(), array(),$server); + $request->initialize(array(), array(), array(), array(), array(), $server); $this->assertEquals('http://host:8080/index.php/some/path', $request->getUriForPath('/some/path'), '->getUriForPath() with non default port'); diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php index d6e27bb30d..5b9d32a34e 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php @@ -91,7 +91,7 @@ class FlashBagTest extends \PHPUnit_Framework_TestCase $this->bag->set('error', 'Bar'); $this->assertEquals(array( 'notice' => array('Foo'), - 'error' => array('Bar'),), $this->bag->all() + 'error' => array('Bar'), ), $this->bag->all() ); $this->assertEquals(array(), $this->bag->all()); diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php index 192c8083e0..1556155279 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/ConfigDataCollectorTest.php @@ -33,12 +33,12 @@ class ConfigDataCollectorTest extends \PHPUnit_Framework_TestCase $c->setKernel($kernel); $c->collect(new Request(), new Response()); - $this->assertSame('test',$c->getEnv()); + $this->assertSame('test', $c->getEnv()); $this->assertTrue($c->isDebug()); - $this->assertSame('config',$c->getName()); - $this->assertSame('testkernel',$c->getAppName()); - $this->assertSame(PHP_VERSION,$c->getPhpVersion()); - $this->assertSame(Kernel::VERSION,$c->getSymfonyVersion()); + $this->assertSame('config', $c->getName()); + $this->assertSame('testkernel', $c->getAppName()); + $this->assertSame(PHP_VERSION, $c->getPhpVersion()); + $this->assertSame(Kernel::VERSION, $c->getSymfonyVersion()); $this->assertNull($c->getToken()); // if else clause because we don't know it diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/ExceptionDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/ExceptionDataCollectorTest.php index c1e59f08a7..a86a7d69eb 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/ExceptionDataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/ExceptionDataCollectorTest.php @@ -27,20 +27,20 @@ class ExceptionDataCollectorTest extends \PHPUnit_Framework_TestCase public function testCollect() { - $e = new \Exception('foo',500); + $e = new \Exception('foo', 500); $c = new ExceptionDataCollector(); $flattened = FlattenException::create($e); $trace = $flattened->getTrace(); $this->assertFalse($c->hasException()); - $c->collect(new Request(), new Response(),$e); + $c->collect(new Request(), new Response(), $e); $this->assertTrue($c->hasException()); - $this->assertEquals($flattened,$c->getException()); - $this->assertSame('foo',$c->getMessage()); - $this->assertSame(500,$c->getCode()); - $this->assertSame('exception',$c->getName()); - $this->assertSame($trace,$c->getTrace()); + $this->assertEquals($flattened, $c->getException()); + $this->assertSame('foo', $c->getMessage()); + $this->assertSame(500, $c->getCode()); + $this->assertSame('exception', $c->getName()); + $this->assertSame($trace, $c->getTrace()); } } diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php index 5b0d7464ca..81b65fbb9f 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php @@ -38,21 +38,21 @@ class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase $c->collect($request, $response); - $this->assertSame('request',$c->getName()); - $this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag',$c->getRequestHeaders()); - $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag',$c->getRequestServer()); - $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag',$c->getRequestCookies()); - $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag',$c->getRequestAttributes()); - $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag',$c->getRequestRequest()); - $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag',$c->getRequestQuery()); - $this->assertEquals('html',$c->getFormat()); - $this->assertEquals(array(),$c->getSessionAttributes()); - $this->assertEquals('en',$c->getLocale()); + $this->assertSame('request', $c->getName()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag', $c->getRequestHeaders()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestServer()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestCookies()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestAttributes()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestRequest()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\ParameterBag', $c->getRequestQuery()); + $this->assertEquals('html', $c->getFormat()); + $this->assertEquals(array(), $c->getSessionAttributes()); + $this->assertEquals('en', $c->getLocale()); - $this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag',$c->getResponseHeaders()); - $this->assertEquals('OK',$c->getStatusText()); - $this->assertEquals(200,$c->getStatusCode()); - $this->assertEquals('application/json',$c->getContentType()); + $this->assertInstanceOf('Symfony\Component\HttpFoundation\HeaderBag', $c->getResponseHeaders()); + $this->assertEquals('OK', $c->getStatusText()); + $this->assertEquals(200, $c->getStatusCode()); + $this->assertEquals('application/json', $c->getContentType()); } /** @@ -161,9 +161,9 @@ class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase $response = new Response(); $response->setStatusCode(200); $response->headers->set('Content-Type', 'application/json'); - $response->headers->setCookie(new Cookie('foo','bar',1,'/foo','localhost',true,true)); - $response->headers->setCookie(new Cookie('bar','foo',new \DateTime('@946684800'))); - $response->headers->setCookie(new Cookie('bazz','foo','2000-12-12')); + $response->headers->setCookie(new Cookie('foo', 'bar', 1, '/foo', 'localhost', true, true)); + $response->headers->setCookie(new Cookie('bar', 'foo', new \DateTime('@946684800'))); + $response->headers->setCookie(new Cookie('bazz', 'foo', '2000-12-12')); return array( array($request, $response), diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php index 6a3e5653a7..b24b13d6ae 100644 --- a/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/HttpCache/StoreTest.php @@ -91,7 +91,7 @@ class StoreTest extends \PHPUnit_Framework_TestCase { $cacheKey = $this->storeSimpleEntry(); $entries = $this->getStoreMetadata($cacheKey); - list ($req, $res) = $entries[0]; + list($req, $res) = $entries[0]; $this->assertEquals('ena94a8fe5ccb19ba61c4c0873d391e987982fbbd3', $res['x-content-digest'][0]); } diff --git a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php index 31665205cb..b68e37e398 100644 --- a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php @@ -497,7 +497,7 @@ EOF; $this->assertEquals(array( __DIR__.'/Fixtures/Bundle2Bundle/foo.txt', - __DIR__.'/Fixtures/Bundle1Bundle/foo.txt',), + __DIR__.'/Fixtures/Bundle1Bundle/foo.txt', ), $kernel->locateResource('@Bundle1Bundle/foo.txt', null, false)); } @@ -560,7 +560,7 @@ EOF; $this->assertEquals(array( __DIR__.'/Fixtures/Resources/Bundle1Bundle/foo.txt', - __DIR__.'/Fixtures/Bundle1Bundle/Resources/foo.txt',), + __DIR__.'/Fixtures/Bundle1Bundle/Resources/foo.txt', ), $kernel->locateResource('@Bundle1Bundle/Resources/foo.txt', __DIR__.'/Fixtures/Resources', false) ); } diff --git a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php index c41f265b3b..3e71ed78a4 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractCurrencyDataProviderTest.php @@ -22,7 +22,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest { // The below arrays document the state of the ICU data bundled with this package. - protected static $currencies = array ( + protected static $currencies = array( 'ADP', 'AED', 'AFA', @@ -309,7 +309,7 @@ abstract class AbstractCurrencyDataProviderTest extends AbstractDataProviderTest 'ZWR', ); - protected static $alpha3ToNumeric = array ( + protected static $alpha3ToNumeric = array( 'ADP' => 20, 'AED' => 784, 'AFA' => 4, diff --git a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php index 9cb1283176..b092ff6982 100644 --- a/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php +++ b/src/Symfony/Component/Intl/Tests/Data/Provider/AbstractLanguageDataProviderTest.php @@ -633,7 +633,7 @@ abstract class AbstractLanguageDataProviderTest extends AbstractDataProviderTest 'zza', ); - protected static $alpha2ToAlpha3 = array ( + protected static $alpha2ToAlpha3 = array( 'aa' => 'aar', 'ab' => 'abk', 'ae' => 'ave', diff --git a/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php b/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php index 0a937d5e69..75d54eb234 100644 --- a/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php +++ b/src/Symfony/Component/Intl/Tests/Globals/AbstractIntlGlobalsTest.php @@ -20,7 +20,7 @@ abstract class AbstractIntlGlobalsTest extends \PHPUnit_Framework_TestCase { public function errorNameProvider() { - return array ( + return array( array(-129, '[BOGUS UErrorCode]'), array(0, 'U_ZERO_ERROR'), array(1, 'U_ILLEGAL_ARGUMENT_ERROR'), diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.php b/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.php index f1ecfe9418..6a21eff20e 100644 --- a/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.php +++ b/src/Symfony/Component/Routing/Tests/Fixtures/validpattern.php @@ -10,7 +10,7 @@ $collection->add('blog_show', new Route( array('compiler_class' => 'RouteCompiler'), '{locale}.example.com', array('https'), - array('GET','POST','put','OpTiOnS') + array('GET', 'POST', 'put', 'OpTiOnS') )); $collection->add('blog_show_legacy', new Route( '/blog/{slug}', diff --git a/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php index 162e4f5437..07efaf7778 100644 --- a/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php +++ b/src/Symfony/Component/Routing/Tests/Loader/AnnotationClassLoaderTest.php @@ -113,7 +113,7 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest $route = $routeCollection->get($routeDatas['name']); $this->assertSame($routeDatas['path'], $route->getPath(), '->load preserves path annotation'); - $this->assertSame($routeDatas['requirements'],$route->getRequirements(), '->load preserves requirements annotation'); + $this->assertSame($routeDatas['requirements'], $route->getRequirements(), '->load preserves requirements annotation'); $this->assertCount(0, array_intersect($route->getOptions(), $routeDatas['options']), '->load preserves options annotation'); $this->assertSame(array_replace($methodArgs, $routeDatas['defaults']), $route->getDefaults(), '->load preserves defaults annotation'); } diff --git a/src/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php b/src/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php index e8056e8c22..00d452aff7 100644 --- a/src/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php +++ b/src/Symfony/Component/Routing/Tests/Matcher/UrlMatcherTest.php @@ -244,12 +244,12 @@ class UrlMatcherTest extends \PHPUnit_Framework_TestCase // 'w' eagerly matches as much as possible and the other variables match the remaining chars. // This also shows that the variables w-z must all exclude the separating char (the dot '.' in this case) by default requirement. // Otherwise they would also consume '.xml' and _format would never match as it's an optional variable. - $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'Y', 'z' => 'Z','_format' => 'xml', '_route' => 'test'), $matcher->match('/wwwwwxYZ.xml')); + $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'Y', 'z' => 'Z', '_format' => 'xml', '_route' => 'test'), $matcher->match('/wwwwwxYZ.xml')); // As 'y' has custom requirement and can only be of value 'y|Y', it will leave 'ZZZ' to variable z. // So with carefully chosen requirements adjacent variables, can be useful. - $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'y', 'z' => 'ZZZ','_format' => 'html', '_route' => 'test'), $matcher->match('/wwwwwxyZZZ')); + $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'y', 'z' => 'ZZZ', '_format' => 'html', '_route' => 'test'), $matcher->match('/wwwwwxyZZZ')); // z and _format are optional. - $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'y', 'z' => 'default-z','_format' => 'html', '_route' => 'test'), $matcher->match('/wwwwwxy')); + $this->assertEquals(array('w' => 'wwwww', 'x' => 'x', 'y' => 'y', 'z' => 'default-z', '_format' => 'html', '_route' => 'test'), $matcher->match('/wwwwwxy')); $this->setExpectedException('Symfony\Component\Routing\Exception\ResourceNotFoundException'); $matcher->match('/wxy.html'); diff --git a/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php b/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php index 39d3efe601..b53dc751ac 100644 --- a/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php +++ b/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php @@ -104,7 +104,7 @@ class AclProvider implements AclProviderInterface $currentBatch = array(); $oidLookup = array(); - for ($i = 0,$c = count($oids); $i<$c; $i++) { + for ($i = 0, $c = count($oids); $i<$c; $i++) { $oid = $oids[$i]; $oidLookupKey = $oid->getIdentifier().$oid->getType(); $oidLookup[$oidLookupKey] = $oid; diff --git a/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php b/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php index 558691a063..e2ec89bc55 100644 --- a/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php +++ b/src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php @@ -787,7 +787,7 @@ QUERY; $classIds = new \SplObjectStorage(); $currentIds = array(); foreach ($changes[1] as $field => $new) { - for ($i = 0,$c = count($new); $i<$c; $i++) { + for ($i = 0, $c = count($new); $i<$c; $i++) { $ace = $new[$i]; if (null === $ace->getId()) { @@ -864,7 +864,7 @@ QUERY; $sids = new \SplObjectStorage(); $classIds = new \SplObjectStorage(); $currentIds = array(); - for ($i = 0,$c = count($new); $i<$c; $i++) { + for ($i = 0, $c = count($new); $i<$c; $i++) { $ace = $new[$i]; if (null === $ace->getId()) { @@ -907,7 +907,7 @@ QUERY; list($old, $new) = $changes; $currentIds = array(); - for ($i = 0,$c = count($new); $i<$c; $i++) { + for ($i = 0, $c = count($new); $i<$c; $i++) { $ace = $new[$i]; if (null !== $ace->getId()) { diff --git a/src/Symfony/Component/Security/Acl/Domain/Acl.php b/src/Symfony/Component/Security/Acl/Domain/Acl.php index a649d36074..8222df7376 100644 --- a/src/Symfony/Component/Security/Acl/Domain/Acl.php +++ b/src/Symfony/Component/Security/Acl/Domain/Acl.php @@ -414,7 +414,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged $this->$property = array_values($this->$property); $this->onPropertyChanged($property, $oldValue, $this->$property); - for ($i = $index,$c = count($this->$property); $i<$c; $i++) { + for ($i = $index, $c = count($this->$property); $i<$c; $i++) { $this->onEntryPropertyChanged($aces[$i], 'aceOrder', $i+1, $i); } } @@ -440,7 +440,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged $aces[$field] = array_values($aces[$field]); $this->onPropertyChanged($property, $oldValue, $this->$property); - for ($i = $index,$c = count($aces[$field]); $i<$c; $i++) { + for ($i = $index, $c = count($aces[$field]); $i<$c; $i++) { $this->onEntryPropertyChanged($aces[$field][$i], 'aceOrder', $i+1, $i); } } @@ -485,7 +485,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged array_slice($this->$property, $index) ); - for ($i = $index,$c = count($this->$property)-1; $i<$c; $i++) { + for ($i = $index, $c = count($this->$property)-1; $i<$c; $i++) { $this->onEntryPropertyChanged($aces[$i+1], 'aceOrder', $i, $i+1); } } @@ -543,7 +543,7 @@ class Acl implements AuditableAclInterface, NotifyPropertyChanged array_slice($aces[$field], $index) ); - for ($i = $index,$c = count($aces[$field])-1; $i<$c; $i++) { + for ($i = $index, $c = count($aces[$field])-1; $i<$c; $i++) { $this->onEntryPropertyChanged($aces[$field][$i+1], 'aceOrder', $i, $i+1); } } diff --git a/src/Symfony/Component/Security/Tests/Acl/Dbal/AclProviderBenchmarkTest.php b/src/Symfony/Component/Security/Tests/Acl/Dbal/AclProviderBenchmarkTest.php index e930b1977e..46f4356a28 100644 --- a/src/Symfony/Component/Security/Tests/Acl/Dbal/AclProviderBenchmarkTest.php +++ b/src/Symfony/Component/Security/Tests/Acl/Dbal/AclProviderBenchmarkTest.php @@ -111,7 +111,7 @@ class AclProviderBenchmarkTest extends \PHPUnit_Framework_TestCase protected function generateAclLevel($depth, $parentId, $ancestors) { $level = count($ancestors); - for ($i = 0,$t = rand(1, 10); $i<$t; $i++) { + for ($i = 0, $t = rand(1, 10); $i<$t; $i++) { $id = $this->generateAcl($this->chooseClassId(), $parentId, $ancestors); if ($level < $depth) { diff --git a/src/Symfony/Component/Security/Tests/Acl/Voter/AclVoterTest.php b/src/Symfony/Component/Security/Tests/Acl/Voter/AclVoterTest.php index 98e5ab9c55..57f9d1bc73 100644 --- a/src/Symfony/Component/Security/Tests/Acl/Voter/AclVoterTest.php +++ b/src/Symfony/Component/Security/Tests/Acl/Voter/AclVoterTest.php @@ -27,7 +27,7 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase */ public function testSupportsAttribute($attribute, $supported) { - list($voter,, $permissionMap,,) = $this->getVoter(true, false); + list($voter, , $permissionMap, ,) = $this->getVoter(true, false); $permissionMap ->expects($this->once()) @@ -44,7 +44,7 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase */ public function testSupportsAttributeNonString($attribute) { - list($voter,,,,,) = $this->getVoter(true, false); + list($voter, , , , ,) = $this->getVoter(true, false); $this->assertFalse($voter->supportsAttribute($attribute)); } @@ -72,7 +72,7 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase */ public function testSupportsClass($class) { - list($voter,,,,) = $this->getVoter(); + list($voter, , , ,) = $this->getVoter(); $this->assertTrue($voter->supportsClass($class)); } @@ -88,7 +88,7 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase public function testVote() { - list($voter,, $permissionMap,,) = $this->getVoter(); + list($voter, , $permissionMap, ,) = $this->getVoter(); $permissionMap ->expects($this->atLeastOnce()) ->method('getMasks') @@ -103,7 +103,7 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase */ public function testVoteWhenNoObjectIsPassed($allowIfObjectIdentityUnavailable) { - list($voter,, $permissionMap,,) = $this->getVoter($allowIfObjectIdentityUnavailable); + list($voter, , $permissionMap, ,) = $this->getVoter($allowIfObjectIdentityUnavailable); $permissionMap ->expects($this->once()) ->method('getMasks') @@ -124,7 +124,7 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase */ public function testVoteWhenOidStrategyReturnsNull($allowIfUnavailable) { - list($voter,, $permissionMap, $oidStrategy,) = $this->getVoter($allowIfUnavailable); + list($voter, , $permissionMap, $oidStrategy,) = $this->getVoter($allowIfUnavailable); $permissionMap ->expects($this->once()) ->method('getMasks') @@ -365,7 +365,7 @@ class AclVoterTest extends \PHPUnit_Framework_TestCase { list($voter, $provider, $permissionMap, $oidStrategy, $sidStrategy) = $this->getVoter(); - $oid = new ObjectIdentity('someID','someType'); + $oid = new ObjectIdentity('someID', 'someType'); $permissionMap ->expects($this->once()) diff --git a/src/Symfony/Component/Security/Tests/Core/Authorization/AccessDecisionManagerTest.php b/src/Symfony/Component/Security/Tests/Core/Authorization/AccessDecisionManagerTest.php index 37e12b7e28..74e790af88 100644 --- a/src/Symfony/Component/Security/Tests/Core/Authorization/AccessDecisionManagerTest.php +++ b/src/Symfony/Component/Security/Tests/Core/Authorization/AccessDecisionManagerTest.php @@ -99,8 +99,8 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase $voter->expects($this->exactly(2)) ->method('vote') ->will($this->returnValueMap(array( - array($token, null, array("ROLE_FOO"),$vote1), - array($token, null, array("ROLE_BAR"),$vote2), + array($token, null, array("ROLE_FOO"), $vote1), + array($token, null, array("ROLE_BAR"), $vote2), ))) ; diff --git a/src/Symfony/Component/Security/Tests/Http/Firewall/RememberMeListenerTest.php b/src/Symfony/Component/Security/Tests/Http/Firewall/RememberMeListenerTest.php index 8ad4c55a94..301bd6f38a 100644 --- a/src/Symfony/Component/Security/Tests/Http/Firewall/RememberMeListenerTest.php +++ b/src/Symfony/Component/Security/Tests/Http/Firewall/RememberMeListenerTest.php @@ -34,7 +34,7 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase public function testOnCoreSecurityDoesNotTryToPopulateNonEmptySecurityContext() { - list($listener, $context, $service,,) = $this->getListener(); + list($listener, $context, $service, ,) = $this->getListener(); $context ->expects($this->once()) @@ -52,7 +52,7 @@ class RememberMeListenerTest extends \PHPUnit_Framework_TestCase public function testOnCoreSecurityDoesNothingWhenNoCookieIsSet() { - list($listener, $context, $service,,) = $this->getListener(); + list($listener, $context, $service, ,) = $this->getListener(); $context ->expects($this->once()) diff --git a/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php b/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php index 0e4b5f014e..6805effb48 100644 --- a/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php +++ b/src/Symfony/Component/Stopwatch/Tests/StopwatchTest.php @@ -62,7 +62,7 @@ class StopwatchTest extends \PHPUnit_Framework_TestCase 'foo' => $this->getMockBuilder('Symfony\Component\Stopwatch\StopwatchEvent') ->setConstructorArgs(array(microtime(true) * 1000)) - ->getMock(),) + ->getMock()) ); $this->assertFalse($stopwatch->isStarted('foo')); diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php index 6ac78f2a53..7394ef850a 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php @@ -89,7 +89,7 @@ class ChoiceValidatorTest extends AbstractConstraintValidatorTest { $constraint = new Choice(array('callback' => function () { return array('foo', 'bar'); - },)); + }, )); $this->validator->validate('bar', $constraint); diff --git a/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataFactoryTest.php b/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataFactoryTest.php index bee4025d0d..344dc4525f 100644 --- a/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataFactoryTest.php +++ b/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataFactoryTest.php @@ -106,7 +106,7 @@ class ClassMetadataFactoryTest extends \PHPUnit_Framework_TestCase ->method('read') ->will($this->returnValue($metadata)); - $this->assertEquals($metadata,$factory->getMetadataFor(self::PARENTCLASS)); + $this->assertEquals($metadata, $factory->getMetadataFor(self::PARENTCLASS)); } } diff --git a/src/Symfony/Component/Yaml/Parser.php b/src/Symfony/Component/Yaml/Parser.php index d039e3034b..2320c0d4d2 100644 --- a/src/Symfony/Component/Yaml/Parser.php +++ b/src/Symfony/Component/Yaml/Parser.php @@ -114,7 +114,7 @@ class Parser $data[] = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport); } } - } elseif (preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\[\{].*?) *\:(\s+(?P.+?))?\s*$#u', $this->currentLine, $values) && (false === strpos($values['key'],' #') || in_array($values['key'][0], array('"', "'")))) { + } elseif (preg_match('#^(?P'.Inline::REGEX_QUOTED_STRING.'|[^ \'"\[\{].*?) *\:(\s+(?P.+?))?\s*$#u', $this->currentLine, $values) && (false === strpos($values['key'], ' #') || in_array($values['key'][0], array('"', "'")))) { if ($context && 'sequence' == $context) { throw new ParseException('You cannot define a mapping item when in a sequence'); }