Completed
Push — master ( 0164d4...9f5a90 )
by Cees-Jan
01:55
created

Basic::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

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 4
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of TwigView.
4
 *
5
 ** (c) 2014 Cees-Jan Kiewiet
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace WyriHaximus\TwigView\Lib\Twig\Extension;
12
13
use Twig\Extension\AbstractExtension;
14
use Twig\TwigFilter;
15
16
/**
17
 * Class Basic.
18
 * @package WyriHaximus\TwigView\Lib\Twig\Extension
19
 */
20
final class Basic extends AbstractExtension
21
{
22
    /**
23
     * Get declared filters.
24
     *
25
     * @return \Twig\TwigFilter[]
26
     */
27 4
    public function getFilters(): array
28
    {
29
        return [
30 4
            new TwigFilter('debug', 'debug'),
31 4
            new TwigFilter('pr', 'pr'),
32 4
            new TwigFilter('low', 'low'),
33 4
            new TwigFilter('up', 'up'),
34 4
            new TwigFilter('env', 'env'),
35 4
            new TwigFilter('count', 'count'),
36 4
            new TwigFilter('h', 'h'),
37 4
            new TwigFilter('null', function () {
38
                return '';
39 4
            }),
40
        ];
41
    }
42
43
    /**
44
     * Get extension name.
45
     *
46
     * @return string
47
     */
48 1
    public function getName(): string
49
    {
50 1
        return 'basic';
51
    }
52
}
53