Passed
Push — master ( 2afdeb...b846a2 )
by Nikolaos
06:23 queued 03:51
created

Ol   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTag() 0 3 1
A add() 0 14 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
/**
15
 * Class Ol
16
 */
17
class Ol extends AbstractList
18
{
19
20
    /**
21
     * Add an element to the list
22
     *
23
     * @param string $text
24
     * @param array  $attributes
25
     * @param bool   $raw
26
     *
27
     * @return $this
28
     */
29 2
    public function add(string $text, array $attributes = [], bool $raw = false)
30
    {
31 2
        $this->store[] = [
32 2
            "renderFullElement",
33
            [
34 2
                $this->elementTag,
35 2
                $text,
36 2
                $attributes,
37 2
                $raw,
38
            ],
39 2
            $this->indent(),
40
        ];
41
42 2
        return $this;
43
    }
44
45
    /**
46
     * @return string
47
     */
48 1
    protected function getTag(): string
49
    {
50 1
        return 'ol';
51
    }
52
}
53