TransporterEvent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 40
ccs 4
cts 6
cp 0.6667
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getTransporter() 0 4 1
A getData() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Conveyor package.
5
 *
6
 * (c) Jeroen Fiege <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Webcreate\Conveyor\Event;
13
14
use Symfony\Component\EventDispatcher\Event;
15
use Webcreate\Conveyor\Transporter\AbstractTransporter;
16
17
class TransporterEvent extends Event
18
{
19
    /**
20
     * @var AbstractTransporter
21
     */
22
    protected $transporter;
23
24
    /**
25
     * @var mixed|null
26
     */
27
    protected $data;
28
29
    /**
30
     * Constructor.
31
     *
32
     * @param AbstractTransporter $transporter
33
     * @param mixed               $data        depending on the event some data can be given
34
     */
35 29
    public function __construct(AbstractTransporter $transporter, $data = null)
36
    {
37 29
        $this->transporter = $transporter;
38 29
        $this->data        = $data;
39 29
    }
40
41
    /**
42
     * @return AbstractTransporter
43
     */
44
    public function getTransporter()
45
    {
46
        return $this->transporter;
47
    }
48
49
    /**
50
     * @return mixed|null
51
     */
52
    public function getData()
53
    {
54
        return $this->data;
55
    }
56
}
57