| Total Complexity | 2 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | final class NoSuchValue extends UnexpectedValueException implements NotFound |
||
| 25 | { |
||
| 26 | /** |
||
| 27 | * @param Collection $collection The collection that does not have the item. |
||
| 28 | * @param mixed $theValue The value that was not found. |
||
| 29 | * @return NotFound The exception object to throw. |
||
| 30 | */ |
||
| 31 | public static function couldNotFind(Collection $collection, $theValue): NotFound |
||
| 32 | { |
||
| 33 | return new static(sprintf( |
||
| 34 | 'Could not find %s in %s', |
||
| 35 | var_export($theValue, true), |
||
| 36 | get_class($collection) |
||
| 37 | )); |
||
| 38 | } |
||
| 39 | |||
| 40 | public static function noneOfTheValuesMatched(Collection $collection): self |
||
| 45 | )); |
||
| 46 | } |
||
| 48 |