| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function addFieldsToForm(Form $form) |
||
| 11 | { |
||
| 12 | $form->addText('server', 'mysql.form.server.label') |
||
| 13 | ->setAttribute('placeholder', 'localhost'); |
||
|
|
|||
| 14 | $form->addText('user', 'mysql.form.user.label') |
||
| 15 | ->setAttribute('placeholder', 'root') |
||
| 16 | ->setAttribute('autofocus'); |
||
| 17 | $form->addPassword('password', 'mysql.form.password.label'); |
||
| 18 | $form->addText('database', 'mysql.form.database.label'); |
||
| 19 | } |
||
| 20 | } |
||
| 21 |
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: