Code Duplication    Length = 6-6 lines in 2 locations

src/Config/AbstractConfig.php 1 location

@@ 124-129 (lines=6) @@
121
    {
122
        if (substr($method, 0, 3) == 'get') {
123
            $propertyName = lcfirst(substr($method, 3));
124
        } elseif (substr($method, 0, 3) == 'set') {
125
            $propertyName = lcfirst(substr($method, 3));
126
            $this->set($propertyName, $arguments[0]);
127
128
            return $this;
129
        } elseif (substr($method, 0, 2) == 'is') {
130
            $propertyName = lcfirst(substr($method, 2));
131
        } else {
132
            throw new \Exception('Call to undefined method ' . $method);

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'])) {