File: /var/www/vhosts/uyarreklam.com.tr/httpdocs/InvalidArgument.php.tar
var/www/vhosts/uyarreklam.com.tr/httpdocs/wp-includes/Requests/src/Exception/InvalidArgument.php 0000644 00000002122 15154554446 0027321 0 ustar 00 <?php
namespace WpOrg\Requests\Exception;
use InvalidArgumentException;
/**
* Exception for an invalid argument passed.
*
* @package Requests\Exceptions
* @since 2.0.0
*/
final class InvalidArgument extends InvalidArgumentException {
/**
* Create a new invalid argument exception with a standardized text.
*
* @param int $position The argument position in the function signature. 1-based.
* @param string $name The argument name in the function signature.
* @param string $expected The argument type expected as a string.
* @param string $received The actual argument type received.
*
* @return \WpOrg\Requests\Exception\InvalidArgument
*/
public static function create($position, $name, $expected, $received) {
// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
$stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
return new self(
sprintf(
'%s::%s(): Argument #%d (%s) must be of type %s, %s given',
$stack[1]['class'],
$stack[1]['function'],
$position,
$name,
$expected,
$received
)
);
}
}
httpdocs/wp-content/plugins/google-listings-and-ads/src/Exception/InvalidArgument.php 0000644 00000001425 15155062466 0033371 0 ustar 00 var/www/vhosts/uyarreklam.com.tr <?php
declare( strict_types=1 );
namespace Automattic\WooCommerce\GoogleListingsAndAds\Exception;
use InvalidArgumentException;
defined( 'ABSPATH' ) || exit;
/**
* Class InvalidArgument
*
* @package Automattic\WooCommerce\GoogleListingsAndAds\Exception
*/
class InvalidArgument extends InvalidArgumentException implements GoogleListingsAndAdsException {
/**
* Create a new instance of the exception when an argument value is not an object.
*
* @param string $name The name of the argument.
* @param string $method The name of the method/function.
*
* @return static
*/
public static function not_object( string $name, string $method ) {
return new static( sprintf( 'The argument "%s" provided to the function "%s" must be an object.', $name, $method ) );
}
}