minor #12362 [2.5] Remove aligned '=>' and '=' (disquedur)

This PR was merged into the 2.5 branch.

Discussion
----------

[2.5] Remove aligned '=>' and '='

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | [https://github.com/symfony/symfony/issues/12284]
| License       | MIT

PR for 2.3 branch : https://github.com/symfony/symfony/pull/12293

Commits
-------

e638ccb Remove aligned '=>' and '='
This commit is contained in:
Fabien Potencier 2014-10-31 02:05:12 +01:00
commit b2ddfa8c3b
35 changed files with 167 additions and 167 deletions

View File

@ -382,9 +382,9 @@ abstract class AbstractDoctrineExtension extends Extension
if (!isset($cacheDriver['namespace'])) {
// generate a unique namespace for the given application
$env = $container->getParameter('kernel.root_dir').$container->getParameter('kernel.environment');
$hash = hash('sha256', $env);
$namespace = 'sf2'.$this->getMappingResourceExtension().'_'.$objectManagerName.'_'.$hash;
$env = $container->getParameter('kernel.root_dir').$container->getParameter('kernel.environment');
$hash = hash('sha256', $env);
$namespace = 'sf2'.$this->getMappingResourceExtension().'_'.$objectManagerName.'_'.$hash;
$cacheDriver['namespace'] = $namespace;
}

View File

@ -70,10 +70,10 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
*/
public function testLoadBasicCacheDriver($class, array $config, array $expectedCalls = array())
{
$container = $this->createContainer();
$cacheName = 'metadata_cache';
$objectManager = array(
'name' => 'default',
$container = $this->createContainer();
$cacheName = 'metadata_cache';
$objectManager = array(
'name' => 'default',
'metadata_cache_driver' => $config,
);
@ -81,10 +81,10 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
$this->assertTrue($container->hasDefinition('doctrine.orm.default_metadata_cache'));
$definition = $container->getDefinition('doctrine.orm.default_metadata_cache');
$defCalls = $definition->getMethodCalls();
$definition = $container->getDefinition('doctrine.orm.default_metadata_cache');
$defCalls = $definition->getMethodCalls();
$expectedCalls[] = 'setNamespace';
$actualCalls = array_map(function ($call) {
$actualCalls = array_map(function ($call) {
return $call[0];
}, $defCalls);
@ -98,14 +98,14 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
public function testServiceCacheDriver()
{
$cacheName = 'metadata_cache';
$container = $this->createContainer();
$definition = new Definition('%doctrine.orm.cache.apc.class%');
$objectManager = array(
'name' => 'default',
$cacheName = 'metadata_cache';
$container = $this->createContainer();
$definition = new Definition('%doctrine.orm.cache.apc.class%');
$objectManager = array(
'name' => 'default',
'metadata_cache_driver' => array(
'type' => 'service',
'id' => 'service_driver',
'id' => 'service_driver',
),
);
@ -122,10 +122,10 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
*/
public function testUnrecognizedCacheDriverException()
{
$cacheName = 'metadata_cache';
$container = $this->createContainer();
$objectManager = array(
'name' => 'default',
$cacheName = 'metadata_cache';
$container = $this->createContainer();
$objectManager = array(
'name' => 'default',
'metadata_cache_driver' => array(
'type' => 'unrecognized_type',
),
@ -151,12 +151,12 @@ class DoctrineExtensionTest extends \PHPUnit_Framework_TestCase
protected function createContainer(array $data = array())
{
return new ContainerBuilder(new ParameterBag(array_merge(array(
'kernel.bundles' => array('FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle'),
'kernel.cache_dir' => __DIR__,
'kernel.debug' => false,
'kernel.bundles' => array('FrameworkBundle' => 'Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle'),
'kernel.cache_dir' => __DIR__,
'kernel.debug' => false,
'kernel.environment' => 'test',
'kernel.name' => 'kernel',
'kernel.root_dir' => __DIR__,
'kernel.name' => 'kernel',
'kernel.root_dir' => __DIR__,
), $data)));
}
}

View File

@ -30,16 +30,16 @@ class ConsoleFormatter extends LineFormatter
{
if ($record['level'] >= Logger::ERROR) {
$record['start_tag'] = '<error>';
$record['end_tag'] = '</error>';
$record['end_tag'] = '</error>';
} elseif ($record['level'] >= Logger::NOTICE) {
$record['start_tag'] = '<comment>';
$record['end_tag'] = '</comment>';
$record['end_tag'] = '</comment>';
} elseif ($record['level'] >= Logger::INFO) {
$record['start_tag'] = '<info>';
$record['end_tag'] = '</info>';
$record['end_tag'] = '</info>';
} else {
$record['start_tag'] = '';
$record['end_tag'] = '';
$record['end_tag'] = '';
}
return parent::format($record);

View File

@ -168,15 +168,15 @@ class JsonDescriptor extends Descriptor
unset($requirements['_scheme'], $requirements['_method']);
return array(
'path' => $route->getPath(),
'host' => '' !== $route->getHost() ? $route->getHost() : 'ANY',
'scheme' => $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY',
'method' => $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY',
'class' => get_class($route),
'defaults' => $route->getDefaults(),
'path' => $route->getPath(),
'host' => '' !== $route->getHost() ? $route->getHost() : 'ANY',
'scheme' => $route->getSchemes() ? implode('|', $route->getSchemes()) : 'ANY',
'method' => $route->getMethods() ? implode('|', $route->getMethods()) : 'ANY',
'class' => get_class($route),
'defaults' => $route->getDefaults(),
'requirements' => $requirements ?: 'NO CUSTOM',
'options' => $route->getOptions(),
'pathRegex' => $route->compile()->getRegex(),
'options' => $route->getOptions(),
'pathRegex' => $route->compile()->getRegex(),
);
}
@ -189,11 +189,11 @@ class JsonDescriptor extends Descriptor
private function getContainerDefinitionData(Definition $definition, $omitTags = false)
{
$data = array(
'class' => (string) $definition->getClass(),
'scope' => $definition->getScope(),
'public' => $definition->isPublic(),
'class' => (string) $definition->getClass(),
'scope' => $definition->getScope(),
'public' => $definition->isPublic(),
'synthetic' => $definition->isSynthetic(),
'file' => $definition->getFile(),
'file' => $definition->getFile(),
);
if (!$omitTags) {
@ -219,7 +219,7 @@ class JsonDescriptor extends Descriptor
{
return array(
'service' => (string) $alias,
'public' => $alias->isPublic(),
'public' => $alias->isPublic(),
);
}
}

View File

@ -133,9 +133,9 @@ abstract class AbstractDescriptorTest extends \PHPUnit_Framework_TestCase
{
$variations = array(
'services' => array('show_private' => true),
'public' => array('show_private' => false),
'tag1' => array('show_private' => true, 'tag' => 'tag1'),
'tags' => array('group_by' => 'tags', 'show_private' => true),
'public' => array('show_private' => false),
'tag1' => array('show_private' => true, 'tag' => 'tag1'),
'tags' => array('group_by' => 'tags', 'show_private' => true),
);
$data = array();

View File

@ -59,9 +59,9 @@ class ObjectsProvider
return array(
'parameters_1' => new ParameterBag(array(
'integer' => 12,
'string' => 'Hello world!',
'string' => 'Hello world!',
'boolean' => true,
'array' => array(12, 'Hello world!', true),
'array' => array(12, 'Hello world!', true),
)),
);
}

View File

@ -126,10 +126,10 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
'validation' => array(
'enabled' => false,
'enable_annotations' => false,
'static_method' => array('loadValidatorMetadata'),
'static_method' => array('loadValidatorMetadata'),
'translation_domain' => 'validators',
'strict_email' => false,
'api' => version_compare(PHP_VERSION, '5.3.9', '<') ? '2.4' : '2.5-bc',
'strict_email' => false,
'api' => version_compare(PHP_VERSION, '5.3.9', '<') ? '2.4' : '2.5-bc',
),
'annotations' => array(
'cache' => 'file',

View File

@ -3,7 +3,7 @@
$container->loadFromExtension('framework', array(
'secret' => 's3cr3t',
'validation' => array(
'enabled' => true,
'api' => '2.4',
'enabled' => true,
'api' => '2.4',
),
));

View File

@ -3,7 +3,7 @@
$container->loadFromExtension('framework', array(
'secret' => 's3cr3t',
'validation' => array(
'enabled' => true,
'api' => '2.5',
'enabled' => true,
'api' => '2.5',
),
));

View File

@ -3,7 +3,7 @@
$container->loadFromExtension('framework', array(
'secret' => 's3cr3t',
'validation' => array(
'enabled' => true,
'api' => '2.5-bc',
'enabled' => true,
'api' => '2.5-bc',
),
));

View File

@ -3,7 +3,7 @@
$container->loadFromExtension('framework', array(
'secret' => 's3cr3t',
'validation' => array(
'enabled' => true,
'api' => 'auto',
'enabled' => true,
'api' => 'auto',
),
));

View File

@ -3,6 +3,6 @@
$container->loadFromExtension('framework', array(
'secret' => 's3cr3t',
'validation' => array(
'enabled' => true,
'enabled' => true,
),
));

View File

@ -3,7 +3,7 @@
$container->loadFromExtension('framework', array(
'secret' => 's3cr3t',
'validation' => array(
'enabled' => true,
'static_method' => array('loadFoo', 'loadBar'),
'enabled' => true,
'static_method' => array('loadFoo', 'loadBar'),
),
));

View File

@ -3,7 +3,7 @@
$container->loadFromExtension('framework', array(
'secret' => 's3cr3t',
'validation' => array(
'enabled' => true,
'static_method' => false,
'enabled' => true,
'static_method' => false,
),
));

View File

@ -67,12 +67,12 @@ class RedirectableUrlMatcherTest extends \PHPUnit_Framework_TestCase
$this->assertEquals(array(
'_controller' => 'Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction',
'path' => '/foo',
'permanent' => true,
'scheme' => 'https',
'httpPort' => $context->getHttpPort(),
'httpsPort' => $context->getHttpsPort(),
'_route' => 'foo',
'path' => '/foo',
'permanent' => true,
'scheme' => 'https',
'httpPort' => $context->getHttpPort(),
'httpsPort' => $context->getHttpsPort(),
'_route' => 'foo',
),
$matcher->match('/foo')
);

View File

@ -64,9 +64,9 @@ class PhpEngineTest extends TestCase
protected function getContainer()
{
$container = new Container();
$session = new Session(new MockArraySessionStorage());
$request = new Request();
$stack = new RequestStack();
$session = new Session(new MockArraySessionStorage());
$request = new Request();
$stack = new RequestStack();
$stack->push($request);
$request->setSession($session);

View File

@ -26,7 +26,7 @@ class Translator extends BaseTranslator
protected $container;
protected $options = array(
'cache_dir' => null,
'debug' => false,
'debug' => false,
);
protected $loaderIds;

View File

@ -129,7 +129,7 @@ class XmlReferenceDumper
// get attributes
// metadata
$name = str_replace('_', '-', $child->getName());
$name = str_replace('_', '-', $child->getName());
$value = '%%%%not_defined%%%%'; // use a string which isn't used in the normal world
// comments

View File

@ -83,7 +83,7 @@ EOF
$helper = new DescriptorHelper();
$helper->describe($output, $this->command, array(
'format' => $input->getOption('format'),
'raw' => $input->getOption('raw'),
'raw' => $input->getOption('raw'),
));
$this->command = null;

View File

@ -74,8 +74,8 @@ EOF
$helper = new DescriptorHelper();
$helper->describe($output, $this->getApplication(), array(
'format' => $input->getOption('format'),
'raw_text' => $input->getOption('raw'),
'format' => $input->getOption('format'),
'raw_text' => $input->getOption('raw'),
'namespace' => $input->getArgument('namespace'),
));
}

View File

@ -97,11 +97,11 @@ class JsonDescriptor extends Descriptor
private function getInputArgumentData(InputArgument $argument)
{
return array(
'name' => $argument->getName(),
'name' => $argument->getName(),
'is_required' => $argument->isRequired(),
'is_array' => $argument->isArray(),
'is_array' => $argument->isArray(),
'description' => $argument->getDescription(),
'default' => $argument->getDefault(),
'default' => $argument->getDefault(),
);
}
@ -113,13 +113,13 @@ class JsonDescriptor extends Descriptor
private function getInputOptionData(InputOption $option)
{
return array(
'name' => '--'.$option->getName(),
'shortcut' => $option->getShortcut() ? '-'.implode('|-', explode('|', $option->getShortcut())) : '',
'accept_value' => $option->acceptValue(),
'name' => '--'.$option->getName(),
'shortcut' => $option->getShortcut() ? '-'.implode('|-', explode('|', $option->getShortcut())) : '',
'accept_value' => $option->acceptValue(),
'is_value_required' => $option->isValueRequired(),
'is_multiple' => $option->isArray(),
'description' => $option->getDescription(),
'default' => $option->getDefault(),
'is_multiple' => $option->isArray(),
'description' => $option->getDescription(),
'default' => $option->getDefault(),
);
}
@ -154,12 +154,12 @@ class JsonDescriptor extends Descriptor
$command->mergeApplicationDefinition(false);
return array(
'name' => $command->getName(),
'usage' => $command->getSynopsis(),
'name' => $command->getName(),
'usage' => $command->getSynopsis(),
'description' => $command->getDescription(),
'help' => $command->getProcessedHelp(),
'aliases' => $command->getAliases(),
'definition' => $this->getInputDefinitionData($command->getNativeDefinition()),
'help' => $command->getProcessedHelp(),
'aliases' => $command->getAliases(),
'definition' => $this->getInputDefinitionData($command->getNativeDefinition()),
);
}
}

View File

@ -59,8 +59,8 @@ class DescriptorHelper extends Helper
public function describe(OutputInterface $output, $object, array $options = array())
{
$options = array_merge(array(
'raw_text' => false,
'format' => 'txt',
'raw_text' => false,
'format' => 'txt',
), $options);
if (!isset($this->descriptors[$options['format']])) {

View File

@ -23,12 +23,12 @@ use Symfony\Component\Console\Output\OutputInterface;
class ProgressBar
{
// options
private $barWidth = 28;
private $barChar = '=';
private $barWidth = 28;
private $barChar = '=';
private $emptyBarChar = '-';
private $progressChar = '>';
private $format = null;
private $redrawFreq = 1;
private $format = null;
private $redrawFreq = 1;
/**
* @var OutputInterface
@ -543,17 +543,17 @@ class ProgressBar
private static function initFormats()
{
return array(
'normal' => ' %current%/%max% [%bar%] %percent:3s%%',
'normal_nomax' => ' %current% [%bar%]',
'normal' => ' %current%/%max% [%bar%] %percent:3s%%',
'normal_nomax' => ' %current% [%bar%]',
'verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%',
'verbose_nomax' => ' %current% [%bar%] %elapsed:6s%',
'verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%',
'verbose_nomax' => ' %current% [%bar%] %elapsed:6s%',
'very_verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s%',
'very_verbose' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s%',
'very_verbose_nomax' => ' %current% [%bar%] %elapsed:6s%',
'debug' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%',
'debug_nomax' => ' %current% [%bar%] %elapsed:6s% %memory:6s%',
'debug' => ' %current%/%max% [%bar%] %percent:3s%% %elapsed:6s%/%estimated:-6s% %memory:6s%',
'debug_nomax' => ' %current% [%bar%] %elapsed:6s% %memory:6s%',
);
}
}

View File

@ -283,10 +283,10 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface
$line = null;
}
$info += array(
'type' => 'Function',
'type' => 'Function',
'function' => $listener,
'file' => $file,
'line' => $line,
'file' => $file,
'line' => $line,
'pretty' => $listener,
);
} elseif (is_array($listener) || (is_object($listener) && is_callable($listener))) {
@ -303,11 +303,11 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface
$line = null;
}
$info += array(
'type' => 'Method',
'type' => 'Method',
'class' => $class,
'method' => $listener[1],
'file' => $file,
'line' => $line,
'file' => $file,
'line' => $line,
'pretty' => $class.'::'.$listener[1],
);
}

View File

@ -16,15 +16,15 @@ use Symfony\Component\ExpressionLanguage\Compiler;
class BinaryNode extends Node
{
private static $operators = array(
'~' => '.',
'~' => '.',
'and' => '&&',
'or' => '||',
'or' => '||',
);
private static $functions = array(
'**' => 'pow',
'..' => 'range',
'in' => 'in_array',
'**' => 'pow',
'..' => 'range',
'in' => 'in_array',
'not in' => '!in_array',
);

View File

@ -38,37 +38,37 @@ class Parser
$this->unaryOperators = array(
'not' => array('precedence' => 50),
'!' => array('precedence' => 50),
'-' => array('precedence' => 500),
'+' => array('precedence' => 500),
'!' => array('precedence' => 50),
'-' => array('precedence' => 500),
'+' => array('precedence' => 500),
);
$this->binaryOperators = array(
'or' => array('precedence' => 10, 'associativity' => Parser::OPERATOR_LEFT),
'||' => array('precedence' => 10, 'associativity' => Parser::OPERATOR_LEFT),
'and' => array('precedence' => 15, 'associativity' => Parser::OPERATOR_LEFT),
'&&' => array('precedence' => 15, 'associativity' => Parser::OPERATOR_LEFT),
'|' => array('precedence' => 16, 'associativity' => Parser::OPERATOR_LEFT),
'^' => array('precedence' => 17, 'associativity' => Parser::OPERATOR_LEFT),
'&' => array('precedence' => 18, 'associativity' => Parser::OPERATOR_LEFT),
'==' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'===' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'!=' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'!==' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'<' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'>' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'>=' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'<=' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'not in' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'in' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'or' => array('precedence' => 10, 'associativity' => Parser::OPERATOR_LEFT),
'||' => array('precedence' => 10, 'associativity' => Parser::OPERATOR_LEFT),
'and' => array('precedence' => 15, 'associativity' => Parser::OPERATOR_LEFT),
'&&' => array('precedence' => 15, 'associativity' => Parser::OPERATOR_LEFT),
'|' => array('precedence' => 16, 'associativity' => Parser::OPERATOR_LEFT),
'^' => array('precedence' => 17, 'associativity' => Parser::OPERATOR_LEFT),
'&' => array('precedence' => 18, 'associativity' => Parser::OPERATOR_LEFT),
'==' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'===' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'!=' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'!==' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'<' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'>' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'>=' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'<=' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'not in' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'in' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'matches' => array('precedence' => 20, 'associativity' => Parser::OPERATOR_LEFT),
'..' => array('precedence' => 25, 'associativity' => Parser::OPERATOR_LEFT),
'+' => array('precedence' => 30, 'associativity' => Parser::OPERATOR_LEFT),
'-' => array('precedence' => 30, 'associativity' => Parser::OPERATOR_LEFT),
'~' => array('precedence' => 40, 'associativity' => Parser::OPERATOR_LEFT),
'*' => array('precedence' => 60, 'associativity' => Parser::OPERATOR_LEFT),
'/' => array('precedence' => 60, 'associativity' => Parser::OPERATOR_LEFT),
'%' => array('precedence' => 60, 'associativity' => Parser::OPERATOR_LEFT),
'**' => array('precedence' => 200, 'associativity' => Parser::OPERATOR_RIGHT),
'..' => array('precedence' => 25, 'associativity' => Parser::OPERATOR_LEFT),
'+' => array('precedence' => 30, 'associativity' => Parser::OPERATOR_LEFT),
'-' => array('precedence' => 30, 'associativity' => Parser::OPERATOR_LEFT),
'~' => array('precedence' => 40, 'associativity' => Parser::OPERATOR_LEFT),
'*' => array('precedence' => 60, 'associativity' => Parser::OPERATOR_LEFT),
'/' => array('precedence' => 60, 'associativity' => Parser::OPERATOR_LEFT),
'%' => array('precedence' => 60, 'associativity' => Parser::OPERATOR_LEFT),
'**' => array('precedence' => 200, 'associativity' => Parser::OPERATOR_RIGHT),
);
}

View File

@ -22,11 +22,11 @@ class Token
public $type;
public $cursor;
const EOF_TYPE = 'end of expression';
const NAME_TYPE = 'name';
const NUMBER_TYPE = 'number';
const STRING_TYPE = 'string';
const OPERATOR_TYPE = 'operator';
const EOF_TYPE = 'end of expression';
const NAME_TYPE = 'name';
const NUMBER_TYPE = 'number';
const STRING_TYPE = 'string';
const OPERATOR_TYPE = 'operator';
const PUNCTUATION_TYPE = 'punctuation';
/**

View File

@ -43,7 +43,7 @@ class TimeDataCollector extends DataCollector implements LateDataCollectorInterf
}
$this->data = array(
'token' => $response->headers->get('X-Debug-Token'),
'token' => $response->headers->get('X-Debug-Token'),
'start_time' => $startTime * 1000,
'events' => array(),
);

View File

@ -87,7 +87,7 @@ class ProfilerListenerTest extends \PHPUnit_Framework_TestCase
->getMock();
$onlyException = true;
$listener = new ProfilerListener($profiler, null, $onlyException);
$listener = new ProfilerListener($profiler, null, $onlyException);
// master request
$listener->onKernelRequest(new GetResponseEvent($kernel, $masterRequest, Kernel::MASTER_REQUEST));

View File

@ -225,9 +225,9 @@ class NumberFormatter
*/
private static $customRoundingList = array(
self::ROUND_CEILING => true,
self::ROUND_FLOOR => true,
self::ROUND_DOWN => true,
self::ROUND_UP => true,
self::ROUND_FLOOR => true,
self::ROUND_DOWN => true,
self::ROUND_UP => true,
);
/**

View File

@ -209,14 +209,14 @@ abstract class AnnotationClassLoader implements LoaderInterface
protected function getGlobals(\ReflectionClass $class)
{
$globals = array(
'path' => '',
'path' => '',
'requirements' => array(),
'options' => array(),
'defaults' => array(),
'schemes' => array(),
'methods' => array(),
'host' => '',
'condition' => '',
'options' => array(),
'defaults' => array(),
'schemes' => array(),
'methods' => array(),
'host' => '',
'condition' => '',
);
if ($annot = $this->reader->getClassAnnotation($class, $this->routeAnnotationClass)) {

View File

@ -23,8 +23,8 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
class AccessDecisionManager implements AccessDecisionManagerInterface
{
const STRATEGY_AFFIRMATIVE = 'affirmative';
const STRATEGY_CONSENSUS = 'consensus';
const STRATEGY_UNANIMOUS = 'unanimous';
const STRATEGY_CONSENSUS = 'consensus';
const STRATEGY_UNANIMOUS = 'unanimous';
private $voters;
private $strategy;

View File

@ -74,9 +74,9 @@ class SimpleFormAuthenticationListener extends AbstractAuthenticationListener
$options = array_merge(array(
'username_parameter' => '_username',
'password_parameter' => '_password',
'csrf_parameter' => '_csrf_token',
'intention' => 'authenticate',
'post_only' => true,
'csrf_parameter' => '_csrf_token',
'intention' => 'authenticate',
'post_only' => true,
), $options);
parent::__construct($securityContext, $authenticationManager, $sessionStrategy, $httpUtils, $providerKey, $successHandler, $failureHandler, $options, $logger, $dispatcher);
}

View File

@ -265,7 +265,7 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase
$serializer = $this->getMock('Symfony\Component\Serializer\SerializerInterface');
$this->normalizer->setSerializer($serializer);
$obj = new GetSetDummy();
$obj = new GetSetDummy();
$object = new \stdClass();
$obj->setObject($object);

View File

@ -283,7 +283,7 @@ class ExecutionContextTest extends \PHPUnit_Framework_TestCase
$constraints = new Collection(array(
'shelves' => new All(array('constraints' => array(
new Collection(array(
'name' => new ConstraintA(),
'name' => new ConstraintA(),
'books' => new All(array('constraints' => array(
new ConstraintA(),
))),