| Conditions | 5 |
| Paths | 3 |
| Total Lines | 23 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function validationRules() { |
||
| 19 | $rules = $this->validators->validationRules(); |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Rewrite required to required_if for items inside conditional selects |
||
| 23 | */ |
||
| 24 | if ($this->parent() instanceof LsfConditionalSelect) { |
||
| 25 | if (is_array($this->settings('lsf_is_conditional')['when_parent_is'])) { |
||
| 26 | $requiredWhen = implode(',', $this->settings('lsf_is_conditional')['when_parent_is']); |
||
| 27 | } else { |
||
| 28 | $requiredWhen = $this->settings('lsf_is_conditional')['when_parent_is']; |
||
| 29 | } |
||
| 30 | |||
| 31 | foreach ($rules as $key => $rule) { |
||
| 32 | if (in_array('required', $rule)) { |
||
| 33 | $requiredKey = array_search('required', $rule); |
||
| 34 | |||
| 35 | $rules[$key][$requiredKey] = 'required_if:' . $this->parent()->name . ',' . $requiredWhen; |
||
| 36 | } |
||
| 37 | } |
||
| 38 | } |
||
| 39 | |||
| 40 | return $rules; |
||
| 41 | } |
||
| 56 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.