1 | <?php |
||
11 | class ArticleImporter implements ArticleImporterInterface |
||
12 | { |
||
13 | /** @var ArticleRes */ |
||
14 | private $articleRes; |
||
15 | |||
16 | /** @var CsvReaderInterface */ |
||
17 | private $reader; |
||
18 | |||
19 | /** @var ArticleMapper */ |
||
20 | private $articleMapper; |
||
21 | |||
22 | /** |
||
23 | * ArticleMapper constructor. |
||
24 | * |
||
25 | * @param ArticleRes $articleRes |
||
26 | * @param CsvReaderInterface $reader |
||
27 | * @param ArticleMapperInterface $articleMapper |
||
28 | */ |
||
29 | public function __construct(ArticleRes $articleRes, CsvReaderInterface $reader, ArticleMapperInterface $articleMapper) |
||
35 | |||
36 | |||
37 | /** |
||
38 | * @param $csvPath |
||
39 | * @param ProgressBar $progressBar |
||
40 | * |
||
41 | * @todo get csvPath from config |
||
42 | * |
||
43 | * @return array |
||
44 | * @throws \Shopware\Components\Api\Exception\NotFoundException |
||
45 | * @throws \Shopware\Components\Api\Exception\ParameterMissingException |
||
46 | * @throws \Shopware\Components\Api\Exception\ValidationException |
||
47 | */ |
||
48 | public function importArticles($csvPath, ProgressBar $progressBar = null) |
||
83 | } |
||
84 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.