StringExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFilters() 0 8 1
1
<?php
2
3
namespace Zenstruck\String\Bridge\Twig;
4
5
use Twig\Extension\AbstractExtension;
6
use Twig\TwigFilter;
7
8
/**
9
 * @author Kevin Bond <[email protected]>
10
 */
11
final class StringExtension extends AbstractExtension
12
{
13
    public function getFilters()
14
    {
15
        return [
16
            new TwigFilter('remove_whitespace', 'remove_whitespace'),
17
            new TwigFilter('null_trim', 'null_trim'),
18
            new TwigFilter('truncate_word', 'truncate_word'),
19
        ];
20
    }
21
}
22