apply rector rules: php up to php82

This commit is contained in:
2023-07-19 23:16:01 +02:00
parent 7b637d1287
commit 023a29cb78
744 changed files with 1369 additions and 1381 deletions

View File

@@ -27,7 +27,7 @@ use Symfony\Component\Security\Core\Security;
use function count;
use function substr;
final class SingleTaskAclAwareRepository implements SingleTaskAclAwareRepositoryInterface
final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareRepositoryInterface
{
public function __construct(private CenterResolverManagerInterface $centerResolverDispatcher, private EntityManagerInterface $em, private Security $security, private AuthorizationHelperInterface $authorizationHelper)
{
@@ -122,8 +122,8 @@ final class SingleTaskAclAwareRepository implements SingleTaskAclAwareRepository
break;
case str_starts_with($flag, 'state_'):
$state = substr($flag, 6);
case str_starts_with((string) $flag, 'state_'):
$state = substr((string) $flag, 6);
$orXState
->add(
"JSONB_EXISTS_IN_ARRAY(t.currentStates, :state_{$key}) = 'TRUE'"

View File

@@ -31,15 +31,15 @@ use function count;
*/
class SingleTaskRepository extends EntityRepository
{
public const DATE_STATUS_CURRENT = 'current';
final public const DATE_STATUS_CURRENT = 'current';
public const DATE_STATUS_ENDED = 'ended';
final public const DATE_STATUS_ENDED = 'ended';
public const DATE_STATUS_NOT_STARTED = 'not_started';
final public const DATE_STATUS_NOT_STARTED = 'not_started';
public const DATE_STATUS_WARNING = 'warning';
final public const DATE_STATUS_WARNING = 'warning';
public const DATE_STATUSES = [
final public const DATE_STATUSES = [
self::DATE_STATUS_ENDED,
self::DATE_STATUS_WARNING,
self::DATE_STATUS_CURRENT,

View File

@@ -21,7 +21,7 @@ class SingleTaskStateRepository
SQL;
public function __construct(
private Connection $connection
private readonly Connection $connection
) {
}