| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 12 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | View Code Duplication | 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 | } |
||
| 21 | |||
| 39 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@returndoc comment to communicate to implementors of these methods what they are expected to return.