AttributesSimplifier::getReplacePatternData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 7
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 9
rs 10
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