apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -12,12 +12,8 @@ declare(strict_types=1);
namespace Chill\MainBundle\Security\Authorization;
use Chill\MainBundle\Repository\Workflow\EntityWorkflowRepository;
use Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface;
use RuntimeException;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
use function in_array;
use function is_object;
class WorkflowEntityDeletionVoter extends Voter
{
@@ -28,13 +24,13 @@ class WorkflowEntityDeletionVoter extends Voter
protected function supports($attribute, $subject)
{
if (!is_object($subject)) {
if (!\is_object($subject)) {
return false;
}
foreach ($this->handlers as $handler) {
if ($handler->isObjectSupported($subject)
&& in_array($attribute, $handler->getDeletionRoles($subject), true)) {
&& \in_array($attribute, $handler->getDeletionRoles($subject), true)) {
return true;
}
}
@@ -52,6 +48,6 @@ class WorkflowEntityDeletionVoter extends Voter
}
}
throw new RuntimeException('no handlers found');
throw new \RuntimeException('no handlers found');
}
}