Code Duplication    Length = 9-9 lines in 2 locations

src/Xtools/Page.php 2 locations

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