Code Duplication    Length = 7-7 lines in 2 locations

app/Console/Commands/OaiPmhHarvest.php 2 locations

@@ 75-81 (lines=7) @@
72
                return false;
73
            }
74
        }
75
        if ($this->option('from')) {
76
            if (!preg_match('/[0-9]{4}-[0-9]{2}-[0-9]{2}/', $this->option('from'))) {
77
                $this->error('--from must be on ISO-format YYYY-MM-DD.');
78
79
                return false;
80
            }
81
        }
82
        if ($this->option('until')) {
83
            if (!preg_match('/[0-9]{4}-[0-9]{2}-[0-9]{2}/', $this->option('until'))) {
84
                $this->error('--until must be on ISO-format YYYY-MM-DD.');
@@ 82-88 (lines=7) @@
79
                return false;
80
            }
81
        }
82
        if ($this->option('until')) {
83
            if (!preg_match('/[0-9]{4}-[0-9]{2}-[0-9]{2}/', $this->option('until'))) {
84
                $this->error('--until must be on ISO-format YYYY-MM-DD.');
85
86
                return false;
87
            }
88
        }
89
90
        return true;
91
    }