public function addMember(GroupMemberInterface $member)
    {
        if ($this->members->contains($member)) {
            throw new \InvalidArgumentException('This entity is already a member of this group');
        }

        $this->members->add($member);
    }
public function addMember(GroupMemberInterface $member)
    {
        if ($this->members->contains($member)) {
            throw new \InvalidArgumentException('This entity is already a member of this group');
        }

        $this->members->add($member);
    }
public function addMember ( GroupMemberInterface $ member ) { if ( $ this -> members -> contains ( $ member ) ) { throw new \ InvalidArgumentException ( 'This entity is already a member of this group' ) ; } $ this -> members -> add ( $ member ) ; }
Add a member to the collection.

@param GroupMemberInterface $member
Add a member to the collection .