Code Duplication    Length = 9-9 lines in 2 locations

code/jobs/LDAPAllSyncJob.php 1 location

@@ 40-48 (lines=9) @@
37
        return md5(get_class($this));
38
    }
39
40
    public function validateRegenerateTime()
41
    {
42
        $regenerateTime = Config::inst()->get('LDAPAllSyncJob', 'regenerate_time');
43
44
        // don't allow this job to run less than every 15 minutes, as it could take a while.
45
        if ($regenerateTime !== null && $regenerateTime < 900) {
46
            throw new Exception('LDAPAllSyncJob::regenerate_time must be 15 minutes or greater');
47
        }
48
    }
49
50
    public function process()
51
    {

code/jobs/LDAPMemberSyncJob.php 1 location

@@ 39-47 (lines=9) @@
36
        return md5(get_class($this));
37
    }
38
39
    public function validateRegenerateTime()
40
    {
41
        $regenerateTime = Config::inst()->get('LDAPMemberSyncJob', 'regenerate_time');
42
43
        // don't allow this job to run less than every 15 minutes, as it could take a while.
44
        if ($regenerateTime !== null && $regenerateTime < 900) {
45
            throw new Exception('LDAPMemberSyncJob::regenerate_time must be 15 minutes or greater');
46
        }
47
    }
48
49
    public function process()
50
    {