Completed
Push — master ( 91ab9a...64950e )
by Kevin
04:15
created

Dialog   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAllowedAttributes() 0 11 1
1
<?php
2
3
namespace Groundskeeper\Tokens\Elements;
4
5
use Groundskeeper\Tokens\Attribute;
6
use Groundskeeper\Tokens\ElementTypes\FlowContent;
7
use Groundskeeper\Tokens\ElementTypes\OpenElement;
8
use Groundskeeper\Tokens\ElementTypes\SectioningRoot;
9
10
/**
11
 * "dialog" element
12
 *
13
 * https://html.spec.whatwg.org/multipage/forms.html#the-dialog-element
14
 *
15
 * @todo Implement checks.
16
 */
17
class Dialog extends OpenElement implements FlowContent, SectioningRoot
18
{
19
    protected function getAllowedAttributes()
20
    {
21
        $dialogAllowedAttributes = array(
22
            '/^open$/i' => Attribute::BOOL
23
        );
24
25
        return array_merge(
26
            $dialogAllowedAttributes,
27
            parent::getAllowedAttributes()
28
        );
29
    }
30
}
31