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.

MapHelper::renderStylesheet()   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 1
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\MapHelper as BaseMapHelper;
15
use Ivory\GoogleMap\Map;
16
use Symfony\Component\Templating\Helper\Helper;
17
18
/**
19
 * @author GeLo <[email protected]>
20
 */
21 View Code Duplication
class MapHelper 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 BaseMapHelper
25
     */
26
    private $mapHelper;
27
28
    /**
29
     * @param BaseMapHelper $mapHelper
30
     */
31 45
    public function __construct(BaseMapHelper $mapHelper)
32
    {
33 45
        $this->mapHelper = $mapHelper;
34 45
    }
35
36
    /**
37
     * @param Map      $map
38
     * @param string[] $attributes
39
     *
40
     * @return string
41
     */
42 9
    public function render(Map $map, array $attributes = [])
43
    {
44 9
        $map->addHtmlAttributes($attributes);
45
46 9
        return $this->mapHelper->render($map);
47
    }
48
49
    /**
50
     * @param Map      $map
51
     * @param string[] $attributes
52
     *
53
     * @return string
54
     */
55 9
    public function renderHtml(Map $map, array $attributes = [])
56
    {
57 9
        $map->addHtmlAttributes($attributes);
58
59 9
        return $this->mapHelper->renderHtml($map);
60
    }
61
62
    /**
63
     * @param Map $map
64
     *
65
     * @return string
66
     */
67 9
    public function renderStylesheet(Map $map)
68
    {
69 9
        return $this->mapHelper->renderStylesheet($map);
70
    }
71
72
    /**
73
     * @param Map $map
74
     *
75
     * @return string
76
     */
77 9
    public function renderJavascript(Map $map)
78
    {
79 9
        return $this->mapHelper->renderJavascript($map);
80
    }
81
82
    /**
83
     * {@inheritdoc}
84
     */
85 9
    public function getName()
86
    {
87 9
        return 'ivory_google_map';
88
    }
89
}
90