diff --git a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php
index d450e49389..4e871e563a 100644
--- a/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php
+++ b/src/Symfony/Bridge/Doctrine/DependencyInjection/CompilerPass/RegisterEventListenersAndSubscribersPass.php
@@ -55,7 +55,7 @@ class RegisterEventListenersAndSubscribersPass implements CompilerPassInterface
$this->container = $container;
$this->connections = $container->getParameter($this->connections);
- $sortFunc = function($a, $b) {
+ $sortFunc = function ($a, $b) {
$a = isset($a['priority']) ? $a['priority'] : 0;
$b = isset($b['priority']) ? $b['priority'] : 0;
diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueValidatorTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueValidatorTest.php
index 68dfd7559d..a3b5597a0b 100644
--- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueValidatorTest.php
+++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueValidatorTest.php
@@ -295,7 +295,7 @@ class UniqueValidatorTest extends \PHPUnit_Framework_TestCase
$repository->expects($this->once())
->method('findByCustom')
->will(
- $this->returnCallback(function() use ($entity) {
+ $this->returnCallback(function () use ($entity) {
$returnValue = array(
$entity,
);
diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
index c2f17fa19d..81469e984e 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php
@@ -207,12 +207,12 @@ EOF
}
}
$format = '%-'.$maxName.'s ';
- $format .= implode("", array_map(function($length) { return "%-{$length}s "; }, $maxTags));
+ $format .= implode("", array_map(function ($length) { return "%-{$length}s "; }, $maxTags));
$format .= '%-'.$maxScope.'s %s';
// the title field needs extra space to make up for comment tags
$format1 = '%-'.($maxName + 19).'s ';
- $format1 .= implode("", array_map(function($length) { return '%-'.($length + 19).'s '; }, $maxTags));
+ $format1 .= implode("", array_map(function ($length) { return '%-'.($length + 19).'s '; }, $maxTags));
$format1 .= '%-'.($maxScope + 19).'s %s';
$tags = array();
@@ -288,7 +288,7 @@ EOF
$output->writeln('Tags');
foreach ($tags as $tagName => $tagData) {
foreach ($tagData as $singleTagData) {
- $output->writeln(sprintf(' - %-30s (%s)', $tagName, implode(', ', array_map(function($key, $value) {
+ $output->writeln(sprintf(' - %-30s (%s)', $tagName, implode(', ', array_map(function ($key, $value) {
return sprintf('%s: %s', $key, $value);
}, array_keys($singleTagData), array_values($singleTagData)))));
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
index 79a61e821d..852f8ba424 100644
--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
@@ -41,12 +41,12 @@ class Configuration implements ConfigurationInterface
->end()
->arrayNode('trusted_proxies')
->beforeNormalization()
- ->ifTrue(function($v) { return !is_array($v) && !is_null($v); })
- ->then(function($v) { return is_bool($v) ? array() : preg_split('/\s*,\s*/', $v); })
+ ->ifTrue(function ($v) { return !is_array($v) && !is_null($v); })
+ ->then(function ($v) { return is_bool($v) ? array() : preg_split('/\s*,\s*/', $v); })
->end()
->prototype('scalar')
->validate()
- ->ifTrue(function($v) {
+ ->ifTrue(function ($v) {
if (empty($v)) {
return false;
}
@@ -70,8 +70,8 @@ class Configuration implements ConfigurationInterface
->scalarNode('default_locale')->defaultValue('en')->end()
->arrayNode('trusted_hosts')
->beforeNormalization()
- ->ifTrue(function($v) { return is_string($v); })
- ->then(function($v) { return array($v); })
+ ->ifTrue(function ($v) { return is_string($v); })
+ ->then(function ($v) { return array($v); })
->end()
->prototype('scalar')->end()
->end()
@@ -226,7 +226,7 @@ class Configuration implements ConfigurationInterface
private function addTemplatingSection(ArrayNodeDefinition $rootNode)
{
- $organizeUrls = function($urls) {
+ $organizeUrls = function ($urls) {
$urls += array(
'http' => array(),
'ssl' => array(),
@@ -263,8 +263,8 @@ class Configuration implements ConfigurationInterface
->addDefaultChildrenIfNoneSet()
->prototype('scalar')->defaultValue('FrameworkBundle:Form')->end()
->validate()
- ->ifTrue(function($v) {return !in_array('FrameworkBundle:Form', $v); })
- ->then(function($v){
+ ->ifTrue(function ($v) {return !in_array('FrameworkBundle:Form', $v); })
+ ->then(function ($v) {
return array_merge(array('FrameworkBundle:Form'), $v);
})
->end()
@@ -278,8 +278,8 @@ class Configuration implements ConfigurationInterface
->performNoDeepMerging()
->addDefaultsIfNotSet()
->beforeNormalization()
- ->ifTrue(function($v) { return !is_array($v); })
- ->then(function($v) { return array($v); })
+ ->ifTrue(function ($v) { return !is_array($v); })
+ ->then(function ($v) { return array($v); })
->end()
->beforeNormalization()
->always()
@@ -303,8 +303,8 @@ class Configuration implements ConfigurationInterface
->isRequired()
->requiresAtLeastOneElement()
->beforeNormalization()
- ->ifTrue(function($v){ return !is_array($v); })
- ->then(function($v){ return array($v); })
+ ->ifTrue(function ($v) { return !is_array($v); })
+ ->then(function ($v) { return array($v); })
->end()
->prototype('scalar')->end()
->end()
@@ -313,8 +313,8 @@ class Configuration implements ConfigurationInterface
->children()
->arrayNode('loaders')
->beforeNormalization()
- ->ifTrue(function($v){ return !is_array($v); })
- ->then(function($v){ return array($v); })
+ ->ifTrue(function ($v) { return !is_array($v); })
+ ->then(function ($v) { return array($v); })
->end()
->prototype('scalar')->end()
->end()
@@ -332,8 +332,8 @@ class Configuration implements ConfigurationInterface
->performNoDeepMerging()
->addDefaultsIfNotSet()
->beforeNormalization()
- ->ifTrue(function($v) { return !is_array($v); })
- ->then(function($v) { return array($v); })
+ ->ifTrue(function ($v) { return !is_array($v); })
+ ->then(function ($v) { return array($v); })
->end()
->beforeNormalization()
->always()
diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
index 5f6004176c..0c22c27e86 100644
--- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
@@ -389,7 +389,7 @@ class FrameworkExtension extends Extension
// Apply request scope to assets helper if one or more packages are request-scoped
$requireRequestScope = array_reduce(
$namedPackages,
- function($v, Reference $ref) use ($container) {
+ function ($v, Reference $ref) use ($container) {
return $v || 'request' === $container->getDefinition($ref)->getScope();
},
'request' === $defaultPackage->getScope()
@@ -400,7 +400,7 @@ class FrameworkExtension extends Extension
}
if (!empty($config['loaders'])) {
- $loaders = array_map(function($loader) { return new Reference($loader); }, $config['loaders']);
+ $loaders = array_map(function ($loader) { return new Reference($loader); }, $config['loaders']);
// Use a delegation unless only a single loader was registered
if (1 === count($loaders)) {
@@ -437,7 +437,7 @@ class FrameworkExtension extends Extension
}
$container->setParameter('templating.engines', $config['engines']);
- $engines = array_map(function($engine) { return new Reference('templating.engine.'.$engine); }, $config['engines']);
+ $engines = array_map(function ($engine) { return new Reference('templating.engine.'.$engine); }, $config['engines']);
// Use a delegation unless only a single engine was registered
if (1 === count($engines)) {
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
index d7de01fdad..b184498db4 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
@@ -181,7 +181,7 @@ abstract class FrameworkExtensionTest extends TestCase
}
}
- $files = array_map(function($resource) { return realpath($resource[1]); }, $resources);
+ $files = array_map(function ($resource) { return realpath($resource[1]); }, $resources);
$ref = new \ReflectionClass('Symfony\Component\Validator\Validator');
$this->assertContains(
strtr(dirname($ref->getFileName()) . '/Resources/translations/validators.en.xlf', '/', DIRECTORY_SEPARATOR),
diff --git a/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php b/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php
index acefa38af8..997d0153d1 100644
--- a/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php
+++ b/src/Symfony/Bundle/SecurityBundle/DataCollector/SecurityDataCollector.php
@@ -57,7 +57,7 @@ class SecurityDataCollector extends DataCollector
'authenticated' => $token->isAuthenticated(),
'token_class' => get_class($token),
'user' => $token->getUsername(),
- 'roles' => array_map(function ($role){ return $role->getRole();}, $token->getRoles()),
+ 'roles' => array_map(function ($role) { return $role->getRole();}, $token->getRoles()),
);
}
}
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
index 2e1be8c694..95f1ced93d 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
@@ -132,10 +132,10 @@ class MainConfiguration implements ConfigurationInterface
->useAttributeAsKey('id')
->prototype('array')
->performNoDeepMerging()
- ->beforeNormalization()->ifString()->then(function($v) { return array('value' => $v); })->end()
+ ->beforeNormalization()->ifString()->then(function ($v) { return array('value' => $v); })->end()
->beforeNormalization()
- ->ifTrue(function($v) { return is_array($v) && isset($v['value']); })
- ->then(function($v) { return preg_split('/\s*,\s*/', $v['value']); })
+ ->ifTrue(function ($v) { return is_array($v) && isset($v['value']); })
+ ->then(function ($v) { return preg_split('/\s*,\s*/', $v['value']); })
->end()
->prototype('scalar')->end()
->end()
@@ -162,18 +162,18 @@ class MainConfiguration implements ConfigurationInterface
->end()
->scalarNode('host')->defaultNull()->end()
->arrayNode('ips')
- ->beforeNormalization()->ifString()->then(function($v) { return array($v); })->end()
+ ->beforeNormalization()->ifString()->then(function ($v) { return array($v); })->end()
->prototype('scalar')->end()
->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()
->prototype('scalar')->end()
->end()
->end()
->fixXmlConfig('role')
->children()
->arrayNode('roles')
- ->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()
->end()
->end()
@@ -223,8 +223,8 @@ class MainConfiguration implements ConfigurationInterface
->children()
->arrayNode('delete_cookies')
->beforeNormalization()
- ->ifTrue(function($v) { return is_array($v) && is_int(key($v)); })
- ->then(function($v) { return array_map(function($v) { return array('name' => $v); }, $v); })
+ ->ifTrue(function ($v) { return is_array($v) && is_int(key($v)); })
+ ->then(function ($v) { return array_map(function ($v) { return array('name' => $v); }, $v); })
->end()
->useAttributeAsKey('name')
->prototype('array')
@@ -278,10 +278,10 @@ class MainConfiguration implements ConfigurationInterface
$firewallNodeBuilder
->end()
->validate()
- ->ifTrue(function($v) {
+ ->ifTrue(function ($v) {
return true === $v['security'] && isset($v['pattern']) && !isset($v['request_matcher']);
})
- ->then(function($firewall) use ($abstractFactoryKeys) {
+ ->then(function ($firewall) use ($abstractFactoryKeys) {
foreach ($abstractFactoryKeys as $k) {
if (!isset($firewall[$k]['check_path'])) {
continue;
@@ -331,7 +331,7 @@ class MainConfiguration implements ConfigurationInterface
->arrayNode('providers')
->beforeNormalization()
->ifString()
- ->then(function($v) { return preg_split('/\s*,\s*/', $v); })
+ ->then(function ($v) { return preg_split('/\s*,\s*/', $v); })
->end()
->prototype('scalar')->end()
->end()
@@ -349,11 +349,11 @@ class MainConfiguration implements ConfigurationInterface
$providerNodeBuilder
->validate()
- ->ifTrue(function($v){return count($v) > 1;})
+ ->ifTrue(function ($v) {return count($v) > 1;})
->thenInvalid('You cannot set multiple provider types for the same provider')
->end()
->validate()
- ->ifTrue(function($v){return count($v) === 0;})
+ ->ifTrue(function ($v) {return count($v) === 0;})
->thenInvalid('You must set a provider definition for the provider.')
->end()
;
@@ -378,7 +378,7 @@ class MainConfiguration implements ConfigurationInterface
->prototype('array')
->canBeUnset()
->performNoDeepMerging()
- ->beforeNormalization()->ifString()->then(function($v) { return array('algorithm' => $v); })->end()
+ ->beforeNormalization()->ifString()->then(function ($v) { return array('algorithm' => $v); })->end()
->children()
->scalarNode('algorithm')->cannotBeEmpty()->end()
->scalarNode('hash_algorithm')->info('Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms.')->defaultValue('sha512')->end()
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php
index 08c4a33d28..288ea1e824 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/RememberMeFactory.php
@@ -126,7 +126,7 @@ class RememberMeFactory implements SecurityFactoryInterface
->scalarNode('token_provider')->end()
->arrayNode('user_providers')
->beforeNormalization()
- ->ifString()->then(function($v) { return array($v); })
+ ->ifString()->then(function ($v) { return array($v); })
->end()
->prototype('scalar')->end()
->end()
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php
index bab1bb4fe7..cf43e95067 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/UserProvider/InMemoryFactory.php
@@ -57,7 +57,7 @@ class InMemoryFactory implements UserProviderFactoryInterface
->children()
->scalarNode('password')->defaultValue(uniqid())->end()
->arrayNode('roles')
- ->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()
->end()
->end()
diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
index ad75ac14a3..8dbeb38f1f 100644
--- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
+++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
@@ -229,7 +229,7 @@ class SecurityExtension extends Extension
$mapDef->replaceArgument(1, $map);
// add authentication providers to authentication manager
- $authenticationProviders = array_map(function($id) {
+ $authenticationProviders = array_map(function ($id) {
return new Reference($id);
}, array_values(array_unique($authenticationProviders)));
$container
diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php
index ca8362a760..4089aee5a1 100644
--- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php
+++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php
@@ -58,8 +58,8 @@ class Configuration implements ConfigurationInterface
->prototype('scalar')->defaultValue('form_div_layout.html.twig')->end()
->example(array('MyBundle::form.html.twig'))
->validate()
- ->ifTrue(function($v) { return !in_array('form_div_layout.html.twig', $v); })
- ->then(function($v){
+ ->ifTrue(function ($v) { return !in_array('form_div_layout.html.twig', $v); })
+ ->then(function ($v) {
return array_merge(array('form_div_layout.html.twig'), $v);
})
->end()
@@ -81,8 +81,8 @@ class Configuration implements ConfigurationInterface
->example(array('foo' => '"@bar"', 'pi' => 3.14))
->prototype('array')
->beforeNormalization()
- ->ifTrue(function($v){ return is_string($v) && 0 === strpos($v, '@'); })
- ->then(function($v){
+ ->ifTrue(function ($v) { return is_string($v) && 0 === strpos($v, '@'); })
+ ->then(function ($v) {
if (0 === strpos($v, '@@')) {
return substr($v, 1);
}
@@ -91,7 +91,7 @@ class Configuration implements ConfigurationInterface
})
->end()
->beforeNormalization()
- ->ifTrue(function($v){
+ ->ifTrue(function ($v) {
if (is_array($v)) {
$keys = array_keys($v);
sort($keys);
@@ -101,7 +101,7 @@ class Configuration implements ConfigurationInterface
return true;
})
- ->then(function($v){ return array('value' => $v); })
+ ->then(function ($v) { return array('value' => $v); })
->end()
->children()
->scalarNode('id')->end()
diff --git a/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php b/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php
index 843e49709a..3deef66c60 100644
--- a/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php
+++ b/src/Symfony/Component/BrowserKit/Tests/CookieJarTest.php
@@ -206,7 +206,7 @@ class CookieJarTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($cookie1, $cookieJar->get('foo','/','example.com'));
$this->assertEquals($cookie2, $cookieJar->get('foo1','/','test.example.com'));
}
-
+
public function testCookieGetWithSubdirectory()
{
$cookieJar = new CookieJar();
diff --git a/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php
index a658050ea6..6027fa9caf 100644
--- a/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php
+++ b/src/Symfony/Component/Config/Definition/Builder/ArrayNodeDefinition.php
@@ -235,7 +235,7 @@ class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinition
->treatNullLike(array('enabled' => true))
->beforeNormalization()
->ifArray()
- ->then(function($v) {
+ ->then(function ($v) {
$v['enabled'] = isset($v['enabled']) ? $v['enabled'] : true;
return $v;
diff --git a/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php b/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php
index 9bbbcadc18..7cbddc6cf3 100644
--- a/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php
+++ b/src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php
@@ -44,7 +44,7 @@ class ExprBuilder
*/
public function always(\Closure $then = null)
{
- $this->ifPart = function($v) { return true; };
+ $this->ifPart = function ($v) { return true; };
if (null !== $then) {
$this->thenPart = $then;
@@ -65,7 +65,7 @@ class ExprBuilder
public function ifTrue(\Closure $closure = null)
{
if (null === $closure) {
- $closure = function($v) { return true === $v; };
+ $closure = function ($v) { return true === $v; };
}
$this->ifPart = $closure;
@@ -80,7 +80,7 @@ class ExprBuilder
*/
public function ifString()
{
- $this->ifPart = function($v) { return is_string($v); };
+ $this->ifPart = function ($v) { return is_string($v); };
return $this;
}
@@ -92,7 +92,7 @@ class ExprBuilder
*/
public function ifNull()
{
- $this->ifPart = function($v) { return null === $v; };
+ $this->ifPart = function ($v) { return null === $v; };
return $this;
}
@@ -104,7 +104,7 @@ class ExprBuilder
*/
public function ifArray()
{
- $this->ifPart = function($v) { return is_array($v); };
+ $this->ifPart = function ($v) { return is_array($v); };
return $this;
}
@@ -118,7 +118,7 @@ class ExprBuilder
*/
public function ifInArray(array $array)
{
- $this->ifPart = function($v) use ($array) { return in_array($v, $array, true); };
+ $this->ifPart = function ($v) use ($array) { return in_array($v, $array, true); };
return $this;
}
@@ -132,7 +132,7 @@ class ExprBuilder
*/
public function ifNotInArray(array $array)
{
- $this->ifPart = function($v) use ($array) { return !in_array($v, $array, true); };
+ $this->ifPart = function ($v) use ($array) { return !in_array($v, $array, true); };
return $this;
}
@@ -158,7 +158,7 @@ class ExprBuilder
*/
public function thenEmptyArray()
{
- $this->thenPart = function($v) { return array(); };
+ $this->thenPart = function ($v) { return array(); };
return $this;
}
@@ -225,7 +225,7 @@ class ExprBuilder
{
foreach ($expressions as $k => $expr) {
if ($expr instanceof ExprBuilder) {
- $expressions[$k] = function($v) use ($expr) {
+ $expressions[$k] = function ($v) use ($expr) {
return call_user_func($expr->ifPart, $v) ? call_user_func($expr->thenPart, $v) : $v;
};
}
diff --git a/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php b/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php
index 39bc627a56..4d19307580 100644
--- a/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/ArrayNodeTest.php
@@ -13,7 +13,6 @@ namespace Symfony\Component\Config\Tests\Definition;
use Symfony\Component\Config\Definition\ArrayNode;
use Symfony\Component\Config\Definition\ScalarNode;
-use Symfony\Component\Serializer\Tests\Fixtures\ScalarDummy;
class ArrayNodeTest extends \PHPUnit_Framework_TestCase
{
diff --git a/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php b/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php
index 2b8a876fd2..fa6fce5e6b 100644
--- a/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/Builder/ExprBuilderTest.php
@@ -34,13 +34,13 @@ 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);
@@ -193,7 +193,7 @@ class ExprBuilderTest extends \PHPUnit_Framework_TestCase
*/
protected function returnClosure($val)
{
- return function($v) use ($val) {
+ return function ($v) use ($val) {
return $val;
};
}
diff --git a/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php b/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php
index 4b0e6bf94c..68f14721ff 100644
--- a/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php
+++ b/src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php
@@ -29,7 +29,7 @@ class NormalizerTest extends \PHPUnit_Framework_TestCase
->node('encoders', 'array')
->useAttributeAsKey('class')
->prototype('array')
- ->beforeNormalization()->ifString()->then(function($v) { return array('algorithm' => $v); })->end()
+ ->beforeNormalization()->ifString()->then(function ($v) { return array('algorithm' => $v); })->end()
->children()
->node('algorithm', 'scalar')->end()
->end()
@@ -86,7 +86,7 @@ class NormalizerTest extends \PHPUnit_Framework_TestCase
),
);
- return array_map(function($v) {
+ return array_map(function ($v) {
return array($v);
}, $configs);
}
@@ -134,7 +134,7 @@ class NormalizerTest extends \PHPUnit_Framework_TestCase
),
);
- return array_map(function($v) { return array($v); }, $configs);
+ return array_map(function ($v) { return array($v); }, $configs);
}
/**
@@ -165,7 +165,7 @@ class NormalizerTest extends \PHPUnit_Framework_TestCase
),
);
- return array_map(function($v) { return array($v); }, $configs);
+ return array_map(function ($v) { return array($v); }, $configs);
}
/**
diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php
index 718aef46d4..72a6732997 100644
--- a/src/Symfony/Component/Console/Application.php
+++ b/src/Symfony/Component/Console/Application.php
@@ -1063,7 +1063,7 @@ class Application
*/
private function findAlternativeCommands($name, $abbrevs)
{
- $callback = function($item) {
+ $callback = function ($item) {
return $item->getName();
};
diff --git a/src/Symfony/Component/Console/Helper/DialogHelper.php b/src/Symfony/Component/Console/Helper/DialogHelper.php
index 2da3899cda..4b74f5a8a3 100644
--- a/src/Symfony/Component/Console/Helper/DialogHelper.php
+++ b/src/Symfony/Component/Console/Helper/DialogHelper.php
@@ -333,7 +333,7 @@ class DialogHelper extends Helper
{
$that = $this;
- $interviewer = function() use ($output, $question, $default, $autocomplete, $that) {
+ $interviewer = function () use ($output, $question, $default, $autocomplete, $that) {
return $that->ask($output, $question, $default, $autocomplete);
};
@@ -363,7 +363,7 @@ class DialogHelper extends Helper
{
$that = $this;
- $interviewer = function() use ($output, $question, $fallback, $that) {
+ $interviewer = function () use ($output, $question, $fallback, $that) {
return $that->askHiddenResponse($output, $question, $fallback);
};
diff --git a/src/Symfony/Component/Console/Shell.php b/src/Symfony/Component/Console/Shell.php
index ff8bef5f74..a06c7d30f6 100644
--- a/src/Symfony/Component/Console/Shell.php
+++ b/src/Symfony/Component/Console/Shell.php
@@ -105,7 +105,7 @@ EOF
;
$output = $this->output;
- $process->run(function($type, $data) use ($output) {
+ $process->run(function ($type, $data) use ($output) {
$output->writeln($data);
});
diff --git a/src/Symfony/Component/Debug/ErrorHandler.php b/src/Symfony/Component/Debug/ErrorHandler.php
index 103d86ef6e..f929c7c6cc 100644
--- a/src/Symfony/Component/Debug/ErrorHandler.php
+++ b/src/Symfony/Component/Debug/ErrorHandler.php
@@ -186,7 +186,7 @@ class ErrorHandler
}
// get current exception handler
- $exceptionHandler = set_exception_handler(function() {});
+ $exceptionHandler = set_exception_handler(function () {});
restore_exception_handler();
if (is_array($exceptionHandler) && $exceptionHandler[0] instanceof ExceptionHandler) {
diff --git a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
index 65e25cc25a..287eb44335 100644
--- a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
+++ b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
@@ -104,7 +104,7 @@ PHP
set_exception_handler(array($exceptionHandler, 'handle'));
$that = $this;
- $exceptionCheck = function($exception) use ($that) {
+ $exceptionCheck = function ($exception) use ($that) {
$that->assertInstanceOf('Symfony\Component\Debug\Exception\ContextErrorException', $exception);
$that->assertEquals(E_NOTICE, $exception->getSeverity());
$that->assertEquals(__LINE__ + 40, $exception->getLine());
@@ -199,7 +199,7 @@ PHP
$logger = $this->getMock('Psr\Log\LoggerInterface');
$that = $this;
- $warnArgCheck = function($message, $context) use ($that) {
+ $warnArgCheck = function ($message, $context) use ($that) {
$that->assertEquals('foo', $message);
$that->assertArrayHasKey('type', $context);
$that->assertEquals($context['type'], ErrorHandler::TYPE_DEPRECATION);
diff --git a/src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php
index ad7e448454..097c3e4800 100644
--- a/src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php
+++ b/src/Symfony/Component/EventDispatcher/Tests/EventDispatcherTest.php
@@ -257,7 +257,7 @@ class EventDispatcherTest extends \PHPUnit_Framework_TestCase
{
$dispatcher = new EventDispatcher();
$dispatcher->addListener('bug.62976', new CallableClass());
- $dispatcher->removeListener('bug.62976', function() {});
+ $dispatcher->removeListener('bug.62976', function () {});
$this->assertTrue($dispatcher->hasListeners('bug.62976'));
}
}
diff --git a/src/Symfony/Component/Finder/Finder.php b/src/Symfony/Component/Finder/Finder.php
index 43a8643650..c075e0ff85 100644
--- a/src/Symfony/Component/Finder/Finder.php
+++ b/src/Symfony/Component/Finder/Finder.php
@@ -157,7 +157,7 @@ class Finder implements \IteratorAggregate, \Countable
*/
public function getAdapters()
{
- return array_values(array_map(function(array $adapter) {
+ return array_values(array_map(function (array $adapter) {
return $adapter['adapter'];
}, $this->adapters));
}
diff --git a/src/Symfony/Component/Finder/Shell/Command.php b/src/Symfony/Component/Finder/Shell/Command.php
index 5fcfed803f..54f4f176fb 100644
--- a/src/Symfony/Component/Finder/Shell/Command.php
+++ b/src/Symfony/Component/Finder/Shell/Command.php
@@ -272,10 +272,10 @@ class Command
public function join()
{
return implode(' ', array_filter(
- array_map(function($bit) {
+ array_map(function ($bit) {
return $bit instanceof Command ? $bit->join() : ($bit ?: null);
}, $this->bits),
- function($bit) { return null !== $bit; }
+ function ($bit) { return null !== $bit; }
));
}
diff --git a/src/Symfony/Component/Finder/Tests/FinderTest.php b/src/Symfony/Component/Finder/Tests/FinderTest.php
index 4fe3cc16f4..28ebf50ab3 100644
--- a/src/Symfony/Component/Finder/Tests/FinderTest.php
+++ b/src/Symfony/Component/Finder/Tests/FinderTest.php
@@ -583,7 +583,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
$this->assertEquals(
array('c', 'e', 'a', 'd', 'b'),
- array_map(function(Adapter\AdapterInterface $adapter) {
+ array_map(function (Adapter\AdapterInterface $adapter) {
return $adapter->getName();
}, $finder->getAdapters())
);
@@ -609,7 +609,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
public function getAdaptersTestData()
{
return array_map(
- function ($adapter) { return array($adapter); },
+ function ($adapter) { return array($adapter); },
$this->getValidAdapters()
);
}
@@ -791,7 +791,7 @@ class FinderTest extends Iterator\RealIteratorTestCase
new Adapter\GnuFindAdapter(),
new Adapter\PhpAdapter()
),
- function (Adapter\AdapterInterface $adapter) {
+ function (Adapter\AdapterInterface $adapter) {
return $adapter->isSupported();
}
);
diff --git a/src/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php b/src/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php
index 6d8ae39561..eb0adfad0a 100644
--- a/src/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php
+++ b/src/Symfony/Component/Finder/Tests/Iterator/MockFileListIterator.php
@@ -15,7 +15,7 @@ class MockFileListIterator extends \ArrayIterator
{
public function __construct(array $filesArray = array())
{
- $files = array_map(function($file){ return new MockSplFileInfo($file); }, $filesArray);
+ $files = array_map(function ($file) { return new MockSplFileInfo($file); }, $filesArray);
parent::__construct($files);
}
}
diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php
index cbe66f7249..dc504172a0 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Constraints/FormValidatorTest.php
@@ -398,7 +398,7 @@ class FormValidatorTest extends \PHPUnit_Framework_TestCase
{
$context = $this->getMockExecutionContext();
$object = $this->getMock('\stdClass');
- $options = array('validation_groups' => function(FormInterface $form){
+ $options = array('validation_groups' => function (FormInterface $form) {
return array('group1', 'group2');
});
$form = $this->getBuilder('name', '\stdClass', $options)
@@ -533,7 +533,7 @@ class FormValidatorTest extends \PHPUnit_Framework_TestCase
$object = $this->getMock('\stdClass');
$parentOptions = array(
- 'validation_groups' => function(FormInterface $form){
+ 'validation_groups' => function (FormInterface $form) {
return array('group1', 'group2');
},
'cascade_validation' => true,
diff --git a/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php b/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php
index fd437c50ea..527de1616b 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Validator/Type/BaseValidatorExtensionTest.php
@@ -64,7 +64,7 @@ abstract class BaseValidatorExtensionTest extends TypeTestCase
public function testValidationGroupsCanBeSetToClosure()
{
$form = $this->createForm(array(
- 'validation_groups' => function(FormInterface $form){ return null; },
+ 'validation_groups' => function (FormInterface $form) { return null; },
));
$this->assertTrue(is_callable($form->getConfig()->getOption('validation_groups')));
diff --git a/src/Symfony/Component/HttpFoundation/AcceptHeaderItem.php b/src/Symfony/Component/HttpFoundation/AcceptHeaderItem.php
index 9d4c3132d3..0cec4eda13 100644
--- a/src/Symfony/Component/HttpFoundation/AcceptHeaderItem.php
+++ b/src/Symfony/Component/HttpFoundation/AcceptHeaderItem.php
@@ -90,7 +90,7 @@ class AcceptHeaderItem
{
$string = $this->value.($this->quality < 1 ? ';q='.$this->quality : '');
if (count($this->attributes) > 0) {
- $string .= ';'.implode(';', array_map(function($name, $value) {
+ $string .= ';'.implode(';', array_map(function ($name, $value) {
return sprintf(preg_match('/[,;=]/', $value) ? '%s="%s"' : '%s=%s', $name, $value);
}, array_keys($this->attributes), $this->attributes));
}
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
index 885d558f27..d168ce6379 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
@@ -90,7 +90,7 @@ class MongoDbSessionHandlerTest extends \PHPUnit_Framework_TestCase
$collection->expects($this->once())
->method('update')
- ->will($this->returnCallback(function($criteria, $updateData, $options) use ($that, &$data) {
+ ->will($this->returnCallback(function ($criteria, $updateData, $options) use ($that, &$data) {
$that->assertEquals(array($that->options['id_field'] => 'foo'), $criteria);
$that->assertEquals(array('upsert' => true, 'multiple' => false), $options);
@@ -118,7 +118,7 @@ class MongoDbSessionHandlerTest extends \PHPUnit_Framework_TestCase
$collection->expects($this->exactly(2))
->method('update')
- ->will($this->returnCallback(function($criteria, $updateData, $options) use (&$data) {
+ ->will($this->returnCallback(function ($criteria, $updateData, $options) use (&$data) {
$data = $updateData;
}));
@@ -161,7 +161,7 @@ class MongoDbSessionHandlerTest extends \PHPUnit_Framework_TestCase
$collection->expects($this->once())
->method('remove')
- ->will($this->returnCallback(function($criteria) use ($that) {
+ ->will($this->returnCallback(function ($criteria) use ($that) {
$that->assertInstanceOf('MongoDate', $criteria[$that->options['time_field']]['$lt']);
$that->assertGreaterThanOrEqual(time() - -1, $criteria[$that->options['time_field']]['$lt']->sec);
}));
diff --git a/src/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php
index 69ff973054..fd6bd96e2d 100644
--- a/src/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php
+++ b/src/Symfony/Component/HttpKernel/Profiler/BaseMemcacheProfilerStorage.php
@@ -89,7 +89,7 @@ abstract class BaseMemcacheProfilerStorage implements ProfilerStorageInterface
--$limit;
}
- usort($result, function($a, $b) {
+ usort($result, function ($a, $b) {
if ($a['time'] === $b['time']) {
return 0;
}
diff --git a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php
index 8c14604b28..cd0251c1ee 100644
--- a/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/DataCollector/RequestDataCollectorTest.php
@@ -80,7 +80,7 @@ class RequestDataCollectorTest extends \PHPUnit_Framework_TestCase
array(
'Closure',
- function() { return 'foo'; },
+ function () { return 'foo'; },
array(
'class' => __NAMESPACE__.'\{closure}',
'method' => null,
diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ContainerAwareHttpKernelTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ContainerAwareHttpKernelTest.php
index 61372cd3a0..5f24cf8c85 100644
--- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ContainerAwareHttpKernelTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/ContainerAwareHttpKernelTest.php
@@ -78,7 +78,7 @@ class ContainerAwareHttpKernelTest extends \PHPUnit_Framework_TestCase
$resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface');
$kernel = new ContainerAwareHttpKernel($dispatcher, $container, $resolver);
- $controller = function() use ($expected) {
+ $controller = function () use ($expected) {
return $expected;
};
@@ -136,7 +136,7 @@ class ContainerAwareHttpKernelTest extends \PHPUnit_Framework_TestCase
$resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface');
$kernel = new ContainerAwareHttpKernel($dispatcher, $container, $resolver);
- $controller = function() use ($expected) {
+ $controller = function () use ($expected) {
throw $expected;
};
diff --git a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
index 30e253d40b..f4d689f3a7 100644
--- a/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
@@ -252,7 +252,7 @@ class HttpKernelTest extends \PHPUnit_Framework_TestCase
protected function getResolver($controller = null)
{
if (null === $controller) {
- $controller = function() { return new Response('Hello'); };
+ $controller = function () { return new Response('Hello'); };
}
$resolver = $this->getMock('Symfony\\Component\\HttpKernel\\Controller\\ControllerResolverInterface');
diff --git a/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php b/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php
index b89db3630e..5e536abe49 100644
--- a/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php
+++ b/src/Symfony/Component/Intl/DateFormatter/DateFormat/FullTransformer.php
@@ -91,7 +91,7 @@ class FullTransformer
{
$that = $this;
- $formatted = preg_replace_callback($this->regExp, function($matches) use ($that, $dateTime) {
+ $formatted = preg_replace_callback($this->regExp, function ($matches) use ($that, $dateTime) {
return $that->formatReplace($matches[0], $dateTime);
}, $this->pattern);
@@ -185,7 +185,7 @@ class FullTransformer
// when parsing a date/time value
$escapedPattern = preg_replace('/\\\[\-|\/]/', '[\/\-]', $escapedPattern);
- $reverseMatchingRegExp = preg_replace_callback($this->regExp, function($matches) use ($that) {
+ $reverseMatchingRegExp = preg_replace_callback($this->regExp, function ($matches) use ($that) {
$length = strlen($matches[0]);
$transformerIndex = $matches[0][0];
@@ -245,7 +245,7 @@ class FullTransformer
{
$specialCharsArray = str_split($specialChars);
- $specialCharsMatch = implode('|', array_map(function($char) {
+ $specialCharsMatch = implode('|', array_map(function ($char) {
return $char.'+';
}, $specialCharsArray));
diff --git a/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php b/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php
index 30c15af77e..c36fa7e600 100644
--- a/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php
+++ b/src/Symfony/Component/Intl/DateFormatter/DateFormat/MonthTransformer.php
@@ -60,7 +60,7 @@ class MonthTransformer extends Transformer
public function __construct()
{
if (0 === count(self::$shortMonths)) {
- self::$shortMonths = array_map(function($month) {
+ self::$shortMonths = array_map(function ($month) {
return substr($month, 0, 3);
}, self::$months);
diff --git a/src/Symfony/Component/Process/Tests/SignalListener.php b/src/Symfony/Component/Process/Tests/SignalListener.php
index 0bf191e371..143515d4dc 100644
--- a/src/Symfony/Component/Process/Tests/SignalListener.php
+++ b/src/Symfony/Component/Process/Tests/SignalListener.php
@@ -3,7 +3,7 @@
// required for signal handling
declare(ticks = 1);
-pcntl_signal(SIGUSR1, function(){echo "Caught SIGUSR1"; exit;});
+pcntl_signal(SIGUSR1, function () {echo "Caught SIGUSR1"; exit;});
$n=0;
diff --git a/src/Symfony/Component/Routing/Tests/Fixtures/CustomXmlFileLoader.php b/src/Symfony/Component/Routing/Tests/Fixtures/CustomXmlFileLoader.php
index 12a5bedb4f..2e9b028de8 100644
--- a/src/Symfony/Component/Routing/Tests/Fixtures/CustomXmlFileLoader.php
+++ b/src/Symfony/Component/Routing/Tests/Fixtures/CustomXmlFileLoader.php
@@ -21,6 +21,6 @@ class CustomXmlFileLoader extends XmlFileLoader
{
protected function loadFile($file)
{
- return XmlUtils::loadFile($file, function() { return true; });
+ return XmlUtils::loadFile($file, function () { return true; });
}
}
diff --git a/src/Symfony/Component/Security/Tests/Core/Util/SecureRandomTest.php b/src/Symfony/Component/Security/Tests/Core/Util/SecureRandomTest.php
index c7ed016673..38e91212f4 100644
--- a/src/Symfony/Component/Security/Tests/Core/Util/SecureRandomTest.php
+++ b/src/Symfony/Component/Security/Tests/Core/Util/SecureRandomTest.php
@@ -68,7 +68,7 @@ class SecureRandomTest extends \PHPUnit_Framework_TestCase
$runs[$i] = 0;
}
- $addRun = function($run) use (&$runs) {
+ $addRun = function ($run) use (&$runs) {
if ($run > 6) {
$run = 6;
}
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php
index c1618b6771..9267fdb872 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/ChoiceValidatorTest.php
@@ -105,7 +105,7 @@ class ChoiceValidatorTest extends \PHPUnit_Framework_TestCase
public function testValidChoiceCallbackClosure()
{
- $constraint = new Choice(array('callback' => function() {
+ $constraint = new Choice(array('callback' => function () {
return array('foo', 'bar');
}));
diff --git a/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataFactoryTest.php b/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataFactoryTest.php
index 6f842cd6d1..bee4025d0d 100644
--- a/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataFactoryTest.php
+++ b/src/Symfony/Component/Validator/Tests/Mapping/ClassMetadataFactoryTest.php
@@ -77,7 +77,7 @@ class ClassMetadataFactoryTest extends \PHPUnit_Framework_TestCase
->will($this->returnValue(false));
$cache->expects($this->once())
->method('write')
- ->will($this->returnCallback(function($metadata) use ($tester, $constraints) {
+ ->will($this->returnCallback(function ($metadata) use ($tester, $constraints) {
$tester->assertEquals($constraints, $metadata->getConstraints());
}));
diff --git a/src/Symfony/Component/Yaml/Unescaper.php b/src/Symfony/Component/Yaml/Unescaper.php
index c5e9abd066..1b8eeed57a 100644
--- a/src/Symfony/Component/Yaml/Unescaper.php
+++ b/src/Symfony/Component/Yaml/Unescaper.php
@@ -49,7 +49,7 @@ class Unescaper
public function unescapeDoubleQuotedString($value)
{
$self = $this;
- $callback = function($match) use ($self) {
+ $callback = function ($match) use ($self) {
return $self->unescapeCharacter($match[0]);
};