Completed
Pull Request — master (#81)
by Cees-Jan
02:48 queued 01:12
created

PotentialDangerous::getFunctions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
crap 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 PotentialDangerous extends \Twig_Extension
18
{
19
20
    /**
21
     * Get declared filters.
22
     *
23
     * @return \Twig_SimpleFilter[]
24
     */
25 1
    public function getFilters()
26
    {
27
        return [
28 1
            new \Twig_SimpleFilter('env', 'env'),
29 1
        ];
30
    }
31
32
    /**
33
     * Get declared functions.
34
     *
35
     * @return \Twig_SimpleFunction[]
36
     */
37 1
    public function getFunctions()
38
    {
39
        return [
40 1
        new \Twig_SimpleFunction('config', 'Cake\Core\Configure::read'),
41 1
        ];
42
    }
43
44
    /**
45
     * Get extension name.
46
     *
47
     * @return string
48
     */
49 1
    public function getName()
50
    {
51 1
        return 'potential_dangerous';
52
    }
53
}
54