| 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 |
||
| 9 | public function hasError(ViewErrorBag $errors, $locale = null): bool |
||
| 10 | { |
||
| 11 | if ($locale) { |
||
| 12 | return $errors->has(sprintf('%s.%s', $this->name(), $locale)); |
||
| 13 | } |
||
| 14 | |||
| 15 | if ($this->belongsToArray()) { |
||
| 16 | return $errors->has($this->getDotPatternName()); |
||
| 17 | } |
||
| 18 | |||
| 19 | return $errors->has($this->name()); |
||
| 20 | } |
||
| 39 |