| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | public function __construct(ObjectManager $objectManager, FieldsetInterface $bookingFieldset) |
||
| 24 | { |
||
| 25 | parent::__construct('booking-form'); |
||
| 26 | |||
| 27 | $this->setHydrator(new DoctrineHydrator($objectManager, 'JhFlexiTime\Entity\Booking')) |
||
| 28 | ->setInputFilter(new InputFilter()) |
||
| 29 | ->setAttribute('method', 'post') |
||
| 30 | ->setAttribute('class', 'form-horizontal') |
||
| 31 | ->setAttribute('id', 'booking-form'); |
||
| 32 | |||
| 33 | // Add the sample request fieldset |
||
| 34 | $bookingFieldset->setUseAsBaseFieldset(true); |
||
| 35 | $this->add($bookingFieldset); |
||
| 36 | |||
| 37 | $this->add([ |
||
| 38 | 'name' => 'submit', |
||
| 39 | 'attributes' => [ |
||
| 40 | 'type' => 'submit', |
||
| 41 | 'value' => 'Submit', |
||
| 42 | 'id' => 'submitbutton', |
||
| 43 | 'class' => 'btn btn-danger', |
||
| 44 | ] |
||
| 45 | ]); |
||
| 46 | |||
| 47 | } |
||
| 48 | } |
||
| 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: