| 1 | <?php |
||
| 14 | final class JsonFilesystemImporter implements ImporterInterface |
||
| 15 | { |
||
| 16 | /** @var string */ |
||
| 17 | private $filename = 'pages.json'; |
||
| 18 | |||
| 19 | /** @var PageRepositoryInterface */ |
||
| 20 | private $pageRepository; |
||
| 21 | |||
| 22 | /** @var Serializer */ |
||
| 23 | private $serializer; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param PageRepositoryInterface $pageRepository |
||
| 27 | * @param Serializer $serializer |
||
| 28 | */ |
||
| 29 | public function __construct( |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | public function execute() |
||
| 49 | } |
||
| 50 |
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.