BlockContentIsRendering::setBody()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Modules\Block\Events;
4
5
class BlockContentIsRendering
6
{
7
    /**
8
     * @var string The body of the page to render
9
     */
10
    private $body;
11
    private $original;
12
13
    public function __construct($body)
14
    {
15
        $this->body = $body;
16
        $this->original = $body;
17
    }
18
19
    /**
20
     * @return string
21
     */
22
    public function getBody()
23
    {
24
        return $this->body;
25
    }
26
27
    /**
28
     * @param string $body
29
     */
30
    public function setBody($body)
31
    {
32
        $this->body = $body;
33
    }
34
35
    /**
36
     * @return mixed
37
     */
38
    public function getOriginal()
39
    {
40
        return $this->original;
41
    }
42
43
    public function __toString()
44
    {
45
        return $this->getBody();
46
    }
47
}
48