Completed
Push — master ( 2319eb...3c4d84 )
by Vladimir
02:22
created

TwigExtension   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 11

Test Coverage

Coverage 14.29%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 11
dl 0
loc 34
rs 10
c 0
b 0
f 0
ccs 2
cts 14
cp 0.1429

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A getFilters() 0 13 1
A getFunctions() 0 7 1
1
<?php
2
3
/**
4
 * @copyright 2017 Vladimir Jimenez
5
 * @license   https://github.com/allejo/stakx/blob/master/LICENSE.md MIT
6
 */
7
8
namespace allejo\stakx\Twig;
9
10
class TwigExtension extends \Twig_Extension
11
{
12
    public function getFilters()
13
    {
14
        return array(
15
            GroupByFilter::get(),
16
            OrderFilter::get(),
17
            WhereFilter::get(),
18
            SelectFilter::get(),
19
            ZipFilter::get(),
20
            Md5Filter::get(),
21
            Sha1Filter::get(),
22
            TableOfContentsFilter::get(),
23
        );
24
    }
25
26
    public function getFunctions()
27
    {
28
        return array(
29
            BaseUrlFunction::get(),
30
            FileFunction::get(),
31
        );
32
    }
33
34
    /**
35
     * Returns the name of the extension.
36
     *
37
     * @return string The extension name
38
     */
39 18
    public function getName()
40
    {
41 18
        return 'stakx_core_extension';
42
    }
43
}
44