Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 484d5b8

Browse filesBrowse files
committed
CS fix thanks to fabbot.io
1 parent b919fed commit 484d5b8
Copy full SHA for 484d5b8

File tree

Expand file treeCollapse file tree

10 files changed

+75
-140
lines changed
Filter options
Expand file treeCollapse file tree

10 files changed

+75
-140
lines changed

‎src/Symfony/Bridge/Doctrine/Security/SessionRegistry/SessionRegistryStorage.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Security/SessionRegistry/SessionRegistryStorage.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,19 +150,19 @@ private function getMergeSql()
150150
{
151151
switch ($this->connection->getDriver()->getName()) {
152152
case 'pdo_mysql':
153-
return "INSERT INTO $this->table (session_id, username, last_request, expired) VALUES (:session_id, :username, :last_request, :expired) " .
153+
return "INSERT INTO $this->table (session_id, username, last_request, expired) VALUES (:session_id, :username, :last_request, :expired) ".
154154
"ON DUPLICATE KEY UPDATE username = VALUES(username), last_request = VALUES(last_request), expired = VALUES(expired)";
155155
case 'pdo_oracle':
156156
// DUAL is Oracle specific dummy table
157-
return "MERGE INTO $this->table USING DUAL ON (session_id= :session_id) " .
158-
"WHEN NOT MATCHED THEN INSERT (session_id, username, last_request, expired) VALUES (:session_id, :username, :last_request, :expired) " .
157+
return "MERGE INTO $this->table USING DUAL ON (session_id= :session_id) ".
158+
"WHEN NOT MATCHED THEN INSERT (session_id, username, last_request, expired) VALUES (:session_id, :username, :last_request, :expired) ".
159159
"WHEN MATCHED THEN UPDATE SET username = :username, last_request = :last_request, expired = :expired";
160160
case 'pdo_sqlsrv':
161161
if (version_compare($this->connection->getWrappedConnection()->getAttribute(\PDO::ATTR_SERVER_VERSION), '10', '>=')) {
162162
// MERGE is only available since SQL Server 2008 and must be terminated by semicolon
163163
// It also requires HOLDLOCK according to http://weblogs.sqlteam.com/dang/archive/2009/01/31/UPSERT-Race-Condition-With-MERGE.aspx
164-
return "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON (session_id = :session_id) " .
165-
"WHEN NOT MATCHED THEN INSERT (session_id, username, last_request, expired) VALUES (:session_id, :username, :last_request, :expired) " .
164+
return "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON (session_id = :session_id) ".
165+
"WHEN NOT MATCHED THEN INSERT (session_id, username, last_request, expired) VALUES (:session_id, :username, :last_request, :expired) ".
166166
"WHEN MATCHED THEN UPDATE SET username = :username, last_request = :last_request, expired = :expired;";
167167
}
168168
case 'pdo_sqlite':

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
+13-26Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ public function getConfigTreeBuilder()
7070
->booleanNode('allow_if_equal_granted_denied')->defaultTrue()->end()
7171
->end()
7272
->end()
73-
->end()
74-
;
73+
->end();
7574

7675
$this->addAclSection($rootNode);
7776
$this->addEncodersSection($rootNode);
@@ -95,8 +94,7 @@ private function addSessionRegistrySection(ArrayNodeDefinition $rootNode)
9594
->scalarNode('session_registry_storage')->end()
9695
->end()
9796
->end()
98-
->end()
99-
;
97+
->end();
10098
}
10199

102100
private function addAclSection(ArrayNodeDefinition $rootNode)
@@ -135,8 +133,7 @@ private function addAclSection(ArrayNodeDefinition $rootNode)
135133
->end()
136134
->end()
137135
->end()
138-
->end()
139-
;
136+
->end();
140137
}
141138

142139
private function addRoleHierarchySection(ArrayNodeDefinition $rootNode)
@@ -156,8 +153,7 @@ private function addRoleHierarchySection(ArrayNodeDefinition $rootNode)
156153
->prototype('scalar')->end()
157154
->end()
158155
->end()
159-
->end()
160-
;
156+
->end();
161157
}
162158

163159
private function addAccessControlSection(ArrayNodeDefinition $rootNode)
@@ -196,8 +192,7 @@ private function addAccessControlSection(ArrayNodeDefinition $rootNode)
196192
->end()
197193
->end()
198194
->end()
199-
->end()
200-
;
195+
->end();
201196
}
202197

203198
private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $factories)
@@ -211,8 +206,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
211206
->disallowNewKeysInSubsequentConfigs()
212207
->useAttributeAsKey('name')
213208
->prototype('array')
214-
->children()
215-
;
209+
->children();
216210

217211
$firewallNodeBuilder
218212
->scalarNode('pattern')->end()
@@ -311,16 +305,14 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
311305
->booleanNode('error_if_maximum_exceeded')->defaultTrue()->end()
312306
->scalarNode('expiration_url')->defaultValue('/')->end()
313307
->end()
314-
->end()
315-
;
308+
->end();
316309

