Code Duplication    Length = 17-18 lines in 2 locations

src/Tokens/Elements/Meta.php 1 location

@@ 5-22 (lines=18) @@
2
3
namespace Groundskeeper\Tokens\Elements;
4
5
class Meta extends ClosedElement
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

src/Tokens/Elements/Style.php 1 location

@@ 5-21 (lines=17) @@
2
3
namespace Groundskeeper\Tokens\Elements;
4
5
class Style extends OpenElement
6
{
7
    protected function getAllowedAttributes()
8
    {
9
        $styleAllowedAttributes = array(
10
            '/^media$/i' => Element::ATTR_CI_STRING,
11
            '/^nonce$/i' => Element::ATTR_CS_STRING,
12
            '/^type$/i' => Element::ATTR_CI_STRING,
13
            '/^scoped$/i' => Element::ATTR_CI_STRING
14
        );
15
16
        return array_merge(
17
            $styleAllowedAttributes,
18
            parent::getAllowedAttributes()
19
        );
20
    }
21
}
22