BreadcrumbItem   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 4
eloc 8
c 1
b 1
f 0
dl 0
loc 25
ccs 10
cts 10
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getUrl() 0 3 1
A getName() 0 3 1
A getCleanName() 0 3 1
1
<?php
2
3
namespace PiedWeb\UrlHarvester;
4
5
class BreadcrumbItem
6
{
7
    private $url;
8
9
    private $name;
10 6
11
    public function __construct($url, $name)
12 6
    {
13 6
        $this->url = $url;
14 6
        $this->name = $name;
15
    }
16 3
17
    public function getUrl()
18 3
    {
19
        return $this->url;
20
    }
21 3
22
    public function getName()
23 3
    {
24
        return $this->name;
25
    }
26 3
27
    public function getCleanName()
28 3
    {
29
        return substr(strip_tags($this->name), 0, 100);
30
    }
31
}
32