Completed
Push — 4.x ( d4939e...747949 )
by
unknown
15s
created

Basic   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 91.67%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 33
ccs 11
cts 12
cp 0.9167
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A getFilters() 0 14 1
1
<?php
2
3
/**
4
 * This file is part of TwigView.
5
 *
6
 ** (c) 2014 Cees-Jan Kiewiet
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
namespace WyriHaximus\TwigView\Lib\Twig\Extension;
12
13
/**
14
 * Class Basic
15
 * @package WyriHaximus\TwigView\Lib\Twig\Extension
16
 */
17
class Basic extends \Twig_Extension
18
{
19
20
    /**
21
     * Get declared filters.
22
     *
23
     * @return \Twig_SimpleFilter[]
24
     */
25 4
    public function getFilters()
26
    {
27
        return [
28 4
            new \Twig_SimpleFilter('debug', 'debug'),
29 4
            new \Twig_SimpleFilter('pr', 'pr'),
30 4
            new \Twig_SimpleFilter('low', 'low'),
31 4
            new \Twig_SimpleFilter('up', 'up'),
32 4
            new \Twig_SimpleFilter('count', 'count'),
33 4
            new \Twig_SimpleFilter('h', 'h'),
34 4
            new \Twig_SimpleFilter('null', function () {
35
                return '';
36 4
            }),
37
        ];
38
    }
39
40
    /**
41
     * Get extension name.
42
     *
43
     * @return string
44
     */
45 1
    public function getName()
46
    {
47 1
        return 'basic';
48
    }
49
}
50