ObjectToDecorate   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 6
eloc 13
dl 0
loc 51
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getPrivateProperty() 0 3 1
A getProtectedProperty() 0 3 1
A getPublicProperty() 0 3 1
A callInParent() 0 3 1
A protectedContent() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace Exsio\PhpObjectDecorator\Tests\Fixtures;
4
5
abstract class ObjectToDecorate
6
{
7
    public string $publicProperty;
8
9
    protected string $protectedProperty;
10
11
    private string $privateProperty;
12
13
14
    public function __construct()
15
    {
16
        $this->publicProperty    = "propertyValue";
17
        $this->protectedProperty = "propertyValue";
18
        $this->privateProperty   = "propertyValue";
19
    }
20
21
    use ObjectToDecorateTrait;
22
23
24
    public function callInParent(): string
25
    {
26
        return "PARENT";
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function getPrivateProperty(): string
33
    {
34
        return $this->privateProperty;
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getPublicProperty(): string
41
    {
42
        return $this->publicProperty;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function getProtectedProperty(): string
49
    {
50
        return $this->protectedProperty;
51
    }
52
53
    protected function protectedContent(): string
54
    {
55
        return "PROTECTED_CONTENT";
56
    }
57
58
59
}