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