Completed
Push — master ( 886262...62c01b )
by Kevin
02:18
created

Style::getAllowedAttributes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 9

Duplication

Lines 14
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 14
loc 14
ccs 0
cts 13
cp 0
rs 9.4285
cc 1
eloc 9
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Groundskeeper\Tokens\Elements;
4
5 View Code Duplication
class Style extends OpenElement
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
6
{
7
    protected function getAllowedAttributes()
8
    {
9
        $styleAllowedAttributes = array(
10
            '/^media$/i' => Element::ATTR_CI_STRING,
11
            '/^nonce$/i' => Element::ATTR_CS_STRING,
12
            '/^type$/i' => Element::ATTR_CI_STRING,
13
            '/^scoped$/i' => Element::ATTR_CI_STRING
14
        );
15
16
        return array_merge(
17
            $styleAllowedAttributes,
18
            parent::getAllowedAttributes()
19
        );
20
    }
21
}
22