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