QuotesRemover   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getReplacePatternData() 0 13 1
1
<?php
2
3
namespace gulch\Minify\Processor;
4
5
use gulch\Minify\Contract\ProcessorInterface;
6
7
class QuotesRemover extends Replacer implements ProcessorInterface
8
{
9
    public function getReplacePatternData(): array
10
    {
11
        return [
12
            '/src="(.*?)"/' => 'src=$1',
13
            '/width="(.*?)"/' => 'width=$1',
14
            '/height="(.*?)"/' => 'height=$1',
15
            '/name="(.*?)"/' => 'name=$1',
16
            '/charset="(.*?)"/' => 'charset=$1',
17
            '/align="(.*?)"/' => 'align=$1',
18
            '/border="(.*?)"/' => 'border=$1',
19
            '/crossorigin="(.*?)"/' => 'crossorigin=$1',
20
            '/type="(.*?)"/' => 'type=$1',
21
            '/\/>/' => '>',
22
        ];
23
    }
24
}
25