ClassWithByRefMagicMethods::__set()   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 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GeneratedHydratorTestAsset;
6
7
/**
8
 * Test class used to verify that the generated hydrator respects magic getters with a by-ref return value
9
 */
10
class ClassWithByRefMagicMethods
11
{
12
    /**
13
     * {@inheritDoc}
14
     */
15
    public function & __set($name, $value)
16
    {
17
        return [$name => $value];
18
    }
19
20
    /**
21
     * {@inheritDoc}
22
     */
23
    public function & __get($name)
24
    {
25
        return $name;
26
    }
27
28
    /**
29
     * {@inheritDoc}
30
     */
31
    public function & __isset($name)
32
    {
33
        return (bool) $name;
34
    }
35
36
    /**
37
     * {@inheritDoc}
38
     */
39
    public function & __unset($name)
40
    {
41
        return (bool) $name;
42
    }
43
44
    /**
45
     * {@inheritDoc}
46
     */
47
    public function & __sleep()
48
    {
49
    }
50
51
    /**
52
     * {@inheritDoc}
53
     */
54
    public function & __wakeup()
55
    {
56
    }
57
}
58