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

@@ -14,7 +14,6 @@ namespace Chill\TaskBundle\Security\Authorization;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Entity\Person;
use Chill\TaskBundle\Entity\AbstractTask;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
class AuthorizationEvent extends \Symfony\Contracts\EventDispatcher\Event

View File

@@ -26,8 +26,6 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface;
use function in_array;
final class TaskVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface
{
public const CREATE_COURSE = 'CHILL_TASK_TASK_CREATE_FOR_COURSE';
@@ -99,7 +97,7 @@ final class TaskVoter extends AbstractChillVoter implements ProvideRoleHierarchy
if ($event->hasVote()) {
$this->logger->debug('The TaskVoter is overriding by '
. AuthorizationEvent::VOTE, [
.AuthorizationEvent::VOTE, [
'vote' => $event->getVote(),
'task_id' => $subject->getId(),
]);
@@ -128,7 +126,7 @@ final class TaskVoter extends AbstractChillVoter implements ProvideRoleHierarchy
if ($subject instanceof AccompanyingPeriod) {
if (AccompanyingPeriod::STEP_CLOSED === $subject->getStep()) {
if (in_array($attribute, [self::UPDATE, self::CREATE_COURSE, self::DELETE], true)) {
if (\in_array($attribute, [self::UPDATE, self::CREATE_COURSE, self::DELETE], true)) {
return false;
}
}