ClassWithMagicMethods   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 7
lcom 0
cbo 0
dl 0
loc 35
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __set() 0 4 1
A __get() 0 4 1
A __isset() 0 4 1
A __unset() 0 4 1
A __sleep() 0 4 1
A __wakeup() 0 3 1
A __clone() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ProxyManagerTestAsset;
6
7
/**
8
 * Base test class to play around with pre-existing magic methods
9
 *
10
 * @author Marco Pivetta <[email protected]>
11
 * @license MIT
12
 */
13
class ClassWithMagicMethods
14
{
15
    public function __set($name, $value)
16
    {
17
        return [$name => $value];
18
    }
19
20
    public function __get($name)
21
    {
22
        return $name;
23
    }
24
25
    public function __isset($name)
26
    {
27
        return (bool) $name;
28
    }
29
30
    public function __unset($name)
31
    {
32
        return (bool) $name;
33
    }
34
35
    public function __sleep()
36
    {
37
        return [];
38
    }
39
40
    public function __wakeup()
41
    {
42
    }
43
44
    public function __clone()
45
    {
46
    }
47
}
48