ItemCodeExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
c 1
b 0
f 1
dl 0
loc 6
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getFilters() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Setono\SyliusStrandsPlugin\Twig;
6
7
use Twig\Extension\AbstractExtension;
8
use Twig\TwigFilter;
9
10
final class ItemCodeExtension extends AbstractExtension
11
{
12
    public function getFilters(): array
13
    {
14
        return [
15
            new TwigFilter('strands_item_code', [Runtime::class, 'itemCode'], ['is_safe' => ['html']]),
16
        ];
17
    }
18
}
19