PostProcedureEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 42
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getProcedure() 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\Procedure\Procedure;
14
use Transfer\Processor\ProcessorInterface;
15
16
/**
17
 * Event triggered after a procedure is finished.
18
 */
19
class PostProcedureEvent extends Event
20
{
21
    /**
22
     * @var Procedure Finished procedure
23
     */
24
    protected $procedure;
25
26
    /**
27
     * @var ProcessorInterface Processor that finished the procedure
28
     */
29
    private $processor;
30
31
    /**
32
     * @param Procedure          $procedure Finished procedure
33
     * @param ProcessorInterface $processor Processor that finished the procedure
34
     */
35 9
    public function __construct(Procedure $procedure, ProcessorInterface $processor)
36
    {
37 9
        $this->procedure = $procedure;
38 9
        $this->processor = $processor;
39 9
    }
40
41
    /**
42
     * Returns finished procedure.
43
     *
44
     * @return Procedure Finished procedure
45
     */
46 2
    public function getProcedure()
47
    {
48 2
        return $this->procedure;
49
    }
50
51
    /**
52
     * Returns processor that finished the procedure.
53
     *
54
     * @return ProcessorInterface Processor that finished the procedure
55
     */
56 1
    public function getProcessor()
57
    {
58 1
        return $this->processor;
59
    }
60
}
61