Completed
Pull Request — master (#41)
by Vladimir
02:24
created

TwigExtension   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Test Coverage

Coverage 18.18%

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 29
ccs 2
cts 11
cp 0.1818
rs 10
wmc 3
lcom 0
cbo 6

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 0 4 1
A getFilters() 0 8 1
A getFunctions() 0 7 1
1
<?php
2
3
namespace allejo\stakx\Twig;
4
5
class TwigExtension extends \Twig_Extension
6
{
7
    public function getFilters ()
8
    {
9
        return array(
10
            GroupByFilter::get(),
11
            OrderFilter::get(),
12
            WhereFilter::get()
13
        );
14
    }
15
16
    public function getFunctions ()
17
    {
18
        return array(
19
            BaseUrlFunction::get(),
20
            FileFunction::get()
21
        );
22
    }
23
24
    /**
25
     * Returns the name of the extension.
26
     *
27
     * @return string The extension name
28
     */
29 13
    public function getName ()
30
    {
31 13
        return 'stakx_core_extension';
32
    }
33
}