mirror of
				https://github.com/kevinveenbirkenbach/infinito.git
				synced 2025-10-31 09:19:08 +00:00 
			
		
		
		
	Implemented orm entity tags and formated code
This commit is contained in:
		| @@ -1,4 +1,5 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\Meta\Relation\CreatorRelationInterface; | ||||
| @@ -9,13 +10,14 @@ trait CreatorRelationAttribut | ||||
|      * @var CreatorRelationInterface | ||||
|      */ | ||||
|     protected $creatorRelation; | ||||
|      | ||||
|     public function setCreatorRelation(CreatorRelationInterface $creatorRelation){ | ||||
|  | ||||
|     public function setCreatorRelation(CreatorRelationInterface $creatorRelation) | ||||
|     { | ||||
|         $this->creatorRelation = $creatorRelation; | ||||
|     } | ||||
|      | ||||
|     public function getCreatorRelation():CreatorRelationInterface{ | ||||
|  | ||||
|     public function getCreatorRelation(): CreatorRelationInterface | ||||
|     { | ||||
|         return $this->creatorRelation; | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -1,4 +1,5 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\Meta\Relation\CreatorRelationInterface; | ||||
| @@ -6,6 +7,6 @@ use App\Entity\Meta\Relation\CreatorRelationInterface; | ||||
| interface CreatorRelationAttributInterface | ||||
| { | ||||
|     public function setCreatorRelation(CreatorRelationInterface $creatorRelation); | ||||
|      | ||||
|     public function getCreatorRelation():CreatorRelationInterface; | ||||
| } | ||||
|  | ||||
|     public function getCreatorRelation(): CreatorRelationInterface; | ||||
| } | ||||
|   | ||||
| @@ -1,4 +1,5 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\Meta\Relation\Parent\ParentRelationInterface; | ||||
| @@ -6,16 +7,17 @@ use App\Entity\Meta\Relation\Parent\ParentRelationInterface; | ||||
| trait ParentRelationAttribut | ||||
| { | ||||
|     /** | ||||
|      *  | ||||
|      * @var ParentRelationInterface | ||||
|      */ | ||||
|     protected $parentRelation; | ||||
|      | ||||
|     public function setParentRelation(ParentRelationInterface $parentRelation):void{ | ||||
|  | ||||
|     public function setParentRelation(ParentRelationInterface $parentRelation): void | ||||
|     { | ||||
|         $this->parentRelation = $parentRelation; | ||||
|     } | ||||
|      | ||||
|     public function getParentRelation():ParentRelationInterface{ | ||||
|  | ||||
|     public function getParentRelation(): ParentRelationInterface | ||||
|     { | ||||
|         return $this->parentRelation; | ||||
|     } | ||||
| } | ||||
| } | ||||
|   | ||||
| @@ -1,12 +1,12 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Entity\Attribut; | ||||
|  | ||||
| use App\Entity\Meta\Relation\Parent\ParentRelationInterface; | ||||
|  | ||||
| interface ParentRelationAttributInterface | ||||
| { | ||||
|     public function setParentRelation(ParentRelationInterface $parentRelation):void; | ||||
|      | ||||
|     public function getParentRelation():ParentRelationInterface; | ||||
| }  | ||||
|     public function setParentRelation(ParentRelationInterface $parentRelation): void; | ||||
|  | ||||
|     public function getParentRelation(): ParentRelationInterface; | ||||
| } | ||||
|   | ||||
| @@ -8,4 +8,4 @@ use App\Entity\Attribut\MembershipsAttributInterface; | ||||
|  | ||||
| interface MemberRelationInterface extends RelationInterface, MembersAttributInterface, MembershipsAttributInterface | ||||
| { | ||||
| } | ||||
| } | ||||
|   | ||||
| @@ -6,6 +6,10 @@ use Doctrine\ORM\Mapping as ORM; | ||||
| use Doctrine\Common\Collections\Collection; | ||||
| use App\Entity\Meta\Relation\CreatorRelationInterface; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|  * @ORM\Entity() | ||||
|  */ | ||||
| class CreatorRelation extends AbstractParentRelation | ||||
| { | ||||
|     /** | ||||
|   | ||||
| @@ -5,6 +5,10 @@ namespace App\Entity\Meta\Relation\Parent; | ||||
| use Doctrine\Common\Collections\Collection; | ||||
| use Doctrine\ORM\Mapping as ORM; | ||||
|  | ||||
| /** | ||||
|  * @author kevinfrantz | ||||
|  * @ORM\Entity() | ||||
|  */ | ||||
| class HeredityRelation extends AbstractParentRelation implements HeredityRelationInterface | ||||
| { | ||||
|     /** | ||||
|   | ||||
| @@ -101,8 +101,8 @@ abstract class AbstractSource extends AbstractEntity implements SourceInterface | ||||
|         $this->creatorRelation->setSource($this); | ||||
|         $this->law = new Law(); | ||||
|         $this->law->setSource($this); | ||||
|         /** | ||||
|          *  | ||||
|         /* | ||||
|          * | ||||
|          * @todo Refactor the following attibutes | ||||
|          */ | ||||
|         $this->memberships = new ArrayCollection(); | ||||
|   | ||||
| @@ -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 | ||||
| { | ||||
| } | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user