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.

LinkExtension::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
c 1
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Hateoas\Twig\Extension;
4
5
use Hateoas\Helper\LinkHelper;
6
7
/**
8
 * @author William Durand <[email protected]>
9
 */
10
class LinkExtension extends \Twig_Extension
11
{
12
    /**
13
     * @var LinkHelper
14
     */
15
    private $linkHelper;
16
17
    public function __construct(LinkHelper $linkHelper)
18
    {
19
        $this->linkHelper = $linkHelper;
20
    }
21
22
    /**
23
     * {@inheritDoc}
24
     */
25
    public function getFunctions()
26
    {
27
        return array(
28
            new \Twig_SimpleFunction('link_href', array($this->linkHelper, 'getLinkHref')),
29
        );
30
    }
31
32
    /**
33
     * {@inheritDoc}
34
     */
35
    public function getName()
36
    {
37
        return 'hateoas_link';
38
    }
39
}
40