class PHP_CodeCoverage_Util_InvalidArgumentHelper

Factory for PHP_CodeCoverage_Exception objects that are used to describe invalid arguments passed to a function or method.

@category PHP @package CodeCoverage @author Sebastian Bergmann <sebastian@phpunit.de> @copyright 2009-2013 Sebastian Bergmann <sebastian@phpunit.de> @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License @link http://github.com/sebastianbergmann/php-code-coverage @since Class available since Release 1.2.0

Hierarchy

Expanded class hierarchy of PHP_CodeCoverage_Util_InvalidArgumentHelper

File

drupal/core/vendor/phpunit/php-code-coverage/PHP/CodeCoverage/Util/InvalidArgumentHelper.php, line 58

View source
class PHP_CodeCoverage_Util_InvalidArgumentHelper {

  /**
   * @param integer $argument
   * @param string  $type
   * @param mixed   $value
   */
  public static function factory($argument, $type, $value = NULL) {
    $stack = debug_backtrace(FALSE);
    return new PHP_CodeCoverage_Exception(sprintf('Argument #%d%sof %s::%s() must be a %s', $argument, $value !== NULL ? ' (' . $value . ')' : ' ', $stack[1]['class'], $stack[1]['function'], $type));
  }

}

Members