Route   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
dl 0
loc 29
rs 10
c 2
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getLegs() 0 3 1
A getSummary() 0 3 1
1
<?php
2
3
namespace DH\NavigationBundle\Model\Routing;
4
5
class Route
6
{
7
    /**
8
     * @var Leg[]
9
     */
10
    private $legs;
11
12
    /**
13
     * @var Summary
14
     */
15
    private $summary;
16
17
    public function __construct(array $data)
18
    {
19
        $this->legs = $data['legs'] ?? [];
20
        $this->summary = $data['summary'];
21
    }
22
23
    /**
24
     * @return Leg[]
25
     */
26
    public function getLegs(): array
27
    {
28
        return $this->legs;
29
    }
30
31
    public function getSummary(): Summary
32
    {
33
        return $this->summary;
34
    }
35
}
36