Code Duplication    Length = 10-12 lines in 4 locations

Resque.php 4 locations

@@ 158-169 (lines=12) @@
155
     * @param Job $job
156
     * @return null
157
     */
158
    public function enqueueAt($at, Job $job)
159
    {
160
        if ($job instanceof ContainerAwareJob) {
161
            $job->setKernelOptions($this->kernelOptions);
162
        }
163
164
        $this->attachRetryStrategy($job);
165
166
        \ResqueScheduler::enqueueAt($at, $job->queue, \get_class($job), $job->args);
167
168
        return NULL;
169
    }
170
171
    /**
172
     * @param $in
@@ 176-187 (lines=12) @@
173
     * @param Job $job
174
     * @return null
175
     */
176
    public function enqueueIn($in, Job $job)
177
    {
178
        if ($job instanceof ContainerAwareJob) {
179
            $job->setKernelOptions($this->kernelOptions);
180
        }
181
182
        $this->attachRetryStrategy($job);
183
184
        \ResqueScheduler::enqueueIn($in, $job->queue, \get_class($job), $job->args);
185
186
        return NULL;
187
    }
188
189
    /**
190
     * @param Job $job
@@ 193-202 (lines=10) @@
190
     * @param Job $job
191
     * @return mixed
192
     */
193
    public function removedDelayed(Job $job)
194
    {
195
        if ($job instanceof ContainerAwareJob) {
196
            $job->setKernelOptions($this->kernelOptions);
197
        }
198
199
        $this->attachRetryStrategy($job);
200
201
        return \ResqueScheduler::removeDelayed($job->queue, \get_class($job), $job->args);
202
    }
203
204
    /**
205
     * @param $at
@@ 209-218 (lines=10) @@
206
     * @param Job $job
207
     * @return mixed
208
     */
209
    public function removeFromTimestamp($at, Job $job)
210
    {
211
        if ($job instanceof ContainerAwareJob) {
212
            $job->setKernelOptions($this->kernelOptions);
213
        }
214
215
        $this->attachRetryStrategy($job);
216
217
        return \ResqueScheduler::removeDelayedJobFromTimestamp($at, $job->queue, \get_class($job), $job->args);
218
    }
219
220
    /**
221
     * @return array