mirror of
https://github.com/wiosna-dev/limesurvey-api-client.git
synced 2026-03-12 02:11:45 +01:00
Composer > meritoo/common-library package > use latest version
This commit is contained in:
@@ -18,7 +18,7 @@ abstract class BaseParticipantsCollection extends Collection
|
||||
*/
|
||||
public function add($element, $index = null)
|
||||
{
|
||||
throw new DisabledMethodException(__METHOD__, 'addParticipant');
|
||||
throw DisabledMethodException::create(__METHOD__, 'addParticipant');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -26,7 +26,7 @@ abstract class BaseParticipantsCollection extends Collection
|
||||
*/
|
||||
public function addMultiple($elements, $useIndexes = false)
|
||||
{
|
||||
throw new DisabledMethodException(__METHOD__, 'addParticipants');
|
||||
throw DisabledMethodException::create(__METHOD__, 'addParticipants');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,7 +34,7 @@ abstract class BaseParticipantsCollection extends Collection
|
||||
*/
|
||||
public function has($element)
|
||||
{
|
||||
throw new DisabledMethodException(__METHOD__, 'hasParticipantsOfSurvey');
|
||||
throw DisabledMethodException::create(__METHOD__, 'hasParticipantsOfSurvey');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,10 +20,16 @@ use Meritoo\LimeSurvey\ApiClient\Type\MethodType;
|
||||
class UnknownMethodException extends UnknownTypeException
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* Creates exception
|
||||
*
|
||||
* @param string $unknownMethod Name of unknown method used while talking to the LimeSurvey's API
|
||||
* @return UnknownMethodException
|
||||
*/
|
||||
public function __construct($unknownType)
|
||||
public static function createException($unknownMethod)
|
||||
{
|
||||
parent::__construct($unknownType, new MethodType(), 'name of method used while talking to the LimeSurvey\'s API');
|
||||
/* @var UnknownMethodException $exception */
|
||||
$exception = parent::create($unknownMethod, new MethodType(), 'name of method used while talking to the LimeSurvey\'s API');
|
||||
|
||||
return $exception;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class SurveysSummaries extends Collection
|
||||
*/
|
||||
public function add($element, $index = null)
|
||||
{
|
||||
throw new DisabledMethodException(__METHOD__, 'addSurveySummary');
|
||||
throw DisabledMethodException::create(__METHOD__, 'addSurveySummary');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -33,7 +33,7 @@ class SurveysSummaries extends Collection
|
||||
*/
|
||||
public function addMultiple($elements, $useIndexes = false)
|
||||
{
|
||||
throw new DisabledMethodException(__METHOD__, 'addSurveysSummaries');
|
||||
throw DisabledMethodException::create(__METHOD__, 'addSurveysSummaries');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -41,7 +41,7 @@ class SurveysSummaries extends Collection
|
||||
*/
|
||||
public function has($element)
|
||||
{
|
||||
throw new DisabledMethodException(__METHOD__, 'hasSurveySummary');
|
||||
throw DisabledMethodException::create(__METHOD__, 'hasSurveySummary');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user