Code Duplication    Length = 9-9 lines in 2 locations

src/Xtools/Page.php 2 locations

@@ 427-435 (lines=9) @@
424
425
        $lang = $this->getLang();
426
427
        if (!in_array('label', $terms)) {
428
            $errors[] = [
429
                'prio' => 2,
430
                'name' => 'Wikidata',
431
                'notice' => "Label for language <em>$lang</em> is missing", // FIXME: i18n
432
                'explanation' => "See: <a target='_blank' " .
433
                    "href='//www.wikidata.org/wiki/Help:Label'>Help:Label</a>",
434
            ];
435
        }
436
437
        if (!in_array('description', $terms)) {
438
            $errors[] = [
@@ 437-445 (lines=9) @@
434
            ];
435
        }
436
437
        if (!in_array('description', $terms)) {
438
            $errors[] = [
439
                'prio' => 3,
440
                'name' => 'Wikidata',
441
                'notice' => "Description for language <em>$lang</em> is missing", // FIXME: i18n
442
                'explanation' => "See: <a target='_blank' " .
443
                    "href='//www.wikidata.org/wiki/Help:Description'>Help:Description</a>",
444
            ];
445
        }
446
447
        return $errors;
448
    }