Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
58 | 1 | public function getCMSFields() |
|
59 | { |
||
60 | 1 | $fields = parent::getCMSFields(); |
|
61 | |||
62 | 1 | $fields->removeByName(array( |
|
63 | 1 | 'SortOrder', |
|
64 | 1 | 'PhotoGalleryID', |
|
65 | 1 | )); |
|
66 | |||
67 | 1 | $image = $fields->dataFieldByName('Image')->setFolderName('Uploads/Blocks/PhotoGallery/'); |
|
68 | 1 | $fields->insertBefore($image, 'Content'); |
|
|
|||
69 | |||
70 | 1 | return $fields; |
|
71 | } |
||
72 | |||
113 |
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: