| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function addFieldsToForm(Form $form) |
||
| 11 | { |
||
| 12 | $form->addText('user', 'rabbitmq.form.user.label') |
||
| 13 | ->setAttribute('placeholder', 'guest') |
||
|
|
|||
| 14 | ->setAttribute('autofocus'); |
||
| 15 | $form->addPassword('password', 'rabbitmq.form.password.label') |
||
| 16 | ->setAttribute('placeholder', 'guest'); |
||
| 17 | $form->addText('host', 'rabbitmq.form.host.label') |
||
| 18 | ->setAttribute('placeholder', 'localhost'); |
||
| 19 | $form->addText('port', 'rabbitmq.form.port.label') |
||
| 20 | ->setAttribute('placeholder', '5672'); |
||
| 21 | $form->addText('api_host', 'rabbitmq.form.rabbitmq_management_http_api_host.label') |
||
| 22 | ->setAttribute('placeholder', 'localhost') |
||
| 23 | ->setOption('description', 'rabbitmq.form.rabbitmq_management_http_api_host.description'); |
||
| 24 | $form->addText('api_port', 'rabbitmq.form.rabbitmq_management_http_api_port.label') |
||
| 25 | ->setAttribute('placeholder', '15672') |
||
| 26 | ->setOption('description', 'rabbitmq.form.rabbitmq_management_http_api_port.description'); |
||
| 27 | } |
||
| 28 | } |
||
| 29 |
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: