| 1 | <?php |
||
| 15 | class StickerSetArray extends CustomType implements CustomArrayType |
||
| 16 | { |
||
| 17 | public function __construct(array $data = null, LoggerInterface $logger = null) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Traverses through our $data, yielding the result set |
||
| 28 | * |
||
| 29 | * @return Sticker[] |
||
| 30 | */ |
||
| 31 | public function traverseObject() |
||
| 37 | } |
||
| 38 |
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.