Completed
Pull Request — master (#15)
by Wachter
24:49 queued 08:56
created

Factory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 3
dl 0
loc 18
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createTask() 0 4 1
A createTaskExecution() 0 4 1
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