diff options
author | Vladimir Reznichenko <kalessil@gmail.com> | 2015-03-07 20:12:23 +0100 |
---|---|---|
committer | Vladimir Reznichenko <kalessil@gmail.com> | 2015-03-07 20:12:23 +0100 |
commit | 117752eeae89dc43f7a9d36ea8ce1f0690e97c5a (patch) | |
tree | 105a7ba8d9b83e744a3b439e0e1f63522915611b | |
parent | 9c2566542e03e280f62b019264becf6b74891bdc (diff) | |
download | symfony-security-117752eeae89dc43f7a9d36ea8ce1f0690e97c5a.zip symfony-security-117752eeae89dc43f7a9d36ea8ce1f0690e97c5a.tar.gz symfony-security-117752eeae89dc43f7a9d36ea8ce1f0690e97c5a.tar.bz2 |
Php Inspections (EA Extended) - static code analysis includes:
Reduce couple count calls in [Yaml]
Modernize type casting, fix several strict comparisons
Unsets merged
Elvis operator usage
Short syntax for applied operations
-rw-r--r-- | Acl/Dbal/MutableAclProvider.php | 10 | ||||
-rw-r--r-- | Http/EntryPoint/DigestAuthenticationEntryPoint.php | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Acl/Dbal/MutableAclProvider.php b/Acl/Dbal/MutableAclProvider.php index f1b8aff..a710bf7 100644 --- a/Acl/Dbal/MutableAclProvider.php +++ b/Acl/Dbal/MutableAclProvider.php @@ -242,7 +242,7 @@ class MutableAclProvider extends AclProvider implements MutableAclProviderInterf if (null === $propertyChanges['parentAcl'][1]) { $sets[] = 'parent_object_identity_id = NULL'; } else { - $sets[] = 'parent_object_identity_id = '.intval($propertyChanges['parentAcl'][1]->getId()); + $sets[] = 'parent_object_identity_id = '.(int) $propertyChanges['parentAcl'][1]->getId(); } $this->regenerateAncestorRelations($acl); @@ -453,7 +453,7 @@ QUERY; $query, $this->options['entry_table_name'], $classId, - null === $objectIdentityId ? 'NULL' : intval($objectIdentityId), + null === $objectIdentityId ? 'NULL' : (int) $objectIdentityId, null === $field ? 'NULL' : $this->connection->quote($field), $aceOrder, $securityIdentityId, @@ -571,7 +571,7 @@ QUERY; $classId, null === $oid ? $this->connection->getDatabasePlatform()->getIsNullExpression('object_identity_id') - : 'object_identity_id = '.intval($oid), + : 'object_identity_id = '.(int) $oid, null === $field ? $this->connection->getDatabasePlatform()->getIsNullExpression('field_name') : 'field_name = '.$this->connection->quote($field), @@ -812,7 +812,7 @@ QUERY; $aceIdProperty = new \ReflectionProperty('Symfony\Component\Security\Acl\Domain\Entry', 'id'); $aceIdProperty->setAccessible(true); - $aceIdProperty->setValue($ace, intval($aceId)); + $aceIdProperty->setValue($ace, (int) $aceId); } else { $currentIds[$ace->getId()] = true; } @@ -888,7 +888,7 @@ QUERY; $aceIdProperty = new \ReflectionProperty($ace, 'id'); $aceIdProperty->setAccessible(true); - $aceIdProperty->setValue($ace, intval($aceId)); + $aceIdProperty->setValue($ace, (int) $aceId); } } } diff --git a/Http/EntryPoint/DigestAuthenticationEntryPoint.php b/Http/EntryPoint/DigestAuthenticationEntryPoint.php index 71a6313..5a7aa1a 100644 --- a/Http/EntryPoint/DigestAuthenticationEntryPoint.php +++ b/Http/EntryPoint/DigestAuthenticationEntryPoint.php @@ -50,7 +50,7 @@ class DigestAuthenticationEntryPoint implements AuthenticationEntryPointInterfac $authenticateHeader = sprintf('Digest realm="%s", qop="auth", nonce="%s"', $this->realmName, $nonceValueBase64); if ($authException instanceof NonceExpiredException) { - $authenticateHeader = $authenticateHeader.', stale="true"'; + $authenticateHeader .= ', stale="true"'; } if (null !== $this->logger) { |