You are here

public static function PHP_CodeCoverage_Util_InvalidArgumentHelper::factory in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php \PHP_CodeCoverage_Util_InvalidArgumentHelper::factory()

Parameters

int $argument:

string $type:

mixed $value:

12 calls to PHP_CodeCoverage_Util_InvalidArgumentHelper::factory()
PHP_CodeCoverage::getLinesToBeIgnored in vendor/phpunit/php-code-coverage/src/CodeCoverage.php
Returns the lines of a source file that should be ignored.
PHP_CodeCoverage::setAddUncoveredFilesFromWhitelist in vendor/phpunit/php-code-coverage/src/CodeCoverage.php
PHP_CodeCoverage::setCacheTokens in vendor/phpunit/php-code-coverage/src/CodeCoverage.php
@since Method available since Release 1.1.0
PHP_CodeCoverage::setCheckForUnintentionallyCoveredCode in vendor/phpunit/php-code-coverage/src/CodeCoverage.php
@since Method available since Release 2.0.0
PHP_CodeCoverage::setDisableIgnoredLines in vendor/phpunit/php-code-coverage/src/CodeCoverage.php

... See full list

File

vendor/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php, line 24

Class

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

Code

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 ? ' (' . gettype($value) . '#' . $value . ')' : ' (No Value) ', $stack[1]['class'], $stack[1]['function'], $type));
}