diff --git a/src/Result/Collection/Participants.php b/src/Result/Collection/Participants.php index dfa65c9..f292dfa 100644 --- a/src/Result/Collection/Participants.php +++ b/src/Result/Collection/Participants.php @@ -40,6 +40,14 @@ class Participants extends Collection throw new DisabledMethodException(__METHOD__, 'addParticipants'); } + /** + * {@inheritdoc} + */ + public function has($element) + { + throw new DisabledMethodException(__METHOD__, 'hasParticipantsOfSurvey'); + } + /** * Adds participants of given survey * diff --git a/tests/Result/Collection/ParticipantsTest.php b/tests/Result/Collection/ParticipantsTest.php index d93e049..bfdb304 100644 --- a/tests/Result/Collection/ParticipantsTest.php +++ b/tests/Result/Collection/ParticipantsTest.php @@ -61,6 +61,12 @@ class ParticipantsTest extends BaseTestCase (new Participants())->addMultiple([]); } + public function testHas() + { + $this->expectException(DisabledMethodException::class); + (new Participants())->has(new Participant()); + } + public function testAddParticipantsWithoutParticipants() { $surveyId = 1;