Button   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 33.33%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
dl 0
loc 18
ccs 2
cts 6
cp 0.3333
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
1
<?php
2
3
/**
4
 * This file is part of the Phalcon Framework.
5
 *
6
 * For the full copyright and license information, please view the LICENSE.md
7
 * file that was distributed with this source code.
8
 */
9
10
declare(strict_types=1);
11
12
namespace Phalcon\Html\Helper;
13
14
use Phalcon\Html\Exception;
15
16
/**
17
 * Class Button
18
 */
19
class Button extends AbstractHelper
20
{
21
    /**
22
     * Produce a `<button>` tag.
23
     *
24
     * @param string $text
25
     * @param array  $attributes
26
     * @param bool   $raw
27
     *
28
     * @return string
29
     * @throws Exception
30
     */
31 1
    public function __invoke(
32
        string $text,
33
        array $attributes = [],
34
        bool $raw = false
35
    ): string {
36 1
        return $this->renderFullElement("button", $text, $attributes, $raw);
37
    }
38
}
39