ClassWithMixedPropertiesAndAccessorMethods   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 0
dl 0
loc 58
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A has() 0 4 1
A get() 0 4 1
A set() 0 4 1
A remove() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ProxyManagerTestAsset;
6
7
/**
8
 * Class with one abstract public method
9
 *
10
 * @author Marco Pivetta <[email protected]>
11
 * @license MIT
12
 */
13
class ClassWithMixedPropertiesAndAccessorMethods
14
{
15
    /**
16
     * @var mixed
17
     */
18
    public $publicProperty = 'publicProperty';
19
20
    /**
21
     * @var mixed
22
     */
23
    protected $protectedProperty = 'protectedProperty';
24
25
    /**
26
     * @var mixed
27
     */
28
    private $privateProperty = 'privateProperty';
29
30
    /**
31
     * @param string $name
32
     *
33
     * @return bool
34
     */
35
    public function has($name)
36
    {
37
        return isset($this->$name);
38
    }
39
40
    /**
41
     * @param string $name
42
     *
43
     * @return mixed
44
     */
45
    public function get($name)
46
    {
47
        return $this->$name;
48
    }
49
50
    /**
51
     * @param string $name
52
     * @param mixed  $value
53
     *
54
     * @return void
55
     */
56
    public function set($name, $value)
57
    {
58
        $this->$name = $value;
59
    }
60
61
    /**
62
     * @param string $name
63
     *
64
     * @return void
65
     */
66
    public function remove($name)
67
    {
68
        unset($this->$name);
69
    }
70
}
71