Completed
Push — 1.x ( a98302...e42f79 )
by Alexander
07:32
created

PropertyDemo   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 16
rs 10
1
<?php
2
/*
3
 * Go! AOP framework
4
 *
5
 * @copyright Copyright 2014, Lisachenko Alexander <[email protected]>
6
 *
7
 * This source file is subject to the license that is bundled
8
 * with this source code in the file LICENSE.
9
 */
10
11
namespace Demo\Example;
12
13
/**
14
 * Example class to show how to intercept an access to the properties
15
 */
16
class PropertyDemo
17
{
18
    public $publicProperty = 123;
19
20
    protected $protectedProperty = 456;
21
22
    public function showProtected()
23
    {
24
        echo $this->protectedProperty, PHP_EOL;
25
    }
26
27
    public function setProtected($newValue)
28
    {
29
        $this->protectedProperty = $newValue;
30
    }
31
}
32