Mercurial > hg > isophonics-drupal-site
comparison vendor/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
1 <?php | |
2 /* | |
3 * This file is part of the php-code-coverage package. | |
4 * | |
5 * (c) Sebastian Bergmann <sebastian@phpunit.de> | |
6 * | |
7 * For the full copyright and license information, please view the LICENSE | |
8 * file that was distributed with this source code. | |
9 */ | |
10 | |
11 namespace SebastianBergmann\CodeCoverage; | |
12 | |
13 class InvalidArgumentException extends \InvalidArgumentException implements Exception | |
14 { | |
15 /** | |
16 * @param int $argument | |
17 * @param string $type | |
18 * @param mixed $value | |
19 * | |
20 * @return InvalidArgumentException | |
21 */ | |
22 public static function create($argument, $type, $value = null) | |
23 { | |
24 $stack = \debug_backtrace(0); | |
25 | |
26 return new self( | |
27 \sprintf( | |
28 'Argument #%d%sof %s::%s() must be a %s', | |
29 $argument, | |
30 $value !== null ? ' (' . \gettype($value) . '#' . $value . ')' : ' (No Value) ', | |
31 $stack[1]['class'], | |
32 $stack[1]['function'], | |
33 $type | |
34 ) | |
35 ); | |
36 } | |
37 } |