Completed
Pull Request — 2.x (#43)
by jake
02:49 queued 50s
created

Links::add()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1.0156

Importance

Changes 4
Bugs 0 Features 2
Metric Value
c 4
b 0
f 2
dl 0
loc 5
ccs 3
cts 4
cp 0.75
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
crap 1.0156
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 for a series of <link ... /> tags.
14
 *
15
 * @package Aura.Html
16
 *
17
 */
18
class Links extends AbstractSeries
19
{
20
    /**
21
     *
22
     * Adds a <link ... > tag to the series.
23
     *
24
     * @param array $attr Attributes for the <link> tag.
25
     *
26
     * @param int $pos The link position in the series.
27
     *
28
     * @return self
29
     *
30
     */
31 1
    public function add(array $attr, $pos = 100)
32
    {
33
        $this->addElement($pos, $this->void('link', $attr));
34 1
        return $this;
35 1
    }
36
}
37