| @@ 422-428 (lines=7) @@ | ||
| 419 | */ |
|
| 420 | private function addMessage(string $field, string $message, $condition, array $arguments = []) |
|
| 421 | { |
|
| 422 | if (is_array($condition)) { |
|
| 423 | if (is_object($condition[0])) { |
|
| 424 | $condition[0] = get_class($condition[0]); |
|
| 425 | } |
|
| 426 | ||
| 427 | $condition = join('::', $condition); |
|
| 428 | } |
|
| 429 | ||
| 430 | $this->errors[$field] = \Spiral\interpolate( |
|
| 431 | $message, |
|
| @@ 443-449 (lines=7) @@ | ||
| 440 | */ |
|
| 441 | protected function logException(string $field, $condition, \Throwable $e) |
|
| 442 | { |
|
| 443 | if (is_array($condition)) { |
|
| 444 | if (is_object($condition[0])) { |
|
| 445 | $condition[0] = get_class($condition[0]); |
|
| 446 | } |
|
| 447 | ||
| 448 | $condition = join('::', $condition); |
|
| 449 | } |
|
| 450 | ||
| 451 | $this->logger()->error( |
|
| 452 | "Condition '{condition}' failed with '{e}' while checking '{field}' field.", |
|