Code Duplication    Length = 8-8 lines in 2 locations

includes/rcfeed/MachineReadableRCFeedFormatter.php 1 location

@@ 103-110 (lines=8) @@
100
						// From ApiQueryLogEvents::addLogParams
101
						$logParams = [];
102
						// Keys like "4::paramname" can't be used for output so we change them to "paramname"
103
						foreach ( $params as $key => $value ) {
104
							if ( strpos( $key, ':' ) === false ) {
105
								$logParams[$key] = $value;
106
								continue;
107
							}
108
							$logParam = explode( ':', $key, 3 );
109
							$logParams[$logParam[2]] = $value;
110
						}
111
						$packet['log_params'] = $logParams;
112
					} else {
113
						$packet['log_params'] = explode( "\n", $rc->getAttribute( 'rc_params' ) );

includes/specials/SpecialBlock.php 1 location

@@ 851-858 (lines=8) @@
848
			return [];
849
		}
850
851
		foreach ( explode( ',', $msg ) as $option ) {
852
			if ( strpos( $option, ':' ) === false ) {
853
				$option = "$option:$option";
854
			}
855
856
			list( $show, $value ) = explode( ':', $option );
857
			$a[$show] = $value;
858
		}
859
860
		return $a;
861
	}