317310
$abstractFactoryKeys = array();
318311
foreach ($factories as $factoriesAtPosition) {
319312
foreach ($factoriesAtPosition as $factory) {
320313
$name = str_replace('-', '_', $factory->getKey());
321314
$factoryNode = $firewallNodeBuilder->arrayNode($name)
322-
->canBeUnset()
323-
;
315+
->canBeUnset();
324316

325317
if ($factory instanceof AbstractFactory) {
326318
$abstractFactoryKeys[] = $name;
@@ -350,8 +342,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
350342

351343
return $firewall;
352344
})
353-
->end()
354-
;
345+
->end();
355346
}
356347

357348
private function addProvidersSection(ArrayNodeDefinition $rootNode)
@@ -375,8 +366,7 @@ private function addProvidersSection(ArrayNodeDefinition $rootNode)
375366
->isRequired()
376367
->requiresAtLeastOneElement()
377368
->useAttributeAsKey('name')
378-
->prototype('array')
379-
;
369+
->prototype('array');
380370

381371
$providerNodeBuilder
382372
->children()
@@ -393,8 +383,7 @@ private function addProvidersSection(ArrayNodeDefinition $rootNode)
393383
->end()
394384
->end()
395385
->end()
396-
->end()
397-
;
386+
->end();
398387

399388
foreach ($this->userProviderFactories as $factory) {
400389
$name = str_replace('-', '_', $factory->getKey());
@@ -411,8 +400,7 @@ private function addProvidersSection(ArrayNodeDefinition $rootNode)
411400
->validate()
412401
->ifTrue(function ($v) {return count($v) === 0;})
413402
->thenInvalid('You must set a provider definition for the provider.')
414-
->end()
415-
;
403+
->end();
416404
}
417405

418406
private function addEncodersSection(ArrayNodeDefinition $rootNode)
@@ -451,7 +439,6 @@ private function addEncodersSection(ArrayNodeDefinition $rootNode)
451439
->end()
452440
->end()
453441
->end()
454-
->end()
455-
;
442+
->end();
456443
}
457444
}

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/AbstractFactory.php
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ public function create(ContainerBuilder $container, $id, $config, $userProviderI
5959
if ($this->isRememberMeAware($config)) {
6060
$container
6161
->getDefinition($listenerId)
62-
->addTag('security.remember_me_aware', array('id' => $id, 'provider' => $userProviderId))
63-
;
62+
->addTag('security.remember_me_aware', array('id' => $id, 'provider' => $userProviderId));
6463
}
6564

6665
// create entry point if applicable (optional)
@@ -77,8 +76,7 @@ public function addConfiguration(NodeDefinition $node)
7776
->scalarNode('provider')->end()
7877
->booleanNode('remember_me')->defaultTrue()->end()
7978
->scalarNode('success_handler')->end()
80-
->scalarNode('failure_handler')->end()
81-
;
79+
->scalarNode('failure_handler')->end();
8280

8381
foreach (array_merge($this->options, $this->defaultSuccessHandlerOptions, $this->defaultFailureHandlerOptions) as $name => $default) {
8482
if (is_bool($default)) {

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php
+15-27Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ public function load(array $configs, ContainerBuilder $container)
8383
->getDefinition('security.access.decision_manager')
8484
->addArgument($config['access_decision_manager']['strategy'])
8585
->addArgument($config['access_decision_manager']['allow_if_all_abstain'])
86-
->addArgument($config['access_decision_manager']['allow_if_equal_granted_denied'])
87-
;
86+
->addArgument($config['access_decision_manager']['allow_if_equal_granted_denied']);
8887
$container->setParameter('security.access.always_authenticate_before_granting', $config['always_authenticate_before_granting']);
8988
$container->setParameter('security.authentication.hide_user_not_found', $config['hide_user_not_found']);
9089

@@ -149,8 +148,7 @@ private function configureDbalAclProvider(array $config, ContainerBuilder $conta
149148
'connection' => $config['connection'],
150149
'event' => 'postGenerateSchema',
151150
'lazy' => true,
152-
))
153-
;
151+
));
154152

155153
$container->getDefinition('security.acl.cache.doctrine')->addArgument($config['cache']['prefix']);
156154

@@ -262,8 +260,7 @@ private function createFirewalls($config, ContainerBuilder $container)
262260
$context = $container->setDefinition($contextId, new DefinitionDecorator('security.firewall.context'));
263261
$context
264262
->replaceArgument(0, $listeners)
265-
->replaceArgument(1, $exceptionListener)
266-
;
263+
->replaceArgument(1, $exceptionListener);
267264
$map[$contextId] = $matcher;
268265
}
269266
$mapDef->replaceArgument(1, $map);
@@ -274,8 +271,7 @@ private function createFirewalls($config, ContainerBuilder $container)
274271
}, array_values(array_unique($authenticationProviders)));
275272
$container
276273
->getDefinition('security.authentication.manager')
277-
->replaceArgument(0, $authenticationProviders)
278-
;
274+
->replaceArgument(0, $authenticationProviders);
279275
}
280276

