ClassWithByRefMagicMethods   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 0
dl 0
loc 30
rs 10
c 0
b 0
f 0

6 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 3 1
A __wakeup() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ProxyManagerTestAsset;
6
7
/**
8
 * Test class used to verify that proxy-manager respects magic getters with a byref return value
9
 *
10
 * @author Marco Pivetta <[email protected]>
11
 * @license MIT
12
 */
13
class ClassWithByRefMagicMethods
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
    }
38
39
    public function & __wakeup()
40
    {
41
    }
42
}
43