Departure::subType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Sl;
4
5
use Sl\Contracts\Foundation\DepartureInterface;
6
7
class Departure implements DepartureInterface
8
{
9
    /**
10
     * Departure's id.
11
     *
12
     * @var string
13
     */
14
    private $id;
15
16
    /**
17
     * Departure's type.
18
     *
19
     * @var string
20
     */
21
    private $type;
22
23
    /**
24
     * Departure's subtype.
25
     *
26
     * @var string|null
27
     */
28
    private $subType;
29
30
    /**
31
     * Departure's destination.
32
     *
33
     * @var string
34
     */
35
    private $destination;
36
37
    /**
38
     * Departure's display time.
39
     *
40
     * @var string
41
     */
42
    private $displayTime;
43
44
    /**
45
     * Create a new instance of Departure.
46
     *
47
     * @param string      $id
48
     * @param string      $type
49
     * @param string|null $subType
50
     * @param string      $destination
51
     * @param string      $displayTime
52
     */
53 21
    public function __construct($id, $type, $subType, $destination, $displayTime)
54
    {
55 21
        $this->id = $id;
56 21
        $this->type = $type;
57 21
        $this->destination = $destination;
58 21
        $this->displayTime = $displayTime;
59 21
        $this->subType = $subType;
60 21
    }
61
62
    /**
63
     * Get departure's id.
64
     *
65
     * @return string
66
     */
67 16
    public function id()
68
    {
69 16
        return $this->id;
70
    }
71
72
    /**
73
     * Get departure's type.
74
     *
75
     * @return string
76
     */
77 16
    public function type()
78
    {
79 16
        return $this->type;
80
    }
81
82
    /**
83
     * Get departure's subtype.
84
     *
85
     * @return string|null
86
     */
87 16
    public function subType()
88
    {
89 16
        return $this->subType;
90
    }
91
92
    /**
93
     * Get departure's destination.
94
     *
95
     * @return string
96
     */
97 16
    public function destination()
98
    {
99 16
        return $this->destination;
100
    }
101
102
    /**
103
     * Get departure's display time.
104
     *
105
     * @return string
106
     */
107 16
    public function displayTime()
108
    {
109 16
        return $this->displayTime;
110
    }
111
}
112