Code Duplication    Length = 17-17 lines in 2 locations

Alpha/Model/ActiveRecordProviderMySQL.php 1 location

@@ 428-444 (lines=17) @@
425
        $properties = $reflection->getProperties();
426
427
        try {
428
            foreach ($properties as $propObj) {
429
                $propName = $propObj->name;
430
431
                if (isset($row[$propName])) {
432
                    // filter transient attributes
433
                    if (!in_array($propName, $this->BO->getTransientAttributes())) {
434
                        $this->BO->set($propName, $row[$propName]);
435
                    } elseif (!$propObj->isPrivate() && $this->BO->get($propName) != '' && $this->BO->getPropObject($propName) instanceof Relation) {
436
                        $prop = $this->BO->getPropObject($propName);
437
438
                        // handle the setting of ONE-TO-MANY relation values
439
                        if ($prop->getRelationType() == 'ONE-TO-MANY') {
440
                            $this->BO->set($propObj->name, $this->BO->getOID());
441
                        }
442
                    }
443
                }
444
            }
445
        } catch (IllegalArguementException $e) {
446
            self::$logger->warn('Bad data stored in the table ['.$this->BO->getTableName().'], field ['.$propObj->name.'] bad value['.$row[$propObj->name].'], exception ['.$e->getMessage().']');
447
        } catch (PHPException $e) {

Alpha/Model/ActiveRecordProviderSQLite.php 1 location

@@ 413-429 (lines=17) @@
410
        $properties = $reflection->getProperties();
411
412
        try {
413
            foreach ($properties as $propObj) {
414
                $propName = $propObj->name;
415
416
                if (isset($row[$propName])) {
417
                    // filter transient attributes
418
                    if (!in_array($propName, $this->BO->getTransientAttributes())) {
419
                        $this->BO->set($propName, $row[$propName]);
420
                    } elseif (!$propObj->isPrivate() && $this->BO->get($propName) != '' && $this->BO->getPropObject($propName) instanceof Relation) {
421
                        $prop = $this->BO->getPropObject($propName);
422
423
                        // handle the setting of ONE-TO-MANY relation values
424
                        if ($prop->getRelationType() == 'ONE-TO-MANY') {
425
                            $this->BO->set($propObj->name, $this->BO->getOID());
426
                        }
427
                    }
428
                }
429
            }
430
        } catch (IllegalArguementException $e) {
431
            self::$logger->warn('Bad data stored in the table ['.$this->BO->getTableName().'], field ['.$propObj->name.'] bad value['.$row[$propObj->name].'], exception ['.$e->getMessage().']');
432
        } catch (PHPException $e) {