Code Duplication    Length = 9-9 lines in 2 locations

includes/api/ApiQueryInfo.php 2 locations

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