Team Ai
Apppublic

errorcode418/php

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
InvalidArgumentException.php35 linesDownload Raw Back to Exception
1<?php2/**3 * ua-parser4 *5 * Copyright (c) 2011-2012 Dave Olsen, http://dmolsen.com6 *7 * Released under the MIT license8 */9namespace UAParser\Exception;10 11use InvalidArgumentException as BaseInvalidArgumentException;12 13class InvalidArgumentException extends BaseInvalidArgumentException14{15    public static function oneOfCommandArguments()16    {17        return new static(18            sprintf('One of the command arguments "%s" is required', join('", "', func_get_args()))19        );20    }21 22    public static function unexpectedArgument($expectedType, $actualType, $position, $symbol)23    {24        return new static(25            sprintf(26                'Argument %d of %s() is expected to be of type "%s", got "%s"',27                $position,28                $symbol,29                $expectedType,30                $actualType31            )32        );33    }34}35