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

IconifySvg::getProcessors()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 2
c 1
b 1
f 0
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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