| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 15 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 6 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 25 | public function addFieldsToForm(Form $form) | ||
| 26 |     { | ||
| 27 |         $form->addText('member', 'redis.sorted_set_member_form.member.label') | ||
| 28 |             ->setRequired('redis.sorted_set_member_form.member.required'); | ||
|  | |||
| 29 | |||
| 30 |         $form->addText('score', 'redis.sorted_set_member_form.score.label') | ||
| 31 |             ->setRequired('redis.sorted_set_member_form.score.required'); | ||
| 32 | |||
| 33 |         if ($this->member !== null) { | ||
| 34 | $form->setDefaults([ | ||
| 35 | 'member' => $this->member, | ||
| 36 | 'score' => $this->connection->zscore($this->key, $this->member), | ||
| 37 | ]); | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 49 | 
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: