Completed
Pull Request — 2.x (#41)
by jake
02:03
created

ElementRaw::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 3
crap 1
1
<?php
2
/**
3
 *
4
 * This file is part of Aura for PHP.
5
 *
6
 * @license http://opensource.org/licenses/bsd-license.php BSD
7
 *
8
 */
9
namespace Aura\Html\Helper;
10
11
/**
12
 *
13
 * Helper to generate a complete element without escaping the $content
14
 *
15
 * @package Aura.Html
16
 *
17
 */
18
class ElementRaw extends AbstractElement
19
{
20
    /**
21
     *
22
     * Returns any kind of complete HTML element with attributes.
23
     *
24
     * @param string $tag The tag to generate.
25
     *
26
     * @param string $content The content of the element.
27
     *
28
     * @param array $attr Attributes for the tag.
29
     *
30
     * @return string
31
     *
32
     */
33 2
    public function __invoke($tag, $content, array $attr = array())
34
    {
35 2
        return $this->raw($tag, $content, $attr);
36
    }
37
}
38