fXmlRpc\Exception\InvalidArgumentException::expectedParameter PHP Method

expectedParameter() public static method

public static expectedParameter ( $position, $expected, $actualValue )
    public static function expectedParameter($position, $expected, $actualValue)
    {
        return new static(sprintf('Expected parameter %d to be of type "%s", "%s" given', $position, $expected, is_object($actualValue) ? sprintf('%s" of type "%s', gettype($actualValue), get_class($actualValue)) : gettype($actualValue)));
    }

Usage Example

 /** {@inheritdoc} */
 public function addCall($methodName, array $params = [], callable $onSuccess = null, callable $onError = null)
 {
     if (!is_string($methodName)) {
         throw InvalidArgumentException::expectedParameter(1, 'string', $methodName);
     }
     $this->calls[$this->index] = compact('methodName', 'params');
     $this->handlers[$this->index] = compact('onSuccess', 'onError');
     ++$this->index;
     return $this;
 }
All Usage Examples Of fXmlRpc\Exception\InvalidArgumentException::expectedParameter
InvalidArgumentException