diff --git a/src/EventListener/ORM/SortableListener.php b/src/EventListener/ORM/SortableListener.php index 6a4fafdf..399ca35b 100644 --- a/src/EventListener/ORM/SortableListener.php +++ b/src/EventListener/ORM/SortableListener.php @@ -29,14 +29,8 @@ final class SortableListener implements EventSubscriber { - /** - * @var PropertyAccessor - */ - private $propertyAccessor; + private PropertyAccessor $propertyAccessor; - /** - * @param PropertyAccessor $propertyAccessor - */ public function __construct(PropertyAccessor $propertyAccessor = null) { if (null === $propertyAccessor) { diff --git a/src/EventListener/ORM/TablePrefixEventListener.php b/src/EventListener/ORM/TablePrefixEventListener.php index e766fadb..b9225752 100644 --- a/src/EventListener/ORM/TablePrefixEventListener.php +++ b/src/EventListener/ORM/TablePrefixEventListener.php @@ -21,10 +21,7 @@ final class TablePrefixEventListener implements EventSubscriber { - /** - * @var string|null - */ - private $prefix; + private ?string $prefix; public function __construct(?string $prefix) { diff --git a/src/EventListener/ORM/UniqueActiveListener.php b/src/EventListener/ORM/UniqueActiveListener.php index 7af4d76a..965e3308 100644 --- a/src/EventListener/ORM/UniqueActiveListener.php +++ b/src/EventListener/ORM/UniqueActiveListener.php @@ -27,14 +27,8 @@ final class UniqueActiveListener implements EventSubscriber { - /** - * @var PropertyAccessor - */ - private $propertyAccessor; + private PropertyAccessor $propertyAccessor; - /** - * @param PropertyAccessor $propertyAccessor - */ public function __construct(PropertyAccessor $propertyAccessor = null) { if (null === $propertyAccessor) { diff --git a/src/Model/Traits/ConfirmableTrait.php b/src/Model/Traits/ConfirmableTrait.php index 20d32a70..a4f3adbc 100644 --- a/src/Model/Traits/ConfirmableTrait.php +++ b/src/Model/Traits/ConfirmableTrait.php @@ -15,10 +15,7 @@ trait ConfirmableTrait { - /** - * @var DateTime|null - */ - protected $confirmedAt; + protected ?DateTime $confirmedAt = null; public function getConfirmedAt(): ?DateTime { diff --git a/src/Model/Traits/DeleteableTrait.php b/src/Model/Traits/DeleteableTrait.php index 9c9eeaa9..0dc36e33 100644 --- a/src/Model/Traits/DeleteableTrait.php +++ b/src/Model/Traits/DeleteableTrait.php @@ -15,10 +15,7 @@ trait DeleteableTrait { - /** - * @var DateTime|null - */ - protected $deletedAt; + protected ?DateTime $deletedAt = null; public function getDeletedAt(): ?DateTime { diff --git a/src/Model/Traits/LifecycleDateTimeTrait.php b/src/Model/Traits/LifecycleDateTimeTrait.php index 2735b234..5ae2feae 100644 --- a/src/Model/Traits/LifecycleDateTimeTrait.php +++ b/src/Model/Traits/LifecycleDateTimeTrait.php @@ -15,15 +15,9 @@ trait LifecycleDateTimeTrait { - /** - * @var DateTime|null - */ - protected $createdAt; - - /** - * @var DateTime|null - */ - protected $updatedAt; + protected ?DateTime $createdAt = null; + + protected ?DateTime $updatedAt = null; public function setCreatedAt(?DateTime $createdAt): void { diff --git a/src/Model/Traits/SortableTrait.php b/src/Model/Traits/SortableTrait.php index 078d9f4e..6e84eadb 100644 --- a/src/Model/Traits/SortableTrait.php +++ b/src/Model/Traits/SortableTrait.php @@ -13,10 +13,7 @@ trait SortableTrait { - /** - * @var int|null - */ - protected $position; + protected ?int $position = null; public function setPosition(?int $position): void {