Passed
Push — main ( 64d07c...38d056 )
by Oscar
02:39
created

IconifySvg   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 1
eloc 3
c 1
b 1
f 0
dl 0
loc 12
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getProcessors() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of ocubom/twig-svg-extension
5
 *
6
 * © Oscar Cubo Medina <https://ocubom.github.io>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ocubom\Twig\Extension\Svg\Provider\Iconify;
13
14
use Ocubom\Twig\Extension\Svg\Processor\RemoveAttributeProcessor;
15
use Ocubom\Twig\Extension\Svg\Svg;
16
17
class IconifySvg extends Svg
18
{
19
    /**
20
     * @return array<string, array<int, callable>|callable>
21
     *
22
     * @psalm-suppress InvalidScope
23
     */
24 1
    protected static function getProcessors(): array
25
    {
26 1
        return array_merge(parent::getProcessors(), [
27
            // Options will be ignored & removed
28 1
            'data-icon' => new RemoveAttributeProcessor('data-icon'),
29 1
        ]);
30
    }
31
}
32