3 * This file is part of the PHP_CodeCoverage package.
5 * (c) Sebastian Bergmann <sebastian@phpunit.de>
7 * For the full copyright and license information, please view the LICENSE
8 * file that was distributed with this source code.
12 * Factory for PHP_CodeCoverage_Exception objects that are used to describe
13 * invalid arguments passed to a function or method.
15 * @since Class available since Release 1.2.0
17 class PHP_CodeCoverage_Util_InvalidArgumentHelper
20 * @param int $argument
24 public static function factory($argument, $type, $value = null)
26 $stack = debug_backtrace(false);
28 return new PHP_CodeCoverage_Exception(
30 'Argument #%d%sof %s::%s() must be a %s',
32 $value !== null ? ' (' . gettype($value) . '#' . $value . ')' : ' (No Value) ',
34 $stack[1]['function'],