From 1087c6b2adf1fee252e03f5f04be22f173e3dee5 Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Mon, 24 Sep 2018 18:41:26 +0200 Subject: [PATCH] Optimized Interface structure --- .../Modificator/Entity/LawModificator.php | 8 ++++---- application/src/Entity/AbstractSource.php | 2 ++ .../src/Entity/Attribut/ChildsAttribut.php | 2 +- .../BlacklistAttributInterface.php | 2 +- .../ChildsAttributeInterface.php | 2 +- .../ConditionAttributInterface.php | 2 +- .../GrantAttributInterface.php | 2 +- .../{ => Interfaces}/IdAttributInterface.php | 2 +- .../{ => Interfaces}/LawAttributInterface.php | 4 ++-- .../LayerAttributInterface.php | 2 +- .../NameAttributInterface.php | 2 +- .../NameSourceAttributInterface.php | 4 ++-- .../NodeAttributInterface.php | 4 ++-- .../ParentAttributInterface.php | 2 +- .../ParentsAttributInterface.php | 2 +- .../RecieverAttributInterface.php | 2 +- .../RecieverGroupAttributInterface.php | 4 ++-- .../RightAttributInterface.php | 4 ++-- .../RightsAttributInterface.php | 2 +- .../SourceAttributInterface.php | 4 ++-- .../TypeAttributInterface.php | 2 +- .../Interfaces/UserAttributInterface.php | 15 +++++++++++++++ .../UserSourceAttributInterface.php | 4 ++-- .../WhitelistAttributInterface.php | 2 +- .../src/Entity/Attribut/LawAttribut.php | 2 +- .../Entity/Attribut/NameSourceAttribut.php | 2 +- .../src/Entity/Attribut/NodeAttribut.php | 2 +- .../src/Entity/Attribut/ParentAttribut.php | 2 ++ .../src/Entity/Attribut/ParentsAttribut.php | 2 +- .../Entity/Attribut/RecieverGroupAttribut.php | 2 +- .../src/Entity/Attribut/RightAttribut.php | 2 +- .../src/Entity/Attribut/SourceAttribut.php | 2 +- .../src/Entity/Attribut/UserAttribut.php | 5 +++-- .../Entity/Attribut/UserAttributInterface.php | 15 --------------- .../Entity/Attribut/UserSourceAttribut.php | 2 +- .../src/Entity/Interfaces/LawInterface.php | 14 ++++++++++++++ .../{ => Interfaces}/NameSourceInterface.php | 4 ++-- .../src/Entity/Interfaces/NodeInterface.php | 16 ++++++++++++++++ .../RecieverGroupInterface.php | 6 +++--- .../src/Entity/Interfaces/RightInterface.php | 19 +++++++++++++++++++ .../src/Entity/Interfaces/SourceInterface.php | 13 +++++++++++++ .../src/Entity/Interfaces/UserInterface.php | 15 +++++++++++++++ .../Entity/Interfaces/UserSourceInterface.php | 13 +++++++++++++ application/src/Entity/Law.php | 2 ++ application/src/Entity/LawInterface.php | 14 -------------- .../{ => Interfaces}/NodeGrantedInterface.php | 4 ++-- application/src/Entity/NameSource.php | 1 + application/src/Entity/Node.php | 3 +++ application/src/Entity/NodeInterface.php | 16 ---------------- application/src/Entity/RecieverGroup.php | 2 ++ application/src/Entity/Right.php | 4 ++++ application/src/Entity/RightInterface.php | 19 ------------------- application/src/Entity/SourceInterface.php | 13 ------------- application/src/Entity/User.php | 6 ++++-- application/src/Entity/UserSource.php | 2 ++ .../src/Entity/UserSourceInterface.php | 13 ------------- 56 files changed, 177 insertions(+), 141 deletions(-) rename application/src/Entity/Attribut/{ => Interfaces}/BlacklistAttributInterface.php (80%) rename application/src/Entity/Attribut/{ => Interfaces}/ChildsAttributeInterface.php (84%) rename application/src/Entity/Attribut/{ => Interfaces}/ConditionAttributInterface.php (87%) rename application/src/Entity/Attribut/{ => Interfaces}/GrantAttributInterface.php (79%) rename application/src/Entity/Attribut/{ => Interfaces}/IdAttributInterface.php (78%) rename application/src/Entity/Attribut/{ => Interfaces}/LawAttributInterface.php (67%) rename application/src/Entity/Attribut/{ => Interfaces}/LayerAttributInterface.php (80%) rename application/src/Entity/Attribut/{ => Interfaces}/NameAttributInterface.php (79%) rename application/src/Entity/Attribut/{ => Interfaces}/NameSourceAttributInterface.php (70%) rename application/src/Entity/Attribut/{ => Interfaces}/NodeAttributInterface.php (68%) rename application/src/Entity/Attribut/{ => Interfaces}/ParentAttributInterface.php (83%) rename application/src/Entity/Attribut/{ => Interfaces}/ParentsAttributInterface.php (84%) rename application/src/Entity/Attribut/{ => Interfaces}/RecieverAttributInterface.php (80%) rename application/src/Entity/Attribut/{ => Interfaces}/RecieverGroupAttributInterface.php (71%) rename application/src/Entity/Attribut/{ => Interfaces}/RightAttributInterface.php (68%) rename application/src/Entity/Attribut/{ => Interfaces}/RightsAttributInterface.php (84%) rename application/src/Entity/Attribut/{ => Interfaces}/SourceAttributInterface.php (69%) rename application/src/Entity/Attribut/{ => Interfaces}/TypeAttributInterface.php (79%) create mode 100644 application/src/Entity/Attribut/Interfaces/UserAttributInterface.php rename application/src/Entity/Attribut/{ => Interfaces}/UserSourceAttributInterface.php (70%) rename application/src/Entity/Attribut/{ => Interfaces}/WhitelistAttributInterface.php (80%) delete mode 100644 application/src/Entity/Attribut/UserAttributInterface.php create mode 100644 application/src/Entity/Interfaces/LawInterface.php rename application/src/Entity/{ => Interfaces}/NameSourceInterface.php (57%) create mode 100644 application/src/Entity/Interfaces/NodeInterface.php rename application/src/Entity/{ => Interfaces}/RecieverGroupInterface.php (60%) create mode 100644 application/src/Entity/Interfaces/RightInterface.php create mode 100644 application/src/Entity/Interfaces/SourceInterface.php create mode 100644 application/src/Entity/Interfaces/UserInterface.php create mode 100644 application/src/Entity/Interfaces/UserSourceInterface.php delete mode 100644 application/src/Entity/LawInterface.php rename application/src/Entity/Method/{ => Interfaces}/NodeGrantedInterface.php (66%) delete mode 100644 application/src/Entity/NodeInterface.php delete mode 100644 application/src/Entity/RightInterface.php delete mode 100644 application/src/Entity/SourceInterface.php delete mode 100644 application/src/Entity/UserSourceInterface.php diff --git a/application/src/Creator/Modificator/Entity/LawModificator.php b/application/src/Creator/Modificator/Entity/LawModificator.php index 597a8b8..573ca79 100644 --- a/application/src/Creator/Modificator/Entity/LawModificator.php +++ b/application/src/Creator/Modificator/Entity/LawModificator.php @@ -4,12 +4,12 @@ namespace App\Creator\Modificator\Entity; use App\DBAL\Types\LayerType; use App\DBAL\Types\RightType; -use App\Entity\NodeInterface; +use App\Entity\Interfaces\NodeInterface; use App\Entity\Right; -use App\Entity\LawInterface; +use App\Entity\Interfaces\LawInterface; use App\DBAL\Types\RecieverType; -use App\Entity\RightInterface; -use App\Entity\RecieverGroupInterface; +use App\Entity\Interfaces\RightInterface; +use App\Entity\Interfaces\RecieverGroupInterface; use App\Entity\RecieverGroup; /** diff --git a/application/src/Entity/AbstractSource.php b/application/src/Entity/AbstractSource.php index fe4c460..05f713e 100644 --- a/application/src/Entity/AbstractSource.php +++ b/application/src/Entity/AbstractSource.php @@ -5,6 +5,8 @@ namespace App\Entity; use App\Entity\Attribut\NodeAttribut; use Doctrine\ORM\Mapping as ORM; use JMS\Serializer\Annotation\Exclude; +use App\Entity\Interfaces\SourceInterface; +use App\Entity\Interfaces\NodeInterface; /** * @author kevinfrantz diff --git a/application/src/Entity/Attribut/ChildsAttribut.php b/application/src/Entity/Attribut/ChildsAttribut.php index 770f907..05c169a 100644 --- a/application/src/Entity/Attribut/ChildsAttribut.php +++ b/application/src/Entity/Attribut/ChildsAttribut.php @@ -2,7 +2,7 @@ namespace App\Entity\Attribut; -use App\Entity\NodeInterface; +use App\Entity\Interfaces\NodeInterface; use Doctrine\Common\Collections\Collection; /** diff --git a/application/src/Entity/Attribut/BlacklistAttributInterface.php b/application/src/Entity/Attribut/Interfaces/BlacklistAttributInterface.php similarity index 80% rename from application/src/Entity/Attribut/BlacklistAttributInterface.php rename to application/src/Entity/Attribut/Interfaces/BlacklistAttributInterface.php index 1ca7497..e26a198 100644 --- a/application/src/Entity/Attribut/BlacklistAttributInterface.php +++ b/application/src/Entity/Attribut/Interfaces/BlacklistAttributInterface.php @@ -1,6 +1,6 @@ user = $user; } - public function getUser(): User + public function getUser(): UserInterface { return $this->user; } diff --git a/application/src/Entity/Attribut/UserAttributInterface.php b/application/src/Entity/Attribut/UserAttributInterface.php deleted file mode 100644 index 0731341..0000000 --- a/application/src/Entity/Attribut/UserAttributInterface.php +++ /dev/null @@ -1,15 +0,0 @@ -