Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | public function getImporterForResource(string $resourceCode): ImporterInterface |
||
26 | { |
||
27 | foreach ($this->importers as $importer) { |
||
28 | if ($resourceCode === $importer->getResourceCode()) { |
||
29 | return $importer; |
||
30 | } |
||
31 | } |
||
32 | |||
33 | throw new \UnexpectedValueException(sprintf( |
||
34 | 'Importer for %s resource was not found. Make sure getResourceCode in the importer returns proper resource name', |
||
35 | $resourceCode |
||
36 | )); |
||
37 | } |
||
38 | } |
||
39 |