Code Duplication    Length = 5-5 lines in 2 locations

includes/Title.php 2 locations

@@ 1923-1927 (lines=5) @@
1920
				$errors[] = $user->isAnon() ? [ 'nocreatetext' ] : [ 'nocreate-loggedin' ];
1921
			}
1922
		} elseif ( $action == 'move' ) {
1923
			if ( !$user->isAllowed( 'move-rootuserpages' )
1924
					&& $this->mNamespace == NS_USER && !$this->isSubpage() ) {
1925
				// Show user page-specific message only if the user can move other pages
1926
				$errors[] = [ 'cant-move-user-page' ];
1927
			}
1928
1929
			// Check if user is allowed to move files if it's a file
1930
			if ( $this->mNamespace == NS_FILE && !$user->isAllowed( 'movefile' ) ) {
@@ 1954-1958 (lines=5) @@
1951
			if ( !$user->isAllowed( 'move' ) ) {
1952
				// User can't move anything
1953
				$errors[] = [ 'movenotallowed' ];
1954
			} elseif ( !$user->isAllowed( 'move-rootuserpages' )
1955
					&& $this->mNamespace == NS_USER && !$this->isSubpage() ) {
1956
				// Show user page-specific message only if the user can move other pages
1957
				$errors[] = [ 'cant-move-to-user-page' ];
1958
			} elseif ( !$user->isAllowed( 'move-categorypages' )
1959
					&& $this->mNamespace == NS_CATEGORY ) {
1960
				// Show category page-specific message only if the user can move other pages
1961
				$errors[] = [ 'cant-move-to-category-page' ];