public static function boolean($value, $message = '')
{
if (!is_bool($value)) {
static::reportInvalidArgument(sprintf($message ?: 'Expected a boolean. Got: %s', static::typeToString($value)));
}
}
/** * @param string $variableName * @param Type $type * @param bool $isVariadic * @param Description $description */ public function __construct($variableName, Type $type = null, $isVariadic = false, Description $description = null) { Assert::string($variableName); Assert::boolean($isVariadic); $this->variableName = $variableName; $this->type = $type; $this->isVariadic = $isVariadic; $this->description = $description; }