@@ 368-376 (lines=9) @@ | ||
365 | ||
366 | $c = count($stockMovements); |
|
367 | ||
368 | if ($c) { |
|
369 | $this->logger->emergency('There are '.$c.' stock movements with invalid bar codes'); |
|
370 | $productNumbers = []; |
|
371 | foreach ($stockMovements as $stockMovement) { |
|
372 | $productNumbers[] = $stockMovement->getProduct()->getNumber(); |
|
373 | } |
|
374 | ||
375 | throw new InvalidBarCodeException('Products with invalid bar codes: '.join(', ', $productNumbers), $productNumbers); |
|
376 | } |
|
377 | } |
|
378 | ||
379 | /** |
|
@@ 395-403 (lines=9) @@ | ||
392 | ||
393 | $c = count($stockMovements); |
|
394 | ||
395 | if ($c) { |
|
396 | $this->logger->critical('There are '.$c.' stock movements with invalid vendor numbers'); |
|
397 | $productNumbers = []; |
|
398 | foreach ($stockMovements as $stockMovement) { |
|
399 | $productNumbers[] = $stockMovement->getProduct()->getNumber(); |
|
400 | } |
|
401 | ||
402 | throw new InvalidVendorNumberException('Products with invalid vendor numbers: '.join($productNumbers), $productNumbers); |
|
403 | } |
|
404 | } |
|
405 | ||
406 | protected function getFile(string $extension = 'csv'): \SplFileObject |