Completed
Push — master ( b00e9b...6e0e0e )
by Vladimir
03:28
created

TwigExtension   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 11

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getFunctions() 0 7 1
A getName() 0 4 1
A getFilters() 0 13 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 6
    public function getFilters()
13
    {
14
        return array(
15 6
            GroupByFilter::get(),
16 6
            OrderFilter::get(),
17 6
            WhereFilter::get(),
18 6
            SelectFilter::get(),
19 6
            ZipFilter::get(),
20 6
            Md5Filter::get(),
21 6
            Sha1Filter::get(),
22 6
            TableOfContentsFilter::get(),
23
        );
24
    }
25
26 6
    public function getFunctions()
27
    {
28
        return array(
29 6
            BaseUrlFunction::get(),
30 6
            FileFunction::get(),
31
        );
32
    }
33
34
    /**
35
     * Returns the name of the extension.
36
     *
37
     * @return string The extension name
38
     */
39 30
    public function getName()
40
    {
41 30
        return 'stakx_core_extension';
42
    }
43
}
44