PreProcessEvent   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 25
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getProcessor() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of Transfer.
5
 *
6
 * For the full copyright and license information, please view the LICENSE file located
7
 * in the root directory.
8
 */
9
10
namespace Transfer\Event;
11
12
use Symfony\Component\EventDispatcher\Event;
13
use Transfer\Processor\ProcessorInterface;
14
15
/**
16
 * Event triggered before a process is started.
17
 */
18
class PreProcessEvent extends Event
19
{
20
    /**
21
     * @var ProcessorInterface Processor that starts the process
22
     */
23
    protected $processor;
24
25
    /**
26
     * @param ProcessorInterface $processor Processor that starts the process
27
     */
28 11
    public function __construct(ProcessorInterface $processor)
29
    {
30 11
        $this->processor = $processor;
31 11
    }
32
33
    /**
34
     * Returns the processor that is going to start the process.
35
     *
36
     * @return ProcessorInterface Processor that starts the process
37
     */
38 1
    public function getProcessor()
39
    {
40 1
        return $this->processor;
41
    }
42
}
43