Completed
Push — master ( e0ac7a...8eddfc )
by Kevin
03:21
created

Map::getAllowedAttributes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 11
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 1 Features 1
Metric Value
c 1
b 1
f 1
dl 11
loc 11
ccs 0
cts 10
cp 0
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Groundskeeper\Tokens\Elements;
4
5
use Groundskeeper\Tokens\ElementTypes\FlowContent;
6
use Groundskeeper\Tokens\ElementTypes\OpenElement;
7
use Groundskeeper\Tokens\ElementTypes\PhrasingContent;
8
use Groundskeeper\Tokens\ElementTypes\TransparentElement;
9
10
/**
11
 * "map" element
12
 *
13
 * https://html.spec.whatwg.org/multipage/semantics.html#the-map-element
14
 */
15 View Code Duplication
class Map extends OpenElement implements FlowContent, PhrasingContent, TransparentElement
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...
16
{
17
    protected function getAllowedAttributes()
18
    {
19
        $mapAllowedAttributes = array(
20
            '/^name$/i' => Element::ATTR_CS_STRING
21
        );
22
23
        return array_merge(
24
            $mapAllowedAttributes,
25
            parent::getAllowedAttributes()
26
        );
27
    }
28
29
    public function isTransparentElement()
30
    {
31
        return true;
32
    }
33
}
34