PostProcedureEvent::getProcedure()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 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