PotentialDangerous::getFunctions()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * This file is part of TwigView.
6
 *
7
 ** (c) 2014 Cees-Jan Kiewiet
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace WyriHaximus\TwigView\Lib\Twig\Extension;
14
15
use Twig\Extension\AbstractExtension;
16
use Twig\TwigFilter;
17
use Twig\TwigFunction;
18
19
/**
20
 * Class Basic.
21
 * @package WyriHaximus\TwigView\Lib\Twig\Extension
22
 */
23
class PotentialDangerous extends AbstractExtension
24
{
25
    /**
26
     * Get declared filters.
27
     *
28
     * @return \Twig\TwigFilter[]
29
     */
30 1
    public function getFilters()
31
    {
32
        return [
33 1
            new TwigFilter('env', 'env'),
34
        ];
35
    }
36
37
    /**
38
     * Get declared functions.
39
     *
40
     * @return \Twig\TwigFunction[]
41
     */
42 1
    public function getFunctions()
43
    {
44
        return [
45 1
            new TwigFunction('config', 'Cake\Core\Configure::read'),
46
        ];
47
    }
48
49
    /**
50
     * Get extension name.
51
     *
52
     * @return string
53
     */
54 1
    public function getName()
55
    {
56 1
        return 'potential_dangerous';
57
    }
58
}
59