mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 14:07:25 +01:00
Implemented orm entity tags and formated code
This commit is contained in:
parent
884c4cfaea
commit
1252f41127
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entity\Attribut;
|
||||
|
||||
use App\Entity\Meta\Relation\CreatorRelationInterface;
|
||||
@ -10,12 +11,13 @@ trait CreatorRelationAttribut
|
||||
*/
|
||||
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;
|
||||
@ -7,5 +8,5 @@ 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 setParentRelation(ParentRelationInterface $parentRelation): void;
|
||||
|
||||
public function getParentRelation():ParentRelationInterface;
|
||||
public function getParentRelation(): ParentRelationInterface;
|
||||
}
|
||||
|
||||
|
@ -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,7 +101,7 @@ abstract class AbstractSource extends AbstractEntity implements SourceInterface
|
||||
$this->creatorRelation->setSource($this);
|
||||
$this->law = new Law();
|
||||
$this->law->setSource($this);
|
||||
/**
|
||||
/*
|
||||
*
|
||||
* @todo Refactor the following attibutes
|
||||
*/
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user