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

MapHelper::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 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;
13
14
use Ivory\GoogleMap\Helper\Event\MapEvent;
15
use Ivory\GoogleMap\Helper\Event\MapEvents;
16
use Ivory\GoogleMap\Map;
17
18
/**
19
 * @author GeLo <[email protected]>
20
 */
21
class MapHelper extends AbstractHelper
22
{
23
    /**
24
     * @param Map $map
25
     *
26
     * @return string
27
     */
28 220
    public function render(Map $map)
29
    {
30 220
        return $this->renderHtml($map).$this->renderStylesheet($map).$this->renderJavascript($map);
31
    }
32
33
    /**
34
     * @param Map $map
35
     *
36
     * @return string
37
     */
38 220
    public function renderHtml(Map $map)
39
    {
40 220
        return $this->doRender($map, MapEvents::HTML);
41
    }
42
43
    /**
44
     * @param Map $map
45
     *
46
     * @return string
47
     */
48 220
    public function renderStylesheet(Map $map)
49
    {
50 220
        return $this->doRender($map, MapEvents::STYLESHEET);
51
    }
52
53
    /**
54
     * @param Map $map
55
     *
56
     * @return string
57
     */
58 220
    public function renderJavascript(Map $map)
59
    {
60 220
        return $this->doRender($map, MapEvents::JAVASCRIPT);
61
    }
62
63
    /**
64
     * @param Map    $map
65
     * @param string $eventName
66
     *
67
     * @return string
68
     */
69 220
    private function doRender(Map $map, $eventName)
70
    {
71 220
        $this->getEventDispatcher()->dispatch($eventName, $event = new MapEvent($map));
72
73 220
        return $event->getCode();
74
    }
75
}
76