Code Duplication    Length = 6-6 lines in 2 locations

Command/ReportCommand.php 2 locations

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