TextExtension::getFilters()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Alpixel\Bundle\CMSBundle\Twig\Extension;
4
5
class TextExtension extends \Twig_Extension
6
{
7
    /**
8
     * @return string
9
     */
10
    public function getName()
11
    {
12
        return 'alpixel_text_extension';
13
    }
14
15
    /**
16
     * @return array
17
     */
18
    public function getFilters()
19
    {
20
        return [
21
            new \Twig_SimpleFilter('get_class', [$this, 'getClass']),
22
        ];
23
    }
24
25
    public function getClass($object)
26
    {
27
        return get_class($object);
28
    }
29
}
30