Completed
Push — master ( 45904d...9fbe45 )
by Kevin
03:18
created

Style   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 1
Metric Value
wmc 1
c 2
b 1
f 1
lcom 0
cbo 1
dl 0
loc 17
ccs 9
cts 9
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAllowedAttributes() 0 14 1
1
<?php
2
3
namespace Groundskeeper\Tokens\Elements;
4
5
use Groundskeeper\Tokens\Element;
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' => Element::ATTR_CS_STRING,
15 1
            '/^nonce$/i' => Element::ATTR_CS_STRING,
16 1
            '/^type$/i' => Element::ATTR_CI_STRING,
17
            '/^scoped$/i' => Element::ATTR_CI_STRING
18 1
        );
19
20 1
        return array_merge(
21 1
            $styleAllowedAttributes,
22 1
            parent::getAllowedAttributes()
23 1
        );
24
    }
25
}
26