Code Duplication    Length = 3-3 lines in 2 locations

src/Mixin/Properties.php 2 locations

@@ 95-97 (lines=3) @@
92
        $setter = 'set' . $name;
93
        if ($this->hasMethod($setter)) {
94
            $this->$setter($value);
95
        } elseif ($this->hasMethod('get' . $name)) {
96
            throw new InvalidAccessException('Setting read-only property: ' . static::class . '::' . $name);
97
        } else {
98
            throw new UndefinedPropertyException('Setting unknown property: ' . static::class . '::' . $name);
99
        }
100
    }
@@ 172-174 (lines=3) @@
169
        $setter = 'set' . $name;
170
        if ($this->hasMethod($setter)) {
171
            $this->$setter(null);
172
        } elseif ($this->hasMethod('get' . $name)) {
173
            throw new InvalidAccessException('Unsetting read-only property: ' . static::class . '::' . $name);
174
        }
175
    }
176
177
    /**