| Conditions | 5 |
| Paths | 5 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public static function assertInternalType(string $expected, $actual, string $message = ''): void |
||
|
|
|||
| 24 | { |
||
| 25 | if (version_compare(phpversion(), '7.2', '>=')) { |
||
| 26 | switch ($expected) { |
||
| 27 | case 'string': |
||
| 28 | static::assertIsString($actual); |
||
| 29 | break; |
||
| 30 | case 'object': |
||
| 31 | static::assertIsObject($actual); |
||
| 32 | break; |
||
| 33 | case 'float': |
||
| 34 | static::assertIsFloat($actual); |
||
| 35 | break; |
||
| 36 | default: |
||
| 37 | throw new Error(); |
||
| 38 | } |
||
| 39 | } else { |
||
| 40 | \PHPUnit\Framework\TestCase::assertInternalType($expected, $actual, $message = ''); |
||
| 41 | } |
||
| 42 | } |
||
| 43 | } |
||
| 44 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.