Passed
Push — master ( e129d0...0eb352 )
by Ivan
03:19
created

Block::getId()   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
declare(strict_types=1);
4
5
namespace Everlution\AjaxcomBundle\DataObject;
6
7
/**
8
 * Class Block.
9
 *
10
 * @author Ivan Barlog <[email protected]>
11
 */
12
class Block
13
{
14
    /** @var string */
15
    private $id;
16
    /** @var bool */
17
    private $shouldRefresh = false;
18
19
    public function __construct(string $id)
20
    {
21
        $this->id = $id;
22
    }
23
24
    public function getId(): string
25
    {
26
        return $this->id;
27
    }
28
29
    public function refresh(): void
30
    {
31
        $this->shouldRefresh = true;
32
    }
33
34
    public function shouldRefresh(): bool
35
    {
36
        return $this->shouldRefresh;
37
    }
38
}
39