Added PHPDoc

This commit is contained in:
Kevin Frantz 2019-03-28 12:53:24 +01:00
parent 4d9813a93d
commit 4a129b172b
2 changed files with 29 additions and 0 deletions

View File

@ -18,11 +18,20 @@ final class MemberManager implements MemberManagerInterface
*/
private $memberRelation;
/**
*
* @param MemberRelationInterface $memberRelation
*/
public function __construct(MemberRelationInterface $memberRelation)
{
$this->memberRelation = $memberRelation;
}
/**
*
* {@inheritDoc}
* @see \Infinito\Domain\MemberManagement\MemberManagerInterface::addMember()
*/
public function addMember(MemberRelationInterface $member): void
{
if (!$this->memberRelation->getMembers()->contains($member)) {
@ -31,6 +40,11 @@ final class MemberManager implements MemberManagerInterface
}
}
/**
*
* {@inheritDoc}
* @see \Infinito\Domain\MemberManagement\MemberManagerInterface::removeMember()
*/
public function removeMember(MemberRelationInterface $member): void
{
if ($this->memberRelation->getMembers()->contains($member)) {
@ -39,6 +53,11 @@ final class MemberManager implements MemberManagerInterface
}
}
/**
*
* {@inheritDoc}
* @see \Infinito\Domain\MemberManagement\MemberManagerInterface::addMembership()
*/
public function addMembership(MemberRelationInterface $membership): void
{
if (!$this->memberRelation->getMemberships()->contains($membership)) {
@ -47,6 +66,11 @@ final class MemberManager implements MemberManagerInterface
}
}
/**
*
* {@inheritDoc}
* @see \Infinito\Domain\MemberManagement\MemberManagerInterface::removeMembership()
*/
public function removeMembership(MemberRelationInterface $membership): void
{
if ($this->memberRelation->getMemberships()->contains($membership)) {

View File

@ -4,6 +4,11 @@ namespace Infinito\Domain\MemberManagement;
use Infinito\Entity\Meta\Relation\Member\MemberRelationInterface;
/**
*
* @author kevinfrantz
*
*/
interface MemberManagerInterface
{
/**