From 1252f41127ef4fb51b8fbc42a66dea3a00888ee6 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Sun, 25 Nov 2018 23:19:38 +0100 Subject: [PATCH] Implemented orm entity tags and formated code --- .../Entity/Attribut/CreatorRelationAttribut.php | 12 +++++++----- .../Attribut/CreatorRelationAttributInterface.php | 7 ++++--- .../src/Entity/Attribut/ParentRelationAttribut.php | 14 ++++++++------ .../Attribut/ParentRelationAttributInterface.php | 8 ++++---- .../Relation/Member/MemberRelationInterface.php | 2 +- .../Meta/Relation/Parent/CreatorRelation.php | 4 ++++ .../Meta/Relation/Parent/HeredityRelation.php | 4 ++++ application/src/Entity/Source/AbstractSource.php | 4 ++-- application/src/Entity/Source/SourceInterface.php | 2 +- .../Attribut/CreatorRelationAttributTest.php | 3 --- .../Unit/Entity/Source/AbstractSourceTest.php | 1 - 11 files changed, 35 insertions(+), 26 deletions(-) diff --git a/application/src/Entity/Attribut/CreatorRelationAttribut.php b/application/src/Entity/Attribut/CreatorRelationAttribut.php index 7c15a1d..fa91d85 100644 --- a/application/src/Entity/Attribut/CreatorRelationAttribut.php +++ b/application/src/Entity/Attribut/CreatorRelationAttribut.php @@ -1,4 +1,5 @@ creatorRelation = $creatorRelation; } - - public function getCreatorRelation():CreatorRelationInterface{ + + public function getCreatorRelation(): CreatorRelationInterface + { return $this->creatorRelation; } } - diff --git a/application/src/Entity/Attribut/CreatorRelationAttributInterface.php b/application/src/Entity/Attribut/CreatorRelationAttributInterface.php index b1f89c5..cea3475 100644 --- a/application/src/Entity/Attribut/CreatorRelationAttributInterface.php +++ b/application/src/Entity/Attribut/CreatorRelationAttributInterface.php @@ -1,4 +1,5 @@ parentRelation = $parentRelation; } - - public function getParentRelation():ParentRelationInterface{ + + public function getParentRelation(): ParentRelationInterface + { return $this->parentRelation; } -} \ No newline at end of file +} diff --git a/application/src/Entity/Attribut/ParentRelationAttributInterface.php b/application/src/Entity/Attribut/ParentRelationAttributInterface.php index 2c24e26..b05892c 100644 --- a/application/src/Entity/Attribut/ParentRelationAttributInterface.php +++ b/application/src/Entity/Attribut/ParentRelationAttributInterface.php @@ -1,12 +1,12 @@ creatorRelation->setSource($this); $this->law = new Law(); $this->law->setSource($this); - /** - * + /* + * * @todo Refactor the following attibutes */ $this->memberships = new ArrayCollection(); diff --git a/application/src/Entity/Source/SourceInterface.php b/application/src/Entity/Source/SourceInterface.php index 5a77a92..d5e930f 100644 --- a/application/src/Entity/Source/SourceInterface.php +++ b/application/src/Entity/Source/SourceInterface.php @@ -13,6 +13,6 @@ use App\Entity\Attribut\CreatorRelationAttributInterface; /** * @author kevinfrantz */ -interface SourceInterface extends IdAttributInterface, EntityInterface, MembershipsAttributInterface, LawAttributInterface, SlugAttributInterface, MembersAttributInterface,CreatorRelationAttributInterface +interface SourceInterface extends IdAttributInterface, EntityInterface, MembershipsAttributInterface, LawAttributInterface, SlugAttributInterface, MembersAttributInterface, CreatorRelationAttributInterface { } diff --git a/application/tests/Unit/Entity/Attribut/CreatorRelationAttributTest.php b/application/tests/Unit/Entity/Attribut/CreatorRelationAttributTest.php index f2ee5f1..57f8686 100644 --- a/application/tests/Unit/Entity/Attribut/CreatorRelationAttributTest.php +++ b/application/tests/Unit/Entity/Attribut/CreatorRelationAttributTest.php @@ -3,9 +3,6 @@ namespace App\Tests\Unit\Entity\Attribut; use PHPUnit\Framework\TestCase; -use App\Entity\Attribut\ParentRelationAttributInterface; -use App\Entity\Attribut\ParentRelationAttribut; -use App\Entity\Meta\Relation\Parent\ParentRelationInterface; use App\Entity\Attribut\CreatorRelationAttributInterface; use App\Entity\Attribut\CreatorRelationAttribut; use App\Entity\Meta\Relation\CreatorRelationInterface; diff --git a/application/tests/Unit/Entity/Source/AbstractSourceTest.php b/application/tests/Unit/Entity/Source/AbstractSourceTest.php index e538d4d..44298d5 100644 --- a/application/tests/Unit/Entity/Source/AbstractSourceTest.php +++ b/application/tests/Unit/Entity/Source/AbstractSourceTest.php @@ -5,7 +5,6 @@ namespace tests\unit\Entity\Source; use PHPUnit\Framework\TestCase; use App\Entity\Source\SourceInterface; use App\Entity\Meta\LawInterface; -use App\Entity\Meta\RelationInterface; use Doctrine\Common\Collections\Collection; use App\Entity\Source\AbstractSource; use App\Entity\EntityInterface;