Passed
Push — 4.1 ( cc1509...e0bb47 )
by Andrea
12:41
created

ParametriTabellaTwigExtension   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 71.43%

Importance

Changes 0
Metric Value
wmc 3
eloc 6
dl 0
loc 16
ccs 5
cts 7
cp 0.7143
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setParametroTabella() 0 3 1
A getParametroTabella() 0 3 1
A getFilters() 0 5 1
1
<?php
2
3
namespace Fi\CoreBundle\Twig\Extension;
4
5
use Fi\CoreBundle\Utils\Tabella\ParametriTabella;
6
7
class ParametriTabellaTwigExtension extends \Twig_Extension
8
{
9 1
    public function getFilters()
10
    {
11
        return array(
12 1
            new \Twig_SimpleFilter('getparametrotabella', array($this, 'getParametroTabella')),
13 1
            new \Twig_SimpleFilter('setparametrotabella', array($this, 'setParametroTabella')),
14
        );
15
    }
16 1
    public function getParametroTabella($parametro)
17
    {
18 1
        return ParametriTabella::getParameter($parametro);
19
    }
20
    public function setParametroTabella($parametro)
21
    {
22
        return ParametriTabella::setParameter($parametro);
23
    }
24
}
25