| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | 269 | public function addError(string $message, array $parameters = [], string $attribute = null): self |
|
| 46 | { |
||
| 47 | 269 | if ($this->attribute !== null) { |
|
| 48 | 8 | if ($attribute !== null) { |
|
| 49 | 2 | $attribute = $this->attribute . '.' . $attribute; |
|
| 50 | } else { |
||
| 51 | 8 | $attribute = $this->attribute; |
|
| 52 | } |
||
| 53 | } |
||
| 54 | 269 | $this->errors[] = new Error($message, $parameters, $attribute); |
|
| 55 | |||
| 56 | 269 | return $this; |
|
| 57 | } |
||
| 70 |