BreadcrumbsNode::setLabel()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the BreadcrumbsBundle.
5
 *
6
 * (c) Yonel Ceruto <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Yceruto\Bundle\BreadcrumbsBundle;
13
14
class BreadcrumbsNode
15
{
16
    /**
17
     * @var string
18
     */
19
    private $path;
20
21
    /**
22
     * @var string
23
     */
24
    private $label;
25
26
    /**
27
     * BreadcrumbsNode constructor.
28
     *
29
     * @param string $path
30
     * @param string $label
31
     */
32
    public function __construct($path = null, $label = null)
33
    {
34
        $this->path = $path;
35
        $this->label = $label;
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getPath()
42
    {
43
        return $this->path;
44
    }
45
46
    /**
47
     * @param string $path
48
     *
49
     * @return BreadcrumbsNode
50
     */
51
    public function setPath($path)
52
    {
53
        $this->path = $path;
54
55
        return $this;
56
    }
57
58
    /**
59
     * @return string
60
     */
61
    public function getLabel()
62
    {
63
        return $this->label;
64
    }
65
66
    /**
67
     * @param string $label
68
     *
69
     * @return BreadcrumbsNode
70
     */
71
    public function setLabel($label)
72
    {
73
        $this->label = $label;
74
75
        return $this;
76
    }
77
78
    public function __toString()
79
    {
80
        return $this->label;
81
    }
82
}
83