Current Path : /storage/v11800/romasitenew/public_html/wp-content/plugins/google-listings-and-ads/src/Exception/ |
Linux v11800 5.3.0-1023-aws #25~18.04.1-Ubuntu SMP Fri Jun 5 15:19:18 UTC 2020 aarch64
|
Current File : /storage/v11800/romasitenew/public_html/wp-content/plugins/google-listings-and-ads/src/Exception/InvalidArray.php |
<?php
declare( strict_types=1 );
namespace Automattic\WooCommerce\GoogleListingsAndAds\Exception;
use InvalidArgumentException;
defined( 'ABSPATH' ) || exit;
/**
* Class InvalidArray
*
* @package Automattic\WooCommerce\GoogleListingsAndAds\Exception
*/
class InvalidArray extends InvalidArgumentException implements GoogleListingsAndAdsException {
/**
* Return a new instance of the exception when specific keys are missing from an array.
*
* @param string $method The method where the keys were to be provided.
* @param array $missing_keys The array of key names that were missing. This should be value-based.
*
* @return static
*/
public static function missing_keys( string $method, array $missing_keys ) {
return new static(
sprintf(
'The array provided to %s was missing the following keys: %s',
$method,
join( ',', $missing_keys )
)
);
}
}