| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| 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 | $in = $this->In([$values]); |
||
|
|
|||
| 31 | |||
| 32 | return $this->Not([$in])->validate($input); |
||
| 33 | } |
||
| 34 | |||
| 40 |
If you implement
__calland 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
__callis implemented by a parent class and only the child class knows which methods exist: