Completed
Pull Request — master (#78)
by David
02:28
created

CommentedItem::getItem()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace TheAentMachine\Yaml;
5
6
7
class CommentedItem
8
{
9
    /**
10
     * @var mixed
11
     */
12
    private $item;
13
    /**
14
     * @var string
15
     */
16
    private $comment;
17
18
    /**
19
     * @param mixed $item
20
     * @param string $comment
21
     */
22
    public function __construct($item, string $comment)
23
    {
24
25
        $this->item = $item;
26
        $this->comment = $comment;
27
    }
28
29
    /**
30
     * @return mixed
31
     */
32
    public function getItem()
33
    {
34
        return $this->item;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getComment(): string
41
    {
42
        return $this->comment;
43
    }
44
}
45