From 1e5944cdfcc4352e559c5394f5156c571ad6997f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Proch=C3=A1zka?= Date: Tue, 20 Feb 2024 11:35:07 +0100 Subject: [PATCH] Move Traits into Entity --- src/{ => Entity}/Traits/Activable.php | 2 +- src/{ => Entity}/Traits/Authorable.php | 2 +- src/{ => Entity}/Traits/Comments.php | 4 ++-- src/{ => Entity}/Traits/Finishable.php | 2 +- src/{ => Entity}/Traits/Hashable.php | 2 +- src/{ => Entity}/Traits/Identifier.php | 2 +- src/{ => Entity}/Traits/IdentityOptional.php | 2 +- src/{ => Entity}/Traits/IdentityRequired.php | 2 +- src/{ => Entity}/Traits/Ownerable.php | 2 +- src/{ => Entity}/Traits/Parametrized.php | 2 +- src/{ => Entity}/Traits/Timestamp.php | 2 +- src/Traits/Ownership.php | 17 ----------------- 12 files changed, 12 insertions(+), 29 deletions(-) rename src/{ => Entity}/Traits/Activable.php (91%) rename src/{ => Entity}/Traits/Authorable.php (93%) rename src/{ => Entity}/Traits/Comments.php (91%) rename src/{ => Entity}/Traits/Finishable.php (95%) rename src/{ => Entity}/Traits/Hashable.php (94%) rename src/{ => Entity}/Traits/Identifier.php (94%) rename src/{ => Entity}/Traits/IdentityOptional.php (92%) rename src/{ => Entity}/Traits/IdentityRequired.php (92%) rename src/{ => Entity}/Traits/Ownerable.php (93%) rename src/{ => Entity}/Traits/Parametrized.php (91%) rename src/{ => Entity}/Traits/Timestamp.php (96%) delete mode 100644 src/Traits/Ownership.php diff --git a/src/Traits/Activable.php b/src/Entity/Traits/Activable.php similarity index 91% rename from src/Traits/Activable.php rename to src/Entity/Traits/Activable.php index 474a59b..60534e5 100644 --- a/src/Traits/Activable.php +++ b/src/Entity/Traits/Activable.php @@ -5,7 +5,7 @@ * @license MIT License */ -namespace JuniWalk\ORM\Traits; +namespace JuniWalk\ORM\Entity\Traits; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Traits/Authorable.php b/src/Entity/Traits/Authorable.php similarity index 93% rename from src/Traits/Authorable.php rename to src/Entity/Traits/Authorable.php index 82f1dac..bd9afe4 100644 --- a/src/Traits/Authorable.php +++ b/src/Entity/Traits/Authorable.php @@ -5,7 +5,7 @@ * @license MIT License */ -namespace JuniWalk\ORM\Traits; +namespace JuniWalk\ORM\Entity\Traits; use Doctrine\ORM\Mapping as ORM; use Nette\Security\IIdentity as Identity; diff --git a/src/Traits/Comments.php b/src/Entity/Traits/Comments.php similarity index 91% rename from src/Traits/Comments.php rename to src/Entity/Traits/Comments.php index 50d5a4e..daf318c 100644 --- a/src/Traits/Comments.php +++ b/src/Entity/Traits/Comments.php @@ -5,9 +5,9 @@ * @license MIT License */ -namespace JuniWalk\ORM\Traits; +namespace JuniWalk\ORM\Entity\Traits; -use JuniWalk\ORM\Interfaces\Comment; +use JuniWalk\ORM\Entity\Interfaces\Comment; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Traits/Finishable.php b/src/Entity/Traits/Finishable.php similarity index 95% rename from src/Traits/Finishable.php rename to src/Entity/Traits/Finishable.php index 4e8fb4d..56e4b1b 100644 --- a/src/Traits/Finishable.php +++ b/src/Entity/Traits/Finishable.php @@ -5,7 +5,7 @@ * @license MIT License */ -namespace JuniWalk\ORM\Traits; +namespace JuniWalk\ORM\Entity\Traits; use Doctrine\ORM\Mapping as ORM; use Nette\Security\IIdentity as Identity; diff --git a/src/Traits/Hashable.php b/src/Entity/Traits/Hashable.php similarity index 94% rename from src/Traits/Hashable.php rename to src/Entity/Traits/Hashable.php index 3b6ab11..f2561b1 100644 --- a/src/Traits/Hashable.php +++ b/src/Entity/Traits/Hashable.php @@ -5,7 +5,7 @@ * @license MIT License */ -namespace JuniWalk\ORM\Traits; +namespace JuniWalk\ORM\Entity\Traits; use Doctrine\ORM\Mapping as ORM; use Stringable; diff --git a/src/Traits/Identifier.php b/src/Entity/Traits/Identifier.php similarity index 94% rename from src/Traits/Identifier.php rename to src/Entity/Traits/Identifier.php index 2b5a811..45f44d1 100644 --- a/src/Traits/Identifier.php +++ b/src/Entity/Traits/Identifier.php @@ -5,7 +5,7 @@ * @license MIT License */ -namespace JuniWalk\ORM\Traits; +namespace JuniWalk\ORM\Entity\Traits; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Traits/IdentityOptional.php b/src/Entity/Traits/IdentityOptional.php similarity index 92% rename from src/Traits/IdentityOptional.php rename to src/Entity/Traits/IdentityOptional.php index 954c6d3..586ecd9 100644 --- a/src/Traits/IdentityOptional.php +++ b/src/Entity/Traits/IdentityOptional.php @@ -5,7 +5,7 @@ * @license MIT License */ -namespace JuniWalk\ORM\Traits; +namespace JuniWalk\ORM\Entity\Traits; use Doctrine\ORM\Mapping as ORM; use Nette\Security\IIdentity as Identity; diff --git a/src/Traits/IdentityRequired.php b/src/Entity/Traits/IdentityRequired.php similarity index 92% rename from src/Traits/IdentityRequired.php rename to src/Entity/Traits/IdentityRequired.php index cd75e00..e45adcb 100644 --- a/src/Traits/IdentityRequired.php +++ b/src/Entity/Traits/IdentityRequired.php @@ -5,7 +5,7 @@ * @license MIT License */ -namespace JuniWalk\ORM\Traits; +namespace JuniWalk\ORM\Entity\Traits; use Doctrine\ORM\Mapping as ORM; use Nette\Security\IIdentity as Identity; diff --git a/src/Traits/Ownerable.php b/src/Entity/Traits/Ownerable.php similarity index 93% rename from src/Traits/Ownerable.php rename to src/Entity/Traits/Ownerable.php index b000e0f..80e8800 100644 --- a/src/Traits/Ownerable.php +++ b/src/Entity/Traits/Ownerable.php @@ -5,7 +5,7 @@ * @license MIT License */ -namespace JuniWalk\ORM\Traits; +namespace JuniWalk\ORM\Entity\Traits; use Doctrine\ORM\Mapping as ORM; use Nette\Security\IIdentity as Identity; diff --git a/src/Traits/Parametrized.php b/src/Entity/Traits/Parametrized.php similarity index 91% rename from src/Traits/Parametrized.php rename to src/Entity/Traits/Parametrized.php index 9ecf7ce..6602940 100644 --- a/src/Traits/Parametrized.php +++ b/src/Entity/Traits/Parametrized.php @@ -5,7 +5,7 @@ * @license MIT License */ -namespace JuniWalk\ORM\Traits; +namespace JuniWalk\ORM\Entity\Traits; use BackedEnum; use Doctrine\ORM\Mapping as ORM; diff --git a/src/Traits/Timestamp.php b/src/Entity/Traits/Timestamp.php similarity index 96% rename from src/Traits/Timestamp.php rename to src/Entity/Traits/Timestamp.php index a673694..aaa73b0 100644 --- a/src/Traits/Timestamp.php +++ b/src/Entity/Traits/Timestamp.php @@ -5,7 +5,7 @@ * @license MIT License */ -namespace JuniWalk\ORM\Traits; +namespace JuniWalk\ORM\Entity\Traits; use DateTime; use DateTimeInterface; diff --git a/src/Traits/Ownership.php b/src/Traits/Ownership.php deleted file mode 100644 index 94e27be..0000000 --- a/src/Traits/Ownership.php +++ /dev/null @@ -1,17 +0,0 @@ -