Rector fixes

This commit is contained in:
2026-04-15 18:17:25 +02:00
parent 60b31a0b19
commit 58509ae4da
4 changed files with 11 additions and 11 deletions

View File

@@ -40,13 +40,13 @@ class StoredObjectLock
public function __construct(
#[ORM\ManyToOne(targetEntity: StoredObject::class, inversedBy: 'locks')]
private StoredObject $storedObject,
#[ORM\Column(type: 'string', length: 10, nullable: false, enumType: StoredObjectLockMethodEnum::class)]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::STRING, length: 10, nullable: false, enumType: StoredObjectLockMethodEnum::class)]
private StoredObjectLockMethodEnum $method,
#[ORM\Column(type: 'datetimetz_immutable', nullable: false)]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIMETZ_IMMUTABLE, nullable: false)]
private \DateTimeImmutable $createdAt,
#[ORM\Column(type: 'text', nullable: false, options: ['default' => ''])]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false, options: ['default' => ''])]
private string $token = '',
#[ORM\Column(type: 'datetimetz_immutable', nullable: true)]
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIMETZ_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $expireAt = null,
array $users = [],
) {

View File

@@ -32,7 +32,7 @@ class LockTimeoutAnalyzerTest extends TestCase
self::assertEquals($expected, $result);
}
public function provideTimeoutData(): iterable
public static function provideTimeoutData(): iterable
{
yield 'Second-1800' => [
'Second-1800',

View File

@@ -40,7 +40,7 @@ class LockTokenParserTest extends TestCase
$this->assertSame($expectedToken, $this->parser->parseIfCondition($request));
}
public function provideIfConditions(): array
public static function provideIfConditions(): array
{
return [
'standard lock token' => [

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Clock\ClockInterface;
use Symfony\Component\Security\Core\Security;
use Webmozart\Assert\Assert;
final class ChillDocumentLockManager implements DocumentLockManagerInterface
final readonly class ChillDocumentLockManager implements DocumentLockManagerInterface
{
private const LOCK_DURATION = 60 * 30;
@@ -32,10 +32,10 @@ final class ChillDocumentLockManager implements DocumentLockManagerInterface
private const LOCK_GRACEFUL_DURATION_TIME = 3;
public function __construct(
private readonly Security $security,
private readonly ClockInterface $clock,
private readonly StoredObjectLockManager $storedObjectLockManager,
private readonly int $ttlAfterDeleteSeconds = self::LOCK_GRACEFUL_DURATION_TIME,
private Security $security,
private ClockInterface $clock,
private StoredObjectLockManager $storedObjectLockManager,
private int $ttlAfterDeleteSeconds = self::LOCK_GRACEFUL_DURATION_TIME,
) {}
public function deleteLock(Document $document, RequestInterface $request): bool