Code Duplication    Length = 8-8 lines in 2 locations

includes/page/WikiPage.php 2 locations

@@ 3108-3115 (lines=8) @@
3105
		$from = str_replace( '_', ' ', $fromP );
3106
		// User name given should match up with the top revision.
3107
		// If the user was deleted then $from should be empty.
3108
		if ( $from != $current->getUserText() ) {
3109
			$resultDetails = [ 'current' => $current ];
3110
			return [ [ 'alreadyrolled',
3111
				htmlspecialchars( $this->mTitle->getPrefixedText() ),
3112
				htmlspecialchars( $fromP ),
3113
				htmlspecialchars( $current->getUserText() )
3114
			] ];
3115
		}
3116
3117
		// Get the last edit not by this person...
3118
		// Note: these may not be public values
@@ 3221-3228 (lines=8) @@
3218
		$statusRev = isset( $status->value['revision'] )
3219
			? $status->value['revision']
3220
			: null;
3221
		if ( !( $statusRev instanceof Revision ) ) {
3222
			$resultDetails = [ 'current' => $current ];
3223
			return [ [ 'alreadyrolled',
3224
					htmlspecialchars( $this->mTitle->getPrefixedText() ),
3225
					htmlspecialchars( $fromP ),
3226
					htmlspecialchars( $current->getUserText() )
3227
			] ];
3228
		}
3229
3230
		$revId = $statusRev->getId();
3231