Code Duplication    Length = 9-9 lines in 2 locations

src/AppBundle/Controller/ArticleInfoController.php 2 locations

@@ 488-496 (lines=9) @@
485
486
        $errors = [];
487
488
        if (!in_array('label', $terms)) {
489
            $errors[] = [
490
                'prio' => 2,
491
                'name' => 'Wikidata',
492
                'notice' => "Label for language <em>$lang</em> is missing", // FIXME: i18n
493
                'explanation' => "See: <a target='_blank' " .
494
                    "href='//www.wikidata.org/wiki/Help:Label'>Help:Label</a>",
495
            ];
496
        }
497
        if (!in_array('description', $terms)) {
498
            $errors[] = [
499
                'prio' => 3,
@@ 497-505 (lines=9) @@
494
                    "href='//www.wikidata.org/wiki/Help:Label'>Help:Label</a>",
495
            ];
496
        }
497
        if (!in_array('description', $terms)) {
498
            $errors[] = [
499
                'prio' => 3,
500
                'name' => 'Wikidata',
501
                'notice' => "Description for language <em>$lang</em> is missing", // FIXME: i18n
502
                'explanation' => "See: <a target='_blank' " .
503
                    "href='//www.wikidata.org/wiki/Help:Description'>Help:Description</a>",
504
            ];
505
        }
506
507
        return $errors;
508
    }