Code Duplication    Length = 10-10 lines in 2 locations

framework/core/BasicObject.php 1 location

@@ 199-208 (lines=10) @@
196
        $method = substr($methodName, 0, 3);
197
        $fieldName = $this->getFieldName(substr($methodName, 3));
198
199
        switch ($method) {
200
            case ("set"):
201
                $fieldValue = $methodParams[0];
202
203
                return $this->setFieldValue($fieldName, $fieldValue);
204
            case ("get"):
205
                return $this->getFieldValue($fieldName);
206
            default:
207
                throw new \Exception("No such method in the Object class.");
208
        }
209
    }
210
211
    /**

framework/db/DBSelector.php 1 location

@@ 407-416 (lines=10) @@
404
        $method = substr($methodName, 0, 3);
405
        $fieldName = $this->getFieldName(substr($methodName, 3));
406
407
        switch ($method) {
408
            case ("set"):
409
                $fieldValue = $methodParams[0];
410
411
                return $this->setFieldValue($fieldName, $fieldValue);
412
            case ("get"):
413
                return $this->getFieldValue($fieldName);
414
            default:
415
                throw new DBSelectorException("No method with name '" . $methodName . "'");
416
        }
417
    }
418
}
419