Code Duplication    Length = 9-9 lines in 2 locations

src/Xtools/Page.php 2 locations

@@ 374-382 (lines=9) @@
371
372
        $lang = $this->getLang();
373
374
        if (!in_array('label', $terms)) {
375
            $errors[] = [
376
                'prio' => 2,
377
                'name' => 'Wikidata',
378
                'notice' => "Label for language <em>$lang</em> is missing", // FIXME: i18n
379
                'explanation' => "See: <a target='_blank' " .
380
                    "href='//www.wikidata.org/wiki/Help:Label'>Help:Label</a>",
381
            ];
382
        }
383
384
        if (!in_array('description', $terms)) {
385
            $errors[] = [
@@ 384-392 (lines=9) @@
381
            ];
382
        }
383
384
        if (!in_array('description', $terms)) {
385
            $errors[] = [
386
                'prio' => 3,
387
                'name' => 'Wikidata',
388
                'notice' => "Description for language <em>$lang</em> is missing", // FIXME: i18n
389
                'explanation' => "See: <a target='_blank' " .
390
                    "href='//www.wikidata.org/wiki/Help:Description'>Help:Description</a>",
391
            ];
392
        }
393
394
        return $errors;
395
    }