Completed
Push — 2.0 ( b61aac...db38c3 )
by Nicolas
12:38
created

PostContentIsRendering::__toString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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