Leg   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 4
eloc 10
c 2
b 0
f 0
dl 0
loc 40
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getEnd() 0 3 1
A getSteps() 0 3 1
A getStart() 0 3 1
1
<?php
2
3
namespace DH\NavigationBundle\Model\Routing;
4
5
class Leg
6
{
7
    /**
8
     * @var array
9
     */
10
    private $start;
11
12
    /**
13
     * @var array
14
     */
15
    private $end;
16
17
    /**
18
     * @var Step[]
19
     */
20
    private $steps;
21
22
    public function __construct(array $data)
23
    {
24
        $this->start = $data['start'] ?? [];
25
        $this->end = $data['end'] ?? [];
26
        $this->steps = $data['steps'] ?? [];
27
    }
28
29
    public function getStart(): array
30
    {
31
        return $this->start;
32
    }
33
34
    public function getEnd(): array
35
    {
36
        return $this->end;
37
    }
38
39
    /**
40
     * @return Step[]
41
     */
42
    public function getSteps(): array
43
    {
44
        return $this->steps;
45
    }
46
}
47