Completed
Push — master ( 886262...62c01b )
by Kevin
02:18
created

Meta::getAllowedAttributes()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 10

Duplication

Lines 15
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 15
loc 15
ccs 0
cts 10
cp 0
rs 9.4285
cc 1
eloc 10
nc 1
nop 0
crap 2
1
<?php
2
3
namespace Groundskeeper\Tokens\Elements;
4
5 View Code Duplication
class Meta extends ClosedElement
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...
6
{
7
    protected function getAllowedAttributes()
8
    {
9
        $metaAllowedAttributes = array(
10
            '/^name$/i' => Element::ATTR_CS_STRING,
11
            '/^http-equiv$/i' => Element::ATTR_CS_STRING,
12
            '/^content$/i' => Element::ATTR_CS_STRING,
13
            '/^charset$/i' => Element::ATTR_CS_STRING,
14
            '/^property$/i' => Element::ATTR_CS_STRING  // Facebook OG attribute name.
15
        );
16
17
        return array_merge(
18
            $metaAllowedAttributes,
19
            parent::getAllowedAttributes()
20
        );
21
    }
22
}
23