AttributesSimplifier   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getReplacePatternData() 0 9 1
1
<?php
2
3
namespace gulch\Minify\Processor;
4
5
use gulch\Minify\Contract\ProcessorInterface;
6
7
class AttributesSimplifier extends Replacer implements ProcessorInterface
8
{
9
    public function getReplacePatternData(): array
10
    {
11
        return [
12
            '/ method=("get"|get)/i' => '',
13
            '/ disabled=[^ >]*(.*?)/' => ' disabled',
14
            '/ readonly=[^ >]*(.*?)/' => ' readonly',
15
            '/ selected=[^ >]*(.*?)/' => ' selected',
16
            '/ async=[^ >]*(.*?)/' => ' async',
17
            '/ defer=[^ >]*(.*?)/' => ' defer',
18
        ];
19
    }
20
}
21