ClassWithByRefMagicMethods::__isset()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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