1 | <?php |
||
18 | class StringValue extends AbstractValue |
||
19 | { |
||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | private $delimiter; |
||
24 | |||
25 | /** |
||
26 | * @var array|string |
||
27 | */ |
||
28 | private $content; |
||
29 | |||
30 | /** |
||
31 | * @inheritdoc |
||
32 | */ |
||
33 | 27 | public function getCompiled() |
|
44 | |||
45 | /** |
||
46 | * @inheritdoc |
||
47 | */ |
||
48 | 27 | public function initializeFromOldFormat(array $value) |
|
53 | } |
||
54 |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.