| Conditions | 3 |
| Paths | 2 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function submit(Form $form, ArrayHash $values) |
||
| 38 | { |
||
| 39 | if ($this->member && !$this->connection->srem($this->key, $this->member)) { |
||
| 40 | $form->addError($form->getTranslator()->translate('redis.member_form.message.cannot_be_removed')); |
||
| 41 | return; |
||
| 42 | } |
||
| 43 | $this->connection->sadd($this->key, $values['member']); |
||
| 44 | } |
||
| 45 | } |
||
| 46 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: