Style::getAllowedAttributes()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 9
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Groundskeeper\Tokens\Elements;
4
5
use Groundskeeper\Tokens\Attribute;
6
use Groundskeeper\Tokens\ElementTypes\MetadataContent;
7
use Groundskeeper\Tokens\ElementTypes\OpenElement;
8
9
class Style extends OpenElement implements MetadataContent
10
{
11 1
    protected function getAllowedAttributes()
12
    {
13
        $styleAllowedAttributes = array(
14 1
            '/^media$/i' => Attribute::CS_STRING,
15
            '/^nonce$/i' => Attribute::CS_STRING,
16
            '/^type$/i' => Attribute::CI_STRING,
17
            '/^scoped$/i' => Attribute::CI_STRING
18
        );
19
20 1
        return array_merge(
21 1
            $styleAllowedAttributes,
22 1
            parent::getAllowedAttributes()
23
        );
24
    }
25
}
26