Block::getId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 3
rs 10
cc 1
nc 1
nop 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(): Block
30
    {
31
        $this->shouldRefresh = true;
32
33
        return $this;
34
    }
35
36
    public function shouldRefresh(): bool
37
    {
38
        return $this->shouldRefresh;
39
    }
40
}
41