GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( f79bcb...de7e43 )
by Eric
80:29 queued 77:22
created

IconSequenceCollector   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 3
dl 0
loc 48
ccs 15
cts 15
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getPolylineCollector() 0 4 1
A setPolylineCollector() 0 4 1
A collect() 0 10 3
1
<?php
2
3
/*
4
 * This file is part of the Ivory Google Map package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ivory\GoogleMap\Helper\Collector\Overlay;
13
14
use Ivory\GoogleMap\Helper\Collector\AbstractCollector;
15
use Ivory\GoogleMap\Map;
16
use Ivory\GoogleMap\Overlay\IconSequence;
17
18
/**
19
 * @author GeLo <[email protected]>
20
 */
21
class IconSequenceCollector extends AbstractCollector
22
{
23
    /**
24
     * @var PolylineCollector
25
     */
26
    private $polylineCollector;
27
28
    /**
29
     * @param PolylineCollector $polylineCollector
30
     */
31 244
    public function __construct(PolylineCollector $polylineCollector)
32
    {
33 244
        $this->setPolylineCollector($polylineCollector);
34 244
    }
35
36
    /**
37
     * @return PolylineCollector
38
     */
39 4
    public function getPolylineCollector()
40
    {
41 4
        return $this->polylineCollector;
42
    }
43
44
    /**
45
     * @param PolylineCollector $polylineCollector
46
     */
47 244
    public function setPolylineCollector(PolylineCollector $polylineCollector)
48
    {
49 244
        $this->polylineCollector = $polylineCollector;
50 244
    }
51
52
    /**
53
     * @param Map            $map
54
     * @param IconSequence[] $icons
55
     *
56
     * @return IconSequence[]
57
     */
58 228
    public function collect(Map $map, array $icons = [])
59
    {
60 228
        foreach ($this->polylineCollector->collect($map) as $polyline) {
61 20
            if ($polyline->hasIconSequences()) {
62 16
                $icons = $this->collectValues($polyline->getIconSequences());
63 6
            }
64 114
        }
65
66 228
        return $icons;
67
    }
68
}
69