@@ 76-81 (lines=6) @@ | ||
73 | $doNotUseLastStockMovement = boolval($input->getOption('do-not-use-last-stock-movement')); |
|
74 | ||
75 | // validate dates |
|
76 | if ($start) { |
|
77 | $start = \DateTime::createFromFormat('Y-m-d', $start); |
|
78 | if (false === $start) { |
|
79 | throw new InvalidDateFormatException('The format for start is invalid'); |
|
80 | } |
|
81 | } |
|
82 | ||
83 | if ($end) { |
|
84 | $end = \DateTime::createFromFormat('Y-m-d', $end); |
|
@@ 83-88 (lines=6) @@ | ||
80 | } |
|
81 | } |
|
82 | ||
83 | if ($end) { |
|
84 | $end = \DateTime::createFromFormat('Y-m-d', $end); |
|
85 | if (false === $end) { |
|
86 | throw new InvalidDateFormatException('The format for end is invalid'); |
|
87 | } |
|
88 | } |
|
89 | ||
90 | // find manufacturer |
|
91 | $manufacturer = $this->manufacturerRepository->findOneByExternalId($manufacturer); |