Code Duplication    Length = 6-6 lines in 2 locations

src/Config/Traits/ConfigCallTrait.php 1 location

@@ 40-45 (lines=6) @@
37
            return call_user_func_array([$this->getConfig(), $method], $arguments);
38
        } elseif (substr($method, 0, 3) == 'get') {
39
            $propertyName = lcfirst(substr($method, 3));
40
        } elseif (substr($method, 0, 3) == 'set') {
41
            $propertyName = lcfirst(substr($method, 3));
42
            $this->getConfig()->set($propertyName, $arguments[0]);
43
44
            return $this;
45
        } elseif (substr($method, 0, 2) == 'is') {
46
            $propertyName = lcfirst(substr($method, 2));
47
        }
48
        if (in_array($propertyName, ['name', 'description', 'deprecationReason', 'isDeprecated', 'field', 'type'])) {

src/Config/AbstractConfig.php 1 location

@@ 146-151 (lines=6) @@
143
    {
144
        if (substr($method, 0, 3) == 'get') {
145
            $propertyName = lcfirst(substr($method, 3));
146
        } elseif (substr($method, 0, 3) == 'set') {
147
            $propertyName = lcfirst(substr($method, 3));
148
            $this->set($propertyName, $arguments[0]);
149
150
            return $this;
151
        } elseif (substr($method, 0, 2) == 'is') {
152
            $propertyName = lcfirst(substr($method, 2));
153
        } else {
154
            throw new \Exception('Call to undefined method ' . $method);