Code Duplication    Length = 13-16 lines in 2 locations

lib/midgard/admin/asgard/schemadb.php 2 locations

@@ 359-371 (lines=13) @@
356
        switch ($adjusted_key)
357
        {
358
            case 'content':
359
            case 'description':
360
                $height = 30;
361
362
                // Check the user preference and configuration
363
                if (   midgard_admin_asgard_plugin::get_preference('tinymce_enabled')
364
                    || (   midgard_admin_asgard_plugin::get_preference('tinymce_enabled') !== '0'
365
                        && $this->_config->get('tinymce_enabled')))
366
                {
367
                    $widget = 'tinymce';
368
                }
369
                $output_mode = 'html';
370
371
                break;
372
            case 'value':
373
            case 'code':
374
                // These are typical "large" fields
@@ 373-388 (lines=16) @@
370
371
                break;
372
            case 'value':
373
            case 'code':
374
                // These are typical "large" fields
375
                $height = 30;
376
377
                // Check the user preference and configuration
378
                if (   midgard_admin_asgard_plugin::get_preference('codemirror_enabled')
379
                    || (   midgard_admin_asgard_plugin::get_preference('codemirror_enabled') !== '0'
380
                        && $this->_config->get('codemirror_enabled')))
381
                {
382
                    $widget = 'codemirror';
383
                }
384
385
                $dm_type = 'php';
386
                $output_mode = 'code';
387
388
                break;
389
390
            default:
391
                $height = 6;