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
Expanded class hierarchy of PHP_CodeCoverage_Util_InvalidArgumentHelper
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));
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PHP_CodeCoverage_Util_InvalidArgumentHelper:: |
public static | function |