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 ce64435

Browse filesBrowse files
committed
minor #9594 [Security] Fixed typos/CS/PHPDoc (pborreli)
This PR was merged into the master branch. Discussion ---------- [Security] Fixed typos/CS/PHPDoc Commits ------- e1110de Fixed typos/CS/PHPDoc
2 parents 1fcc7c5 + e1110de commit ce64435
Copy full SHA for ce64435

File tree

Expand file treeCollapse file tree

7 files changed

+31
-28
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

7 files changed

+31
-28
lines changed
Open diff view settings
Collapse file

‎src/Symfony/Component/Security/Acl/Dbal/AclProvider.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Acl/Dbal/AclProvider.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ public function findAcls(array $oids, array $sids = array())
165165
if ((self::MAX_BATCH_SIZE === count($currentBatch) || ($i + 1) === $c) && count($currentBatch) > 0) {
166166
try {
167167
$loadedBatch = $this->lookupObjectIdentities($currentBatch, $sids, $oidLookup);
168-
} catch (AclNotFoundException $aclNotFoundexception) {
168+
} catch (AclNotFoundException $aclNotFoundException) {
169169
if ($result->count()) {
170170
$partialResultException = new NotAllAclsFoundException('The provider could not find ACLs for all object identities.');
171171
$partialResultException->setPartialResult($result);
172172
throw $partialResultException;
173173
} else {
174-
throw $aclNotFoundexception;
174+
throw $aclNotFoundException;
175175
}
176176
}
177177
foreach ($loadedBatch as $loadedOid) {
Collapse file

‎src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Acl/Dbal/MutableAclProvider.php
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ public function updateAcl(MutableAclInterface $acl)
253253
}
254254

255255
// check properties for deleted, and created ACEs, and perform deletions
256-
// we need to perfom deletions before updating existing ACEs, in order to
256+
// we need to perform deletions before updating existing ACEs, in order to
257257
// preserve uniqueness of the order field
258258
if (isset($propertyChanges['classAces'])) {
259259
$this->updateOldAceProperty('classAces', $propertyChanges['classAces']);
@@ -360,7 +360,7 @@ public function updateAcl(MutableAclInterface $acl)
360360
protected function getDeleteAccessControlEntriesSql($oidPK)
361361
{
362362
return sprintf(
363-
'DELETE FROM %s WHERE object_identity_id = %d',
363+
'DELETE FROM %s WHERE object_identity_id = %d',
364364
$this->options['entry_table_name'],
365365
$oidPK
366366
);
@@ -806,7 +806,7 @@ private function updateNewFieldAceProperty($name, array $changes)
806806
* @param string $name
807807
* @param array $changes
808808
*/
809-
private function updateOldFieldAceProperty($ane, array $changes)
809+
private function updateOldFieldAceProperty($name, array $changes)
810810
{
811811
$currentIds = array();
812812
foreach ($changes[1] as $field => $new) {
@@ -925,11 +925,12 @@ private function updateAce(\SplObjectStorage $aces, $ace)
925925
if (isset($propertyChanges['aceOrder'])
926926
&& $propertyChanges['aceOrder'][1] > $propertyChanges['aceOrder'][0]
927927
&& $propertyChanges == $aces->offsetGet($ace)) {
928-
$aces->next();
929-
if ($aces->valid()) {
928+
929+
$aces->next();
930+
if ($aces->valid()) {
930931
$this->updateAce($aces, $aces->current());
931-
}
932932
}
933+
}
933934

934935
if (isset($propertyChanges['mask'])) {
935936
$sets[] = sprintf('mask = %d', $propertyChanges['mask'][1]);
@@ -949,5 +950,4 @@ private function updateAce(\SplObjectStorage $aces, $ace)
949950

950951
$this->connection->executeQuery($this->getUpdateAccessControlEntrySql($ace->getId(), $sets));
951952
}
952-
953953
}
Collapse file

‎src/Symfony/Component/Security/Acl/Tests/Domain/AuditLoggerTest.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Acl/Tests/Domain/AuditLoggerTest.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ public function testLogIfNeeded($granting, $audit)
2626
->expects($this->once())
2727
->method('isAuditSuccess')
2828
->will($this->returnValue($audit))
29-
;
29+
;
3030

31-
$ace
31+
$ace
3232
->expects($this->never())
3333
->method('isAuditFailure')
34-
;
34+
;
3535
} else {
3636
$ace
3737
->expects($this->never())
Collapse file

‎src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authentication/Provider/PreAuthenticatedAuthenticationProvider.php
+10-11Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,23 +47,22 @@ public function __construct(UserProviderInterface $userProvider, UserCheckerInte
4747
$this->providerKey = $providerKey;
4848
}
4949

50-
/**
51-
* {@inheritdoc}
52-
*/
53-
public function authenticate(TokenInterface $token)
54-
{
55-
if (!$this->supports($token)) {
56-
return null;
57-
}
58-
50+
/**
51+
* {@inheritdoc}
52+
*/
53+
public function authenticate(TokenInterface $token)
54+
{
55+
if (!$this->supports($token)) {
56+
return null;
57+
}
5958
if (!$user = $token->getUser()) {
6059
throw new BadCredentialsException('No pre-authenticated principal found in request.');
6160
}
62-
/*
61+
/*
6362
if (null === $token->getCredentials()) {
6463
throw new BadCredentialsException('No pre-authenticated credentials found in request.');
6564
}
66-
*/
65+
*/
6766
$user = $this->userProvider->loadUserByUsername($user);
6867

6968
$this->userChecker->checkPostAuth($user);
Collapse file

‎src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Authorization/Voter/ExpressionVoter.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ class ExpressionVoter implements VoterInterface
3232
/**
3333
* Constructor.
3434
*
35-
* @param ExpressionLanguage $expressionLanguage
35+
* @param ExpressionLanguage $expressionLanguage
36+
* @param AuthenticationTrustResolverInterface $trustResolver
37+
* @param RoleHierarchyInterface $roleHierarchy
3638
*/
3739
public function __construct(ExpressionLanguage $expressionLanguage, AuthenticationTrustResolverInterface $trustResolver, RoleHierarchyInterface $roleHierarchy = null)
3840
{
Collapse file

‎src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Core/Encoder/BasePasswordEncoder.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ protected function comparePasswords($password1, $password2)
8989
/**
9090
* Checks if the password is too long.
9191
*
92+
* @param string $password The password
93+
*
9294
* @return Boolean true if the password is too long, false otherwise
9395
*/
9496
protected function isPasswordTooLong($password)
Collapse file

‎src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Security/Http/Tests/Firewall/SwitchUserListenerTest.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function testExitUserUpdatesToken()
8787

8888
$this->request->expects($this->any())->method('get')->with('_switch_user')->will($this->returnValue('_exit'));
8989
$this->request->expects($this->any())->method('getUri')->will($this->returnValue('/'));
90-
$this->request->query->expects($this->once())->method('remove','_switch_user');
90+
$this->request->query->expects($this->once())->method('remove', '_switch_user');
9191
$this->request->query->expects($this->any())->method('all')->will($this->returnValue(array()));
9292
$this->request->server->expects($this->once())->method('set')->with('QUERY_STRING', '');
9393

@@ -103,7 +103,7 @@ public function testExitUserUpdatesToken()
103103
/**
104104
* @expectedException \Symfony\Component\Security\Core\Exception\AccessDeniedException
105105
*/
106-
public function testSwitchUserIsDissallowed()
106+
public function testSwitchUserIsDisallowed()
107107
{
108108
$token = $this->getToken(array($this->getMock('Symfony\Component\Security\Core\Role\RoleInterface')));
109109

@@ -126,7 +126,7 @@ public function testSwitchUser()
126126

127127
$this->securityContext->expects($this->any())->method('getToken')->will($this->returnValue($token));
128128
$this->request->expects($this->any())->method('get')->with('_switch_user')->will($this->returnValue('kuba'));
129-
$this->request->query->expects($this->once())->method('remove','_switch_user');
129+
$this->request->query->expects($this->once())->method('remove', '_switch_user');
130130
$this->request->query->expects($this->any())->method('all')->will($this->returnValue(array()));
131131

132132
$this->request->expects($this->any())->method('getUri')->will($this->returnValue('/'));
@@ -156,7 +156,7 @@ public function testSwitchUserKeepsOtherQueryStringParameters()
156156

157157
$this->securityContext->expects($this->any())->method('getToken')->will($this->returnValue($token));
158158
$this->request->expects($this->any())->method('get')->with('_switch_user')->will($this->returnValue('kuba'));
159-
$this->request->query->expects($this->once())->method('remove','_switch_user');
159+
$this->request->query->expects($this->once())->method('remove', '_switch_user');
160160
$this->request->query->expects($this->any())->method('all')->will($this->returnValue(array('page'=>3,'section'=>2)));
161161
$this->request->expects($this->any())->method('getUri')->will($this->returnValue('/'));
162162
$this->request->server->expects($this->once())->method('set')->with('QUERY_STRING', 'page=3&section=2');

0 commit comments

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