Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function isValid() |
||
19 | { |
||
20 | if ($this->isNotRequiredAndEmpty()) { |
||
21 | return true; |
||
22 | } |
||
23 | |||
24 | $input = trim($this->getParams()[1]); |
||
25 | |||
26 | $values = array_map(function ($elem) { |
||
27 | return trim($elem); |
||
28 | }, explode(',', $this->getParams()[2])); |
||
29 | |||
30 | return $this->In($values)->validate($input); |
||
|
|||
31 | } |
||
32 | |||
38 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: