| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function format(Request $request, Response|null $response, ?\Throwable $exception, ?string $message = null): string |
||
| 27 | { |
||
| 28 | if (!$message) { |
||
| 29 | return ''; |
||
| 30 | } |
||
| 31 | |||
| 32 | $var = '{{'.$this->getVarName().'}}'; |
||
| 33 | |||
| 34 | if (!str_contains($message, $var)) { |
||
| 35 | return $message; |
||
| 36 | } |
||
| 37 | |||
| 38 | return str_ireplace( |
||
|
|
|||
| 39 | $var, |
||
| 40 | $this->getVarValue($request, $response, $exception), |
||
| 41 | $message |
||
| 42 | ); |
||
| 49 |