Code Duplication    Length = 12-12 lines in 3 locations

eZ/Publish/Core/Repository/Values/GeneratorProxyTrait.php 2 locations

@@ 71-82 (lines=12) @@
68
        return ($this->object)(...$args);
69
    }
70
71
    public function __get($name)
72
    {
73
        if ($name === 'id') {
74
            return $this->id;
75
        }
76
77
        if ($this->object === null) {
78
            $this->loadObject();
79
        }
80
81
        return $this->object->$name;
82
    }
83
84
    public function __isset($name)
85
    {
@@ 84-95 (lines=12) @@
81
        return $this->object->$name;
82
    }
83
84
    public function __isset($name)
85
    {
86
        if ($name === 'id') {
87
            return true;
88
        }
89
90
        if ($this->object === null) {
91
            $this->loadObject();
92
        }
93
94
        return isset($this->object->$name);
95
    }
96
97
    public function __unset($name)
98
    {

eZ/Publish/Core/Repository/Values/Content/ContentProxy.php 1 location

@@ 48-59 (lines=12) @@
45
        return $this->object->$name;
46
    }
47
48
    public function __isset($name)
49
    {
50
        if ($name === 'id' || $name === 'contentInfo') {
51
            return true;
52
        }
53
54
        if ($this->object === null) {
55
            $this->loadObject();
56
        }
57
58
        return isset($this->object->$name);
59
    }
60
61
    /**
62
     * Return content info, in proxy form if we have not loaded object yet.