Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert readonly properties #642

Merged
merged 2 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Action/CompareAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
final class CompareAction
{
public function __construct(
private readonly Environment $twig,
private readonly AuditReader $auditReader,
private Environment $twig,
private AuditReader $auditReader,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Action/IndexAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
final class IndexAction
{
public function __construct(
private readonly Environment $twig,
private readonly AuditReader $auditReader,
private Environment $twig,
private AuditReader $auditReader,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Action/ViewDetailAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
final class ViewDetailAction
{
public function __construct(
private readonly Environment $twig,
private readonly AuditReader $auditReader,
private Environment $twig,
private AuditReader $auditReader,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Action/ViewEntityAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
final class ViewEntityAction
{
public function __construct(
private readonly Environment $twig,
private readonly AuditReader $auditReader,
private Environment $twig,
private AuditReader $auditReader,
) {
}

Expand Down
4 changes: 2 additions & 2 deletions src/Action/ViewRevisionAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
final class ViewRevisionAction
{
public function __construct(
private readonly Environment $twig,
private readonly AuditReader $auditReader,
private Environment $twig,
private AuditReader $auditReader,
) {
}

Expand Down
6 changes: 3 additions & 3 deletions src/AuditManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
*/
class AuditManager
{
private readonly MetadataFactory $metadataFactory;
private MetadataFactory $metadataFactory;

public function __construct(
private readonly AuditConfiguration $config,
private readonly ?ClockInterface $clock = null,
private AuditConfiguration $config,
private ?ClockInterface $clock = null,
) {
$this->metadataFactory = $config->createMetadataFactory();
}
Expand Down
8 changes: 4 additions & 4 deletions src/ChangedEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class ChangedEntity
* @phpstan-param T $entity
*/
public function __construct(
private readonly string $className,
private readonly array $id,
private readonly string $revType,
private readonly object $entity,
private string $className,
private array $id,
private string $revType,
private object $entity,
) {
}

Expand Down
12 changes: 6 additions & 6 deletions src/DeferredChangedManyToManyEntityRevisionToPersist.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ final class DeferredChangedManyToManyEntityRevisionToPersist
* @param ClassMetadata<object> $targetClass
*/
public function __construct(
private readonly object $entity,
private readonly string $revType,
private readonly array $entityData,
private readonly array|ManyToManyOwningSideMapping $assoc,
private readonly ClassMetadata $class,
private readonly ClassMetadata $targetClass,
private object $entity,
private string $revType,
private array $entityData,
private array|ManyToManyOwningSideMapping $assoc,
private ClassMetadata $class,
private ClassMetadata $targetClass,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion src/EventListener/CacheListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
final class CacheListener implements EventSubscriber
{
public function __construct(private readonly AuditReader $auditReader)
public function __construct(private AuditReader $auditReader)
{
}

Expand Down
4 changes: 2 additions & 2 deletions src/Revision.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class Revision
*/
public function __construct(
private $rev,
private readonly \DateTime $timestamp,
private readonly ?string $username,
private \DateTime $timestamp,
private ?string $username,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion tests/ClockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function testFixedClockIsUsed(): void
protected function getClock(): ClockInterface
{
return new class($this->getFixedTime()) implements ClockInterface {
public function __construct(private readonly \DateTimeImmutable $now)
public function __construct(private \DateTimeImmutable $now)
{
}

Expand Down
Loading