NamedStringCollection   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 24
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A name() 0 3 1
1
<?php
2
/**
3
 * This file is part of the theroadbunch/bouncer package.
4
 *
5
 * (c) Dan McAdams <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace RoadBunch\String;
12
13
14
/**
15
 * Class NamedStringCollection
16
 *
17
 * @author  Dan McAdams
18
 * @package RoadBunch\String
19
 */
20
class NamedStringCollection extends StringCollection implements NamedStringCollectionInterface
21
{
22
    protected $name;
23
24
    /**
25
     * FilterList constructor.
26
     *
27
     * @param string   $name
28
     * @param string[] $elements An array of strings
29
     */
30 11
    public function __construct(string $name, array $elements = [])
31
    {
32 11
        $this->name = $name;
33 11
        parent::__construct($elements);
34 11
    }
35
36
    /**
37
     * The list name
38
     *
39
     * @return string
40
     */
41 11
    public function name(): string
42
    {
43 11
        return $this->name;
44
    }
45
}
46