| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | 2 | public function process() |
|
| 16 | { |
||
| 17 | 2 | $this->initWrapper($this->setLocalName()); |
|
| 18 | |||
| 19 | 2 | $xss = $this->soteria->xss(true); |
|
| 20 | 2 | $xss->clean($this->getReference()); |
|
|
|
|||
| 21 | 2 | if (!$xss->result()->isValid()) { |
|
| 22 | 1 | $this->setScore($this->getRealScore()); |
|
| 23 | 1 | $this->setResult(); |
|
| 24 | } |
||
| 25 | |||
| 26 | 2 | } |
|
| 27 | |||
| 33 | } |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: