From 73d25838469fb4d18b474468cd99f840782d1cd3 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Sun, 13 Jan 2019 15:25:54 +0100 Subject: [PATCH] Optimized Entities --- application/symfony/src/Entity/AbstractEntity.php | 5 ----- application/symfony/src/Entity/Attribut/TypeAttribut.php | 2 ++ application/symfony/src/Entity/EntityInterface.php | 6 ------ application/symfony/src/Entity/Meta/Right.php | 2 ++ 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/application/symfony/src/Entity/AbstractEntity.php b/application/symfony/src/Entity/AbstractEntity.php index 2a8c413..8309db3 100644 --- a/application/symfony/src/Entity/AbstractEntity.php +++ b/application/symfony/src/Entity/AbstractEntity.php @@ -33,9 +33,4 @@ abstract class AbstractEntity implements EntityInterface { $this->version = 0; } - - public function __toString(): string - { - return __CLASS__.':'.spl_object_hash($this); - } } diff --git a/application/symfony/src/Entity/Attribut/TypeAttribut.php b/application/symfony/src/Entity/Attribut/TypeAttribut.php index 472490f..d2d2687 100644 --- a/application/symfony/src/Entity/Attribut/TypeAttribut.php +++ b/application/symfony/src/Entity/Attribut/TypeAttribut.php @@ -3,6 +3,8 @@ namespace App\Entity\Attribut; /** + * @todo Implement a trait for crud which substitute this one. + * * @author kevinfrantz */ trait TypeAttribut diff --git a/application/symfony/src/Entity/EntityInterface.php b/application/symfony/src/Entity/EntityInterface.php index b10114d..2d66f70 100644 --- a/application/symfony/src/Entity/EntityInterface.php +++ b/application/symfony/src/Entity/EntityInterface.php @@ -10,10 +10,4 @@ use App\Entity\Attribut\IdAttributInterface; */ interface EntityInterface extends VersionAttributInterface, IdAttributInterface { - /** - * Allows easier debuging. - * - * @return string - */ - public function __toString(): string; } diff --git a/application/symfony/src/Entity/Meta/Right.php b/application/symfony/src/Entity/Meta/Right.php index ea95cbf..108c261 100644 --- a/application/symfony/src/Entity/Meta/Right.php +++ b/application/symfony/src/Entity/Meta/Right.php @@ -19,6 +19,8 @@ use App\Exception\NoValidChoiceException; use App\DBAL\Types\Meta\Right\CRUDType; /** + * @todo Remove relation attribut! + * * @author kevinfrantz * @ORM\Table(name="meta_right") * @ORM\Entity(repositoryClass="App\Repository\RightRepository")