Code Duplication    Length = 6-6 lines in 2 locations

Command/ReportCommand.php 2 locations

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