Code Duplication    Length = 9-9 lines in 2 locations

src/Xtools/Page.php 2 locations

@@ 335-343 (lines=9) @@
332
333
        $lang = $this->getLang();
334
335
        if (!in_array('label', $terms)) {
336
            $errors[] = [
337
                'prio' => 2,
338
                'name' => 'Wikidata',
339
                'notice' => "Label for language <em>$lang</em> is missing", // FIXME: i18n
340
                'explanation' => "See: <a target='_blank' " .
341
                    "href='//www.wikidata.org/wiki/Help:Label'>Help:Label</a>",
342
            ];
343
        }
344
345
        if (!in_array('description', $terms)) {
346
            $errors[] = [
@@ 345-353 (lines=9) @@
342
            ];
343
        }
344
345
        if (!in_array('description', $terms)) {
346
            $errors[] = [
347
                'prio' => 3,
348
                'name' => 'Wikidata',
349
                'notice' => "Description for language <em>$lang</em> is missing", // FIXME: i18n
350
                'explanation' => "See: <a target='_blank' " .
351
                    "href='//www.wikidata.org/wiki/Help:Description'>Help:Description</a>",
352
            ];
353
        }
354
355
        return $errors;
356
    }