ChildObjectToDecorate   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 12
dl 0
loc 48
rs 10
c 0
b 0
f 0

5 Methods

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