/** * Constructor * * @param string $name * @param array $types * @param mixed $value */ public function __construct(string $name, array $types, $value) { $this->argumentName = $name; $this->argumentTypes = $types; $this->argumentValue = $value; parent::__construct('The parameter ' . $this->argumentName . ' was called with the value ' . serialize($value) . ', which is not valid [' . implode(',', $this->argumentTypes) . '].', 4); }
/** * Constructor * * @param int $version */ public function __construct(int $expectedVersion) { $this->expectedVersion = $expectedVersion; $this->setStatusCode(404); parent::__construct('The requested API version ' . (int) $expectedVersion . ' is not available.', 6); }