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

RunListener::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 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