Code Duplication    Length = 9-9 lines in 2 locations

src/Xtools/Page.php 2 locations

@@ 350-358 (lines=9) @@
347
348
        $lang = $this->getLang();
349
350
        if (!in_array('label', $terms)) {
351
            $errors[] = [
352
                'prio' => 2,
353
                'name' => 'Wikidata',
354
                'notice' => "Label for language <em>$lang</em> is missing", // FIXME: i18n
355
                'explanation' => "See: <a target='_blank' " .
356
                    "href='//www.wikidata.org/wiki/Help:Label'>Help:Label</a>",
357
            ];
358
        }
359
360
        if (!in_array('description', $terms)) {
361
            $errors[] = [
@@ 360-368 (lines=9) @@
357
            ];
358
        }
359
360
        if (!in_array('description', $terms)) {
361
            $errors[] = [
362
                'prio' => 3,
363
                'name' => 'Wikidata',
364
                'notice' => "Description for language <em>$lang</em> is missing", // FIXME: i18n
365
                'explanation' => "See: <a target='_blank' " .
366
                    "href='//www.wikidata.org/wiki/Help:Description'>Help:Description</a>",
367
            ];
368
        }
369
370
        return $errors;
371
    }