281277
private function createFirewall(ContainerBuilder $container, $id, $firewall, &$authenticationProviders, $providerIds)
@@ -349,8 +345,7 @@ private function createFirewall(ContainerBuilder $container, $id, $firewall, &$a
349345
$firewall['logout']['csrf_token_id'],
350346
$firewall['logout']['csrf_parameter'],
351347
isset($firewall['logout']['csrf_token_generator']) ? new Reference($firewall['logout']['csrf_token_generator']) : null,
352-
))
353-
;
348+
));
354349
}
355350

356351
// Authentication listeners
@@ -426,16 +421,14 @@ private function createAuthenticationListeners($container, $id, $firewall, &$aut
426421
$listenerId = 'security.authentication.listener.anonymous.'.$id;
427422
$container
428423
->setDefinition($listenerId, new DefinitionDecorator('security.authentication.listener.anonymous'))
429-
->replaceArgument(1, $firewall['anonymous']['key'])
430-
;
424+
->replaceArgument(1, $firewall['anonymous']['key']);
431425

432426
$listeners[] = new Reference($listenerId);
433427

434428
$providerId = 'security.authentication.provider.anonymous.'.$id;
435429
$container
436430
->setDefinition($providerId, new DefinitionDecorator('security.authentication.provider.anonymous'))
437-
->replaceArgument(0, $firewall['anonymous']['key'])
438-
;
431+
->replaceArgument(0, $firewall['anonymous']['key']);
439432

440433
$authenticationProviders[] = $providerId;
441434
$hasListeners = true;
@@ -457,8 +450,7 @@ private function createEncoders($encoders, ContainerBuilder $container)
457450

458451
$container
459452
->getDefinition('security.encoder_factory.generic')
460-
->setArguments(array($encoderMap))
461-
;
453+
->setArguments(array($encoderMap));
462454
}
463455

464456
private function createEncoder($config, ContainerBuilder $container)
@@ -553,8 +545,7 @@ private function createUserDaoProvider($name, $provider, ContainerBuilder $conta
553545

554546
$container
555547
->setDefinition($name, new DefinitionDecorator('security.user.provider.chain'))
556-
->addArgument($providers)
557-
;
548+
->addArgument($providers);
558549

559550
return $name;
560551
}
@@ -564,8 +555,7 @@ private function createUserDaoProvider($name, $provider, ContainerBuilder $conta
564555
$container
565556
->setDefinition($name, new DefinitionDecorator('security.user.provider.entity'))
566557
->addArgument($provider['entity']['class'])
567-
->addArgument($provider['entity']['property'])
568-
;
558+
->addArgument($provider['entity']['property']);
569559

570560
return $name;
571561
}
@@ -577,8 +567,7 @@ private function createUserDaoProvider($name, $provider, ContainerBuilder $conta
577567

578568
$container
579569
->setDefinition($userId, new DefinitionDecorator('security.user.provider.in_memory.user'))
580-
->setArguments(array($username, (string) $user['password'], $user['roles']))
581-
;
570+
->setArguments(array($username, (string) $user['password'], $user['roles']));
582571

583572
$definition->addMethodCall('createUser', array(new Reference($userId)));
584573
}
@@ -632,8 +621,7 @@ private function createExpression($container, $expression)
632621
->register($id, 'Symfony\Component\ExpressionLanguage\SerializedParsedExpression')
633622
->setPublic(false)
634623
->addArgument($expression)
635-
->addArgument(serialize($this->getExpressionLanguage()->parse($expression, array('token', 'user', 'object', 'roles', 'request'))->getNodes()))
636-
;
624+
->addArgument(serialize($this->getExpressionLanguage()->parse($expression, array('token', 'user', 'object', 'roles', 'request'))->getNodes()));
637625

638626
return $this->expressions[$id] = new Reference($id);
639627
}
@@ -676,8 +664,7 @@ private function createRequestMatcher($container, $path = null, $host = null, $m
676664
$container
677665
->register($id, '%security.matcher.class%')
678666
->setPublic(false)
679-
->setArguments($arguments)
680-
;
667+
->setArguments($arguments);
681668

682669
return $this->requestMatchers[$id] = new Reference($id);
683670
}
@@ -763,7 +750,7 @@ private function createConcurrentSessionAuthenticationStrategy($container, $id,
763750
array(
764751
new Reference($concurrentSessionControlStrategyId),
765752
new Reference($fixationSessionStrategyId),
766-
new Reference($registerSessionStrategyId)
753+
new Reference($registerSessionStrategyId),
767754
)
768755
);
769756
} else {
@@ -788,6 +775,7 @@ private function createLogoutSuccessHandler($container, $id, $config)
788775
$logoutSuccessHandler->replaceArgument(1, $config['target']);
789776
}
790777
}
778+
791779
return $logoutSuccessHandlerId;
792780
}
793781

‎src/Symfony/Component/Security/Http/Firewall/ExpiredSessionListener.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Firewall/ExpiredSessionListener.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ public function handle(GetResponseEvent $event)
7373

7474
if ($sessionInformation = $this->sessionRegistry->getSessionInformation($session->getId())) {
7575
if ($sessionInformation->isExpired()) {
76-
7776
if (null !== $this->logger) {
7877
$this->logger->info(sprintf("Logging out expired session for username '%s'", $token->getUsername()));
7978
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.