Completed
Push — master ( 1d4343...278efa )
by Kevin
04:08
created

Slot::isTransparentElement()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 4
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
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\FlowContent;
7
use Groundskeeper\Tokens\ElementTypes\OpenElement;
8
use Groundskeeper\Tokens\ElementTypes\PhrasingContent;
9
use Groundskeeper\Tokens\ElementTypes\TransparentElement;
10
11
/**
12
 * "slot" element
13
 *
14
 * https://html.spec.whatwg.org/multipage/forms.html#the-slot-element
15
 *
16
 * @todo Implement checks.
17
 */
18 View Code Duplication
class Slot 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...
19
{
20 1
    protected function getAllowedAttributes()
21
    {
22
        $slotAllowedAttributes = array(
23
            '/^name$/i' => Attribute::CS_STRING
24 1
        );
25
26 1
        return array_merge(
27 1
            $slotAllowedAttributes,
28 1
            parent::getAllowedAttributes()
29 1
        );
30
    }
31
32 1
    public function isTransparentElement()
33
    {
34 1
        return true;
35
    }
36
}
37