Code Duplication    Length = 6-6 lines in 2 locations

Command/ReportCommand.php 2 locations

@@ 67-72 (lines=6) @@
64
        $end = $input->getOption('end');
65
66
        // validate dates
67
        if($start) {
68
            $start = \DateTime::createFromFormat('Y-m-d', $start);
69
            if ($start === false) {
70
                throw new \InvalidArgumentException('The format for start is invalid');
71
            }
72
        }
73
74
        if($end) {
75
            $end = \DateTime::createFromFormat('Y-m-d', $end);
@@ 74-79 (lines=6) @@
71
            }
72
        }
73
74
        if($end) {
75
            $end = \DateTime::createFromFormat('Y-m-d', $end);
76
            if ($end === false) {
77
                throw new \InvalidArgumentException('The format for end is invalid');
78
            }
79
        }
80
81
        // find manufacturer
82
        $manufacturer = $this->manufacturerRepository->findOneByExternalId($manufacturer);