EasyPost\EasypostResource::_validate PHP Метод

_validate() приватный статический Метод

private static _validate ( string $method, array $params = null, string $apiKey = null )
$method string
$params array
$apiKey string
    private static function _validate($method, $params = null, $apiKey = null)
    {
        if ($params && !is_array($params)) {
            throw new Error("You must pass an array as the first argument to EasyPost API method calls.");
        }
        if ($apiKey && !is_string($apiKey)) {
            throw new Error('The second argument to EasyPost API method calls is an optional per-request apiKey, which must be a string.');
        }
    }