1 | <?php namespace PascalKleindienst\FormListGenerator\Fields; |
||
9 | class PartialHTMLField extends AbstractField |
||
10 | { |
||
11 | /** |
||
12 | * @var array Contains the subheading for the section field (optional) |
||
13 | */ |
||
14 | public $comment; |
||
15 | |||
16 | /** |
||
17 | * @var string Contains the path to the partial |
||
18 | */ |
||
19 | public $path; |
||
20 | |||
21 | /** |
||
22 | * {@inheritDoc} |
||
23 | */ |
||
24 | 18 | protected function registerConfigKeys() |
|
28 | |||
29 | /** |
||
30 | * Load a partial or some simple HTML Content |
||
31 | * |
||
32 | * @param array $records |
||
33 | * @return string|null |
||
34 | */ |
||
35 | 6 | public function getValue(array $records = []) |
|
61 | } |
||
62 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.