| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | public function getErrors(ViewErrorBag $errors, $locale = null): array |
||
| 23 | { |
||
| 24 | if ($locale) { |
||
| 25 | return $errors->get(sprintf('%s.%s', $this->name(), $locale)); |
||
| 26 | } |
||
| 27 | |||
| 28 | if ($this->belongsToArray()) { |
||
| 29 | return $errors->get($this->getDotPatternName()); |
||
| 30 | } |
||
| 31 | |||
| 32 | return $errors->get($this->name()); |
||
| 33 | } |
||
| 39 |