Code Duplication    Length = 23-23 lines in 2 locations

src/Comodojo/Extender/Jobs/Manager.php 1 location

@@ 78-100 (lines=23) @@
75
76
    }
77
78
    public function isCompleted($uid, $success, $result, $wid = null) {
79
80
        $job = $this->running_jobs[$uid];
81
82
        $this->logger->debug('Job '.$job->name.' (uid '.$job->uid.') completed with '.($success ? 'success' : 'error'));
83
84
        $job->success = $success;
85
86
        $job->result = $result;
87
88
        $job->wid = $wid;
89
90
        $job->end_timestamp = microtime(true);
91
92
        $this->completed_jobs[$uid] = $job;
93
94
        unset($this->running_jobs[$uid]);
95
96
        $this->dump();
97
98
        return $this;
99
100
    }
101
102
    public function isAborted($uid, $error) {
103

src/Comodojo/Extender/Task/Locker.php 1 location

@@ 79-101 (lines=23) @@
76
77
    }
78
79
    public function isCompleted($uid, $success, $result, $wid = null) {
80
81
        $job = $this->running_jobs[$uid];
82
83
        $this->logger->debug('Job '.$job->name.' (uid '.$job->uid.') completed with '.($success ? 'success' : 'error'));
84
85
        $job->success = $success;
86
87
        $job->result = $result;
88
89
        $job->wid = $wid;
90
91
        $job->end_timestamp = microtime(true);
92
93
        $this->completed_jobs[$uid] = $job;
94
95
        unset($this->running_jobs[$uid]);
96
97
        $this->dump();
98
99
        return $this;
100
101
    }
102
103
    public function isAborted($uid, $error) {
104