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.

PlaceAutocompleteHelper::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the Ivory Google Map bundle 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\GoogleMapBundle\Templating;
13
14
use Ivory\GoogleMap\Helper\PlaceAutocompleteHelper as BasePlaceAutocompleteHelper;
15
use Ivory\GoogleMap\Place\Autocomplete;
16
use Symfony\Component\Templating\Helper\Helper;
17
18
/**
19
 * @author GeLo <[email protected]>
20
 */
21 View Code Duplication
class PlaceAutocompleteHelper extends Helper
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
22
{
23
    /**
24
     * @var BasePlaceAutocompleteHelper
25
     */
26
    private $placeAutocompleteHelper;
27
28
    /**
29
     * @param BasePlaceAutocompleteHelper $placeAutocompleteHelper
30
     */
31 36
    public function __construct(BasePlaceAutocompleteHelper $placeAutocompleteHelper)
32
    {
33 36
        $this->placeAutocompleteHelper = $placeAutocompleteHelper;
34 36
    }
35
36
    /**
37
     * @param Autocomplete $autocomplete
38
     * @param string[]     $attributes
39
     *
40
     * @return string
41
     */
42 9
    public function render(Autocomplete $autocomplete, array $attributes = [])
43
    {
44 9
        $autocomplete->addInputAttributes($attributes);
45
46 9
        return $this->placeAutocompleteHelper->render($autocomplete);
47
    }
48
49
    /**
50
     * @param Autocomplete $autocomplete
51
     * @param string[]     $attributes
52
     *
53
     * @return string
54
     */
55 9
    public function renderHtml(Autocomplete $autocomplete, array $attributes = [])
56
    {
57 9
        $autocomplete->addInputAttributes($attributes);
58
59 9
        return $this->placeAutocompleteHelper->renderHtml($autocomplete);
60
    }
61
62
    /**
63
     * @param Autocomplete $autocomplete
64
     *
65
     * @return string
66
     */
67 9
    public function renderJavascript(Autocomplete $autocomplete)
68
    {
69 9
        return $this->placeAutocompleteHelper->renderJavascript($autocomplete);
70
    }
71
72
    /**
73
     * {@inheritdoc}
74
     */
75 9
    public function getName()
76
    {
77 9
        return 'ivory_google_place_autocomplete';
78
    }
79
}
80