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 — static-map ( 1bc0cf )
by Eric
64:02
created

PolylineRenderer   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 43
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A render() 0 13 2
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\Renderer\Image\Overlay;
13
14
use Ivory\GoogleMap\Overlay\Polyline;
15
16
/**
17
 * @author GeLo <[email protected]>
18
 */
19
class PolylineRenderer
20
{
21
    /**
22
     * @var PolylineStyleRenderer
23
     */
24
    private $polylineStyleRenderer;
25
26
    /**
27
     * @var PolylineLocationRenderer
28
     */
29
    private $polylineLocationRenderer;
30
31
    /**
32
     * @param PolylineStyleRenderer    $polylineStyleRenderer
33
     * @param PolylineLocationRenderer $polylineLocationRenderer
34
     */
35
    public function __construct(
36
        PolylineStyleRenderer $polylineStyleRenderer,
37
        PolylineLocationRenderer $polylineLocationRenderer
38
    ) {
39
        $this->polylineStyleRenderer = $polylineStyleRenderer;
40
        $this->polylineLocationRenderer = $polylineLocationRenderer;
41
    }
42
43
    /**
44
     * @param Polyline $polyline
45
     *
46
     * @return string
47
     */
48
    public function render(Polyline $polyline)
49
    {
50
        $result = [];
51
        $style = $this->polylineStyleRenderer->render($polyline);
52
53
        if (!empty($style)) {
54
            $result[] = $style;
55
        }
56
57
        $result[] = $this->polylineLocationRenderer->render($polyline);
58
59
        return implode('|', $result);
60
    }
61
}
62