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

EncodedPolylineRenderer::render()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 7
nc 2
nop 1
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\EncodedPolyline;
15
16
/**
17
 * @author GeLo <[email protected]>
18
 */
19
class EncodedPolylineRenderer
20
{
21
    /**
22
     * @var EncodedPolylineStyleRenderer
23
     */
24
    private $encodedPolylineStyleRenderer;
25
26
    /**
27
     * @var EncodedPolylineValueRenderer
28
     */
29
    private $encodedPolylineValueRenderer;
30
31
    /**
32
     * @param EncodedPolylineStyleRenderer $encodedPolylineStyleRenderer
33
     * @param EncodedPolylineValueRenderer $encodedPolylineValueRenderer
34
     */
35
    public function __construct(
36
        EncodedPolylineStyleRenderer $encodedPolylineStyleRenderer,
37
        EncodedPolylineValueRenderer $encodedPolylineValueRenderer
38
    ) {
39
        $this->encodedPolylineStyleRenderer = $encodedPolylineStyleRenderer;
40
        $this->encodedPolylineValueRenderer = $encodedPolylineValueRenderer;
41
    }
42
43
    /**
44
     * @param EncodedPolyline $encodedPolyline
45
     *
46
     * @return string
47
     */
48
    public function render(EncodedPolyline $encodedPolyline)
49
    {
50
        $result = [];
51
        $style = $this->encodedPolylineStyleRenderer->render($encodedPolyline);
52
53
        if (!empty($style)) {
54
            $result[] = $style;
55
        }
56
57
        $result[] = $this->encodedPolylineValueRenderer->render($encodedPolyline);
58
59
        return implode('|', $result);
60
    }
61
}
62