Code Duplication    Length = 9-9 lines in 2 locations

src/Xtools/Page.php 2 locations

@@ 390-398 (lines=9) @@
387
388
        $lang = $this->getLang();
389
390
        if (!in_array('label', $terms)) {
391
            $errors[] = [
392
                'prio' => 2,
393
                'name' => 'Wikidata',
394
                'notice' => "Label for language <em>$lang</em> is missing", // FIXME: i18n
395
                'explanation' => "See: <a target='_blank' " .
396
                    "href='//www.wikidata.org/wiki/Help:Label'>Help:Label</a>",
397
            ];
398
        }
399
400
        if (!in_array('description', $terms)) {
401
            $errors[] = [
@@ 400-408 (lines=9) @@
397
            ];
398
        }
399
400
        if (!in_array('description', $terms)) {
401
            $errors[] = [
402
                'prio' => 3,
403
                'name' => 'Wikidata',
404
                'notice' => "Description for language <em>$lang</em> is missing", // FIXME: i18n
405
                'explanation' => "See: <a target='_blank' " .
406
                    "href='//www.wikidata.org/wiki/Help:Description'>Help:Description</a>",
407
            ];
408
        }
409
410
        return $errors;
411
    }