Completed
Push — master ( 51a3bb...54158b )
by Nicolas
23:04 queued 10:36
created

PostContentIsRendering   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 84.62%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 43
rs 10
c 1
b 0
f 0
ccs 11
cts 13
cp 0.8462

5 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getContent() 0 4 1
A setContent() 0 4 1
A getOriginal() 0 4 1
A __toString() 0 4 1
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