CommentedItem::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

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