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

PlaceAutocompleteHelper   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 3
dl 0
loc 45
ccs 0
cts 9
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A render() 0 4 1
A renderHtml() 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\PlaceAutocompleteEvent;
15
use Ivory\GoogleMap\Helper\Event\PlaceAutocompleteEvents;
16
use Ivory\GoogleMap\Place\Autocomplete;
17
18
/**
19
 * @author GeLo <[email protected]>
20
 */
21
class PlaceAutocompleteHelper extends AbstractHelper
22
{
23
    /**
24
     * @param Autocomplete $autocomplete
25
     *
26
     * @return string
27
     */
28
    public function render(Autocomplete $autocomplete)
29
    {
30
        return $this->renderHtml($autocomplete).$this->renderJavascript($autocomplete);
31
    }
32
33
    /**
34
     * @param Autocomplete $autocomplete
35
     *
36
     * @return string
37
     */
38
    public function renderHtml(Autocomplete $autocomplete)
39
    {
40
        return $this->doRender($autocomplete, PlaceAutocompleteEvents::HTML);
41
    }
42
43
    /**
44
     * @param Autocomplete $autocomplete
45
     *
46
     * @return string
47
     */
48
    public function renderJavascript(Autocomplete $autocomplete)
49
    {
50
        return $this->doRender($autocomplete, PlaceAutocompleteEvents::JAVASCRIPT);
51
    }
52
53
    /**
54
     * @param Autocomplete $autocomplete
55
     * @param string       $eventName
56
     *
57
     * @return string
58
     */
59
    private function doRender(Autocomplete $autocomplete, $eventName)
60
    {
61
        $this->getEventDispatcher()->dispatch($eventName, $event = new PlaceAutocompleteEvent($autocomplete));
62
63
        return $event->getCode();
64
    }
65
}
66