| Conditions | 1 |
| Paths | 1 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | 2 | public function addFieldsToForm(Form $form) |
|
| 11 | { |
||
| 12 | 2 | $form->addText('host', 'redis.form.host.label') |
|
| 13 | 2 | ->setAttribute('placeholder', 'localhost'); |
|
|
|
|||
| 14 | 2 | $form->addText('port', 'redis.form.port.label') |
|
| 15 | 2 | ->setAttribute('placeholder', '6379'); |
|
| 16 | 2 | $form->addText('database', 'redis.form.database.label') |
|
| 17 | 2 | ->setAttribute('placeholder', 0); |
|
| 18 | 2 | } |
|
| 19 | } |
||
| 20 |
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: