Direction::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 4
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Itmedia\ZippyBusBundle\Schedule;
6
7
class Direction implements SlugAware
8
{
9
    /**
10
     * @var int
11
     */
12
    private $id;
13
14
    /**
15
     * @var string
16
     */
17
    private $slug;
18
19
    /**
20
     * @var string
21
     */
22
    private $name;
23
24
25
    /**
26
     * @var array
27
     */
28
    private $days;
29
30
    /**
31
     * Direction constructor.
32
     * @param int $id
33
     * @param string $slug
34
     * @param string $name
35
     * @param array $days
36
     */
37
    public function __construct(int $id, string $name, string $slug, array $days)
38
    {
39
        $this->id = $id;
40
        $this->slug = $slug;
41
        $this->name = $name;
42
        $this->days = $days;
43
    }
44
45
    /**
46
     * @return int
47
     */
48
    public function getId(): int
49
    {
50
        return $this->id;
51
    }
52
53
    /**
54
     * @return string
55
     */
56
    public function getSlug(): string
57
    {
58
        return $this->slug;
59
    }
60
61
    /**
62
     * @return string
63
     */
64
    public function getName(): string
65
    {
66
        return $this->name;
67
    }
68
69
    /**
70
     * @return array
71
     */
72
    public function getDays(): array
73
    {
74
        return $this->days;
75
    }
76
}
77