Completed
Push — master ( 63e97e...33e149 )
by Wachter
07:47
created

RunListener   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A run() 0 4 1
1
<?php
2
3
namespace Task\TaskBundle\EventListener;
4
5
use Symfony\Component\EventDispatcher\Event;
6
use Task\SchedulerInterface;
7
8
/**
9
 * Listens to event and run scheduled tasks.
10
 *
11
 * @author @wachterjohannes <[email protected]>
12
 */
13
class RunListener
14
{
15
    /**
16
     * @var SchedulerInterface
17
     */
18
    private $scheduler;
19
20
    public function __construct(SchedulerInterface $scheduler)
21
    {
22
        $this->scheduler = $scheduler;
23
    }
24
25
    /**
26
     * Run scheduled tasks.
27
     *
28
     * @param Event $event
29
     */
30
    public function run(Event $event)
0 ignored issues
show
Unused Code introduced by
The parameter $event is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
31
    {
32
        $this->scheduler->run();
33
    }
34
}
35