Conditions | 2 |
Paths | 2 |
Total Lines | 6 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public static function noClassProperty(string $className, string $propertyName, bool $wrapCallable = true, ?\Throwable $previous = null): callable|self |
||
16 | { |
||
17 | $message = sprintf(self::NO_CLASS_PROPERTY_MESSAGE, $propertyName, $className); |
||
18 | $exception = new self($message, previous: $previous); |
||
19 | |||
20 | return $wrapCallable ? static fn () => throw $exception : $exception; |
||
21 | } |
||
31 |