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 ( 898d2c...c462d0 )
by Eric
24:16 queued 21:28
created

MapHelper   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 3
dl 0
loc 55
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 4 1
A renderHtml() 0 4 1
A renderStylesheet() 0 4 1
A renderJavascript() 0 4 1
A doRender() 0 6 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
    public function render(Map $map)
29
    {
30
        return $this->renderHtml($map).$this->renderStylesheet($map).$this->renderJavascript($map);
31
    }
32
33
    /**
34
     * @param Map $map
35
     *
36
     * @return string
37
     */
38
    public function renderHtml(Map $map)
39
    {
40
        return $this->doRender($map, MapEvents::HTML);
41
    }
42
43
    /**
44
     * @param Map $map
45
     *
46
     * @return string
47
     */
48
    public function renderStylesheet(Map $map)
49
    {
50
        return $this->doRender($map, MapEvents::STYLESHEET);
51
    }
52
53
    /**
54
     * @param Map $map
55
     *
56
     * @return string
57
     */
58
    public function renderJavascript(Map $map)
59
    {
60
        return $this->doRender($map, MapEvents::JAVASCRIPT);
61
    }
62
63
    /**
64
     * @param Map    $map
65
     * @param string $eventName
66
     *
67
     * @return string
68
     */
69
    private function doRender(Map $map, $eventName)
70
    {
71
        $this->getEventDispatcher()->dispatch($eventName, $event = new MapEvent($map));
72
73
        return $event->getCode();
74
    }
75
}
76