| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 6 | 7 | public static function normalizationFailed($item, $expected = null) |
|
| 7 | { |
||
| 8 | 7 | $message = sprintf( |
|
| 9 | 7 | 'Cannot get slug for item of type %s.', |
|
| 10 | 7 | is_object($item) ? get_class($item) : gettype($item) |
|
| 11 | 7 | ); |
|
| 12 | 7 | if ($expected) { |
|
| 13 | 6 | $message .= sprintf(' Item of type %s expected.', $expected); |
|
| 14 | 6 | } |
|
| 15 | |||
| 16 | 7 | return new static($message); |
|
| 17 | } |
||
| 18 | |||
| 36 |