diff --git a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php index d078fea14e..a07e9d180a 100644 --- a/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php +++ b/src/Symfony/Bridge/Doctrine/Security/RememberMe/DoctrineTokenProvider.php @@ -92,12 +92,16 @@ class DoctrineTokenProvider implements TokenProviderInterface { $sql = 'UPDATE rememberme_token SET value=:value, lastUsed=:lastUsed' .' WHERE series=:series'; - $paramValues = array('value' => $tokenValue, - 'lastUsed' => $lastUsed, - 'series' => $series,); - $paramTypes = array('value' => \PDO::PARAM_STR, - 'lastUsed' => DoctrineType::DATETIME, - 'series' => \PDO::PARAM_STR,); + $paramValues = array( + 'value' => $tokenValue, + 'lastUsed' => $lastUsed, + 'series' => $series, + ); + $paramTypes = array( + 'value' => \PDO::PARAM_STR, + 'lastUsed' => DoctrineType::DATETIME, + 'series' => \PDO::PARAM_STR, + ); $updated = $this->conn->executeUpdate($sql, $paramValues, $paramTypes); if ($updated < 1) { throw new TokenNotFoundException('No token found.'); @@ -112,16 +116,20 @@ class DoctrineTokenProvider implements TokenProviderInterface $sql = 'INSERT INTO rememberme_token' .' (class, username, series, value, lastUsed)' .' VALUES (:class, :username, :series, :value, :lastUsed)'; - $paramValues = array('class' => $token->getClass(), - 'username' => $token->getUsername(), - 'series' => $token->getSeries(), - 'value' => $token->getTokenValue(), - 'lastUsed' => $token->getLastUsed(),); - $paramTypes = array('class' => \PDO::PARAM_STR, - 'username' => \PDO::PARAM_STR, - 'series' => \PDO::PARAM_STR, - 'value' => \PDO::PARAM_STR, - 'lastUsed' => DoctrineType::DATETIME,); + $paramValues = array( + 'class' => $token->getClass(), + 'username' => $token->getUsername(), + 'series' => $token->getSeries(), + 'value' => $token->getTokenValue(), + 'lastUsed' => $token->getLastUsed(), + ); + $paramTypes = array( + 'class' => \PDO::PARAM_STR, + 'username' => \PDO::PARAM_STR, + 'series' => \PDO::PARAM_STR, + 'value' => \PDO::PARAM_STR, + 'lastUsed' => DoctrineType::DATETIME, + ); $this->conn->executeUpdate($sql, $paramValues, $paramTypes); } } diff --git a/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php b/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php index 979301d466..004cb8f57d 100644 --- a/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php +++ b/src/Symfony/Bridge/Twig/Tests/Extension/TranslationExtensionTest.php @@ -32,7 +32,7 @@ class TranslationExtensionTest extends TestCase public function testTrans($template, $expected, array $variables = array()) { if ($expected != $this->getTemplate($template)->render($variables)) { - print $template."\n"; + echo $template."\n"; $loader = new \Twig_Loader_Array(array('index' => $template)); $twig = new \Twig_Environment($loader, array('debug' => true, 'cache' => false)); $twig->addExtension(new TranslationExtension(new Translator('en', new MessageSelector()))); diff --git a/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php b/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php index 5c8a3becb8..29238a21c4 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Tests/Profiler/TemplateManagerTest.php @@ -48,9 +48,9 @@ class TemplateManagerTest extends TestCase $profiler = $this->mockProfiler(); $twigEnvironment = $this->mockTwigEnvironment(); $templates = array( - 'data_collector.foo' => array('foo','FooBundle:Collector:foo'), - 'data_collector.bar' => array('bar','FooBundle:Collector:bar'), - 'data_collector.baz' => array('baz','FooBundle:Collector:baz'), + 'data_collector.foo' => array('foo', 'FooBundle:Collector:foo'), + 'data_collector.bar' => array('bar', 'FooBundle:Collector:bar'), + 'data_collector.baz' => array('baz', 'FooBundle:Collector:baz'), ); $this->templateManager = new TemplateManager($profiler, $twigEnvironment, $templates); diff --git a/src/Symfony/Component/ClassLoader/ClassLoader.php b/src/Symfony/Component/ClassLoader/ClassLoader.php index fc0a569485..a506dc0941 100644 --- a/src/Symfony/Component/ClassLoader/ClassLoader.php +++ b/src/Symfony/Component/ClassLoader/ClassLoader.php @@ -97,7 +97,7 @@ class ClassLoader $paths )); } elseif (!in_array($paths, $this->prefixes[$prefix])) { - $this->prefixes[$prefix][] = $paths; + $this->prefixes[$prefix][] = $paths; } } else { $this->prefixes[$prefix] = array_unique((array) $paths); diff --git a/src/Symfony/Component/Console/Tests/Input/StringInputTest.php b/src/Symfony/Component/Console/Tests/Input/StringInputTest.php index 640d226dd5..504f70a18d 100644 --- a/src/Symfony/Component/Console/Tests/Input/StringInputTest.php +++ b/src/Symfony/Component/Console/Tests/Input/StringInputTest.php @@ -54,7 +54,7 @@ class StringInputTest extends \PHPUnit_Framework_TestCase array('"quoted"', array('quoted'), '->tokenize() parses quoted arguments'), array("'quoted'", array('quoted'), '->tokenize() parses quoted arguments'), array("'a\rb\nc\td'", array("a\rb\nc\td"), '->tokenize() parses whitespace chars in strings'), - array("'a'\r'b'\n'c'\t'd'", array('a','b','c','d'), '->tokenize() parses whitespace chars between args as spaces'), + array("'a'\r'b'\n'c'\t'd'", array('a', 'b', 'c', 'd'), '->tokenize() parses whitespace chars between args as spaces'), array('\"quoted\"', array('"quoted"'), '->tokenize() parses escaped-quoted arguments'), array("\'quoted\'", array('\'quoted\''), '->tokenize() parses escaped-quoted arguments'), array('-a', array('-a'), '->tokenize() parses short options'), diff --git a/src/Symfony/Component/CssSelector/Tests/Node/ElementNodeTest.php b/src/Symfony/Component/CssSelector/Tests/Node/ElementNodeTest.php index 1db6a591a2..6d24789320 100644 --- a/src/Symfony/Component/CssSelector/Tests/Node/ElementNodeTest.php +++ b/src/Symfony/Component/CssSelector/Tests/Node/ElementNodeTest.php @@ -29,7 +29,7 @@ class ElementNodeTest extends AbstractNodeTest return array( array(new ElementNode(), 0), array(new ElementNode(null, 'element'), 1), - array(new ElementNode('namespace', 'element'),1), + array(new ElementNode('namespace', 'element'), 1), ); } } diff --git a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php index dcc1c2eb99..810fb56447 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/RequestTest.php @@ -340,7 +340,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase array('json', array('application/json', 'application/x-json')), array('xml', array('text/xml', 'application/xml', 'application/x-xml')), array('rdf', array('application/rdf+xml')), - array('atom',array('application/atom+xml')), + array('atom', array('application/atom+xml')), ); } diff --git a/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php b/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php index 393aa066f5..e55a6ccf88 100644 --- a/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php +++ b/src/Symfony/Component/Routing/Tests/Generator/Dumper/PhpGeneratorDumperTest.php @@ -86,7 +86,7 @@ class PhpGeneratorDumperTest extends \PHPUnit_Framework_TestCase public function testDumpWithTooManyRoutes() { $this->routeCollection->add('Test', new Route('/testing/{foo}')); - for ( $i = 0; $i < 32769; ++$i ) { + for ($i = 0; $i < 32769; ++$i) { $this->routeCollection->add('route_'.$i, new Route('/route_'.$i)); } $this->routeCollection->add('Test2', new Route('/testing2')); diff --git a/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php b/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php index 1fade3b4b2..0ccc19f4a5 100644 --- a/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php +++ b/src/Symfony/Component/Security/Acl/Dbal/AclProvider.php @@ -571,7 +571,7 @@ QUERY; $oidCache[$oidLookupKey] = new ObjectIdentity($objectIdentifier, $classType); } - $acl = new Acl((int) $aclId, $oidCache[$oidLookupKey], $permissionGrantingStrategy, $emptyArray, !!$entriesInheriting); + $acl = new Acl((int) $aclId, $oidCache[$oidLookupKey], $permissionGrantingStrategy, $emptyArray, (bool) $entriesInheriting); // keep a local, and global reference to this ACL $loadedAcls[$classType][$objectIdentifier] = $acl; @@ -613,9 +613,9 @@ QUERY; } if (null === $fieldName) { - $loadedAces[$aceId] = new Entry((int) $aceId, $acl, $sids[$key], $grantingStrategy, (int) $mask, !!$granting, !!$auditFailure, !!$auditSuccess); + $loadedAces[$aceId] = new Entry((int) $aceId, $acl, $sids[$key], $grantingStrategy, (int) $mask, (bool) $granting, (bool) $auditFailure, (bool) $auditSuccess); } else { - $loadedAces[$aceId] = new FieldEntry((int) $aceId, $acl, $fieldName, $sids[$key], $grantingStrategy, (int) $mask, !!$granting, !!$auditFailure, !!$auditSuccess); + $loadedAces[$aceId] = new FieldEntry((int) $aceId, $acl, $fieldName, $sids[$key], $grantingStrategy, (int) $mask, (bool) $granting, (bool) $auditFailure, (bool) $auditSuccess); } } $ace = $loadedAces[$aceId]; diff --git a/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php b/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php index 9aa39cad48..c1981deb96 100644 --- a/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php +++ b/src/Symfony/Component/Security/Core/User/InMemoryUserProvider.php @@ -97,7 +97,7 @@ class InMemoryUserProvider implements UserProviderInterface /** * Returns the user by given username. * - * @param string $username The username. + * @param string $username The username. * * @return User * diff --git a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php index a6c7c9398d..bb3e7fb564 100644 --- a/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php +++ b/src/Symfony/Component/Serializer/Tests/Encoder/XmlEncoderTest.php @@ -74,7 +74,7 @@ class XmlEncoderTest extends \PHPUnit_Framework_TestCase '@Type' => 'test', ), 'föo_bär' => 'a', - 'Bar' => array(1,2,3), + 'Bar' => array(1, 2, 3), 'a' => 'b', ); $expected = ''."\n". @@ -283,7 +283,7 @@ class XmlEncoderTest extends \PHPUnit_Framework_TestCase '@Type' => 'test', ), 'föo_bär' => 'a', - 'Bar' => array(1,2,3), + 'Bar' => array(1, 2, 3), 'a' => 'b', ); $expected = array( @@ -296,7 +296,7 @@ class XmlEncoderTest extends \PHPUnit_Framework_TestCase '@Type' => 'test', ), 'föo_bär' => 'a', - 'Bar' => array(1,2,3), + 'Bar' => array(1, 2, 3), 'a' => 'b', ); $xml = $this->encoder->encode($obj, 'xml'); diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php index 934b81b2e7..1c5d699b5d 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php @@ -91,9 +91,9 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase public function attributeProvider() { return array( - array('attribute_test', array('attribute_test'),'AttributeTest'), - array('attribute_test', array('any'),'attribute_test'), - array('attribute', array('attribute'),'Attribute'), + array('attribute_test', array('attribute_test'), 'AttributeTest'), + array('attribute_test', array('any'), 'attribute_test'), + array('attribute', array('attribute'), 'Attribute'), array('attribute', array(), 'attribute'), ); } diff --git a/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php b/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php index 43c31672c2..5de544e0c1 100644 --- a/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php +++ b/src/Symfony/Component/Translation/Tests/PluralizationRulesTest.php @@ -60,10 +60,10 @@ class PluralizationRulesTest extends \PHPUnit_Framework_TestCase public function successLangcodes() { return array( - array('1', array('ay','bo', 'cgg','dz','id', 'ja', 'jbo', 'ka','kk','km','ko','ky')), + array('1', array('ay', 'bo', 'cgg', 'dz', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky')), array('2', array('nl', 'fr', 'en', 'de', 'de_GE', 'hy', 'hy_AM')), - array('3', array('be','bs','cs','hr')), - array('4', array('cy','mt', 'sl')), + array('3', array('be', 'bs', 'cs', 'hr')), + array('4', array('cy', 'mt', 'sl')), array('5', array()), array('6', array('ar')), ); @@ -83,7 +83,7 @@ class PluralizationRulesTest extends \PHPUnit_Framework_TestCase array('1', array('fa')), array('2', array('jbo')), array('3', array('cbs')), - array('4', array('gd','kw')), + array('4', array('gd', 'kw')), array('5', array('ga')), array('6', array()), );