Completed
Pull Request — master (#15)
by Wachter
07:53
created

Factory::createTaskExecution()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
namespace Task\TaskBundle;
4
5
use Task\TaskBundle\Entity\Task;
6
use Task\TaskBundle\Entity\TaskExecution;
7
use Task\TaskInterface;
8
9
class Factory extends \Task\Factory
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14
    public function createTask($handlerClass, $workload)
15
    {
16
        return new Task($handlerClass, $workload);
17
    }
18
19
    /**
20
     * {@inheritdoc}
21
     */
22
    public function createTaskExecution(TaskInterface $task, \DateTime $scheduleTime)
23
    {
24
        return new TaskExecution($task, $task->getHandlerClass(), $scheduleTime, $task->getWorkload());
0 ignored issues
show
Bug introduced by
The method getHandlerClass() does not seem to exist on object<Task\TaskInterface>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
25
    }
26
}
27