QuotesRemover::getReplacePatternData()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

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