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