ObjectToDecorate::getProtectedProperty()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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
}