Code Duplication    Length = 9-9 lines in 2 locations

includes/api/ApiQueryInfo.php 2 locations

@@ 650-658 (lines=9) @@
647
			$this->addWhereFld( 'pr_cascade', 1 );
648
649
			$res = $this->select( __METHOD__ );
650
			foreach ( $res as $row ) {
651
				$source = Title::makeTitle( $row->page_namespace, $row->page_title );
652
				$this->protections[$row->tl_namespace][$row->tl_title][] = [
653
					'type' => $row->pr_type,
654
					'level' => $row->pr_level,
655
					'expiry' => $wgContLang->formatExpiry( $row->pr_expiry, TS_ISO_8601 ),
656
					'source' => $source->getPrefixedText()
657
				];
658
			}
659
		}
660
661
		if ( count( $images ) ) {
@@ 673-681 (lines=9) @@
670
			$this->addWhereFld( 'il_to', $images );
671
672
			$res = $this->select( __METHOD__ );
673
			foreach ( $res as $row ) {
674
				$source = Title::makeTitle( $row->page_namespace, $row->page_title );
675
				$this->protections[NS_FILE][$row->il_to][] = [
676
					'type' => $row->pr_type,
677
					'level' => $row->pr_level,
678
					'expiry' => $wgContLang->formatExpiry( $row->pr_expiry, TS_ISO_8601 ),
679
					'source' => $source->getPrefixedText()
680
				];
681
			}
682
		}
683
	}
684