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.

HighchartsExtension   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 57.14%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 19
ccs 4
cts 7
cp 0.5714
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getFunctions() 0 6 1
A getName() 0 4 1
A chart() 0 4 1
1
<?php
2
namespace Ob\HighchartsBundle\Twig;
3
4
use Ob\HighchartsBundle\Highcharts\ChartInterface;
5
6
class HighchartsExtension extends \Twig_Extension
7
{
8
    public function getFunctions()
9
    {
10
        return array(
11
            new \Twig_SimpleFunction('chart', array($this, 'chart'), array('is_safe' => array('html'))),
12
        );
13
    }
14
15 1
    public function chart(ChartInterface $chart, $engine = 'jquery')
16
    {
17 1
        return $chart->render($engine);
18
    }
19
20 1
    public function getName()
21
    {
22 1
        return 'highcharts_extension';
23
    }
24
}
25