| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public static function throwMapperNotFound(\ReflectionProperty $property, bool $wrapCallable = true, ?\Throwable $previous = null): callable|self |
||
| 15 | { |
||
| 16 | $className = $property->getDeclaringClass()->getName(); |
||
| 17 | $propertyName = $property->getName(); |
||
| 18 | $message = sprintf(self::DEFAULT_NO_MAPPER_FOUND_MESSAGE, $className, $propertyName); |
||
| 19 | $exception = new self($message, previous: $previous); |
||
| 20 | |||
| 21 | return $wrapCallable ? static fn () => throw $exception : throw $exception; |
||
| 22 | } |
||
| 24 |