Code Duplication    Length = 15-17 lines in 2 locations

application/modules/xbanners/models/Base/BannerImage.php 1 location

@@ 1227-1241 (lines=15) @@
1224
        }
1225
1226
        if ($includeForeignObjects) {
1227
            if (null !== $this->aBanners) {
1228
1229
                switch ($keyType) {
1230
                    case TableMap::TYPE_CAMELNAME:
1231
                        $key = 'banners';
1232
                        break;
1233
                    case TableMap::TYPE_FIELDNAME:
1234
                        $key = 'banners';
1235
                        break;
1236
                    default:
1237
                        $key = 'Banners';
1238
                }
1239
1240
                $result[$key] = $this->aBanners->toArray($keyType, $includeLazyLoadColumns,  $alreadyDumpedObjects, true);
1241
            }
1242
            if (null !== $this->collBannerImageI18ns) {
1243
1244
                switch ($keyType) {

application/modules/xbanners/models/Base/BannersI18n.php 1 location

@@ 833-849 (lines=17) @@
830
            $result[$key] = $virtualColumn;
831
        }
832
833
        if ($includeForeignObjects) {
834
            if (null !== $this->aBanners) {
835
836
                switch ($keyType) {
837
                    case TableMap::TYPE_CAMELNAME:
838
                        $key = 'banners';
839
                        break;
840
                    case TableMap::TYPE_FIELDNAME:
841
                        $key = 'banners';
842
                        break;
843
                    default:
844
                        $key = 'Banners';
845
                }
846
847
                $result[$key] = $this->aBanners->toArray($keyType, $includeLazyLoadColumns,  $alreadyDumpedObjects, true);
848
            }
849
        }
850
851
        return $result;
852
    }