Renamed GroupSourcesAttribut to MembershipsAttribut and Implemented\Optimized tests

This commit is contained in:
Kevin Frantz
2018-11-01 20:42:18 +01:00
parent 5f18245b73
commit 61186470da
10 changed files with 139 additions and 88 deletions

View File

@@ -1,33 +0,0 @@
<?php
namespace App\Entity\Attribut;
use Doctrine\Common\Collections\Collection;
use App\Entity\Source\GroupSourceInterface;
/**
* @author kevinfrantz
*/
trait GroupSourcesAttribut
{
/**
* @var Collection|GroupSourceInterface[]
*/
protected $groups;
/**
* @return Collection|GroupSourceInterface[]
*/
public function getGroupSources(): Collection
{
return $this->groups;
}
/**
* @param Collection|GroupSourceInterface[] $groups
*/
public function setGroupSources(Collection $groups): void
{
$this->groups = $groups;
}
}

View File

@@ -1,22 +0,0 @@
<?php
namespace App\Entity\Attribut;
use Doctrine\Common\Collections\Collection;
use App\Entity\Source\GroupSourceInterface;
/**
* @author kevinfrantz
*/
interface GroupSourcesAttributInterface
{
/**
* @param Collection|GroupSourceInterface[] $groups
*/
public function setGroupSources(Collection $groups): void;
/**
* @return Collection|GroupSourceInterface[]
*/
public function getGroupSources(): Collection;
}

View File

@@ -0,0 +1,34 @@
<?php
namespace App\Entity\Attribut;
use Doctrine\Common\Collections\Collection;
use App\Entity\Source\GroupSourceInterface;
use App\Entity\Source\Collection\MemberCollectionSourceInterface;
/**
* @author kevinfrantz
*/
trait MembershipsAttribut
{
/**
* @var Collection|MemberCollectionSourceInterface[]
*/
protected $memberships;
/**
* @return Collection|MemberCollectionSourceInterface[]
*/
public function getMemberships(): Collection
{
return $this->memberships;
}
/**
* @param Collection|MemberCollectionSourceInterface[] $memberships
*/
public function setMemberships(Collection $memberships): void
{
$this->memberships = $memberships;
}
}

View File

@@ -0,0 +1,22 @@
<?php
namespace App\Entity\Attribut;
use Doctrine\Common\Collections\Collection;
use App\Entity\Source\Collection\MemberCollectionSourceInterface;
/**
* @author kevinfrantz
*/
interface MembershipsAttributInterface
{
/**
* @param Collection|MemberCollectionSourceInterface[] $groups
*/
public function setMemberships(Collection $memberships): void;
/**
* @return Collection|MemberCollectionSourceInterface[]
*/
public function getMemberships(): Collection;
}