Skip to content
This repository was archived by the owner on May 31, 2024. It is now read-only.

Commit 117752e

Browse files
committed
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
1 parent 9c25665 commit 117752e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Acl/Dbal/MutableAclProvider.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public function updateAcl(MutableAclInterface $acl)
242242
if (null === $propertyChanges['parentAcl'][1]) {
243243
$sets[] = 'parent_object_identity_id = NULL';
244244
} else {
245-
$sets[] = 'parent_object_identity_id = '.intval($propertyChanges['parentAcl'][1]->getId());
245+
$sets[] = 'parent_object_identity_id = '.(int) $propertyChanges['parentAcl'][1]->getId();
246246
}
247247

248248
$this->regenerateAncestorRelations($acl);
@@ -453,7 +453,7 @@ class_id,
453453
$query,
454454
$this->options['entry_table_name'],
455455
$classId,
456-
null === $objectIdentityId ? 'NULL' : intval($objectIdentityId),
456+
null === $objectIdentityId ? 'NULL' : (int) $objectIdentityId,
457457
null === $field ? 'NULL' : $this->connection->quote($field),
458458
$aceOrder,
459459
$securityIdentityId,
@@ -571,7 +571,7 @@ protected function getSelectAccessControlEntryIdSql($classId, $oid, $field, $ord
571571
$classId,
572572
null === $oid ?
573573
$this->connection->getDatabasePlatform()->getIsNullExpression('object_identity_id')
574-
: 'object_identity_id = '.intval($oid),
574+
: 'object_identity_id = '.(int) $oid,
575575
null === $field ?
576576
$this->connection->getDatabasePlatform()->getIsNullExpression('field_name')
577577
: 'field_name = '.$this->connection->quote($field),
@@ -812,7 +812,7 @@ private function updateNewFieldAceProperty($name, array $changes)
812812

813813
$aceIdProperty = new \ReflectionProperty('Symfony\Component\Security\Acl\Domain\Entry', 'id');
814814
$aceIdProperty->setAccessible(true);
815-
$aceIdProperty->setValue($ace, intval($aceId));
815+
$aceIdProperty->setValue($ace, (int) $aceId);
816816
} else {
817817
$currentIds[$ace->getId()] = true;
818818
}
@@ -888,7 +888,7 @@ private function updateNewAceProperty($name, array $changes)
888888

889889
$aceIdProperty = new \ReflectionProperty($ace, 'id');
890890
$aceIdProperty->setAccessible(true);
891-
$aceIdProperty->setValue($ace, intval($aceId));
891+
$aceIdProperty->setValue($ace, (int) $aceId);
892892
}
893893
}
894894
}

Http/EntryPoint/DigestAuthenticationEntryPoint.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function start(Request $request, AuthenticationException $authException =
5050
$authenticateHeader = sprintf('Digest realm="%s", qop="auth", nonce="%s"', $this->realmName, $nonceValueBase64);
5151

5252
if ($authException instanceof NonceExpiredException) {
53-
$authenticateHeader = $authenticateHeader.', stale="true"';
53+
$authenticateHeader .= ', stale="true"';
5454
}
5555

5656
if (null !== $this->logger) {

0 commit comments

Comments
 (0)