| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Lines | 12 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | View Code Duplication | 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 | } |
||
| 34 | |||
| 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.