Code Duplication    Length = 5-5 lines in 2 locations

includes/Title.php 2 locations

@@ 1941-1945 (lines=5) @@
1938
				$errors[] = $user->isAnon() ? [ 'nocreatetext' ] : [ 'nocreate-loggedin' ];
1939
			}
1940
		} elseif ( $action == 'move' ) {
1941
			if ( !$user->isAllowed( 'move-rootuserpages' )
1942
					&& $this->mNamespace == NS_USER && !$this->isSubpage() ) {
1943
				// Show user page-specific message only if the user can move other pages
1944
				$errors[] = [ 'cant-move-user-page' ];
1945
			}
1946
1947
			// Check if user is allowed to move files if it's a file
1948
			if ( $this->mNamespace == NS_FILE && !$user->isAllowed( 'movefile' ) ) {
@@ 1972-1976 (lines=5) @@
1969
			if ( !$user->isAllowed( 'move' ) ) {
1970
				// User can't move anything
1971
				$errors[] = [ 'movenotallowed' ];
1972
			} elseif ( !$user->isAllowed( 'move-rootuserpages' )
1973
					&& $this->mNamespace == NS_USER && !$this->isSubpage() ) {
1974
				// Show user page-specific message only if the user can move other pages
1975
				$errors[] = [ 'cant-move-to-user-page' ];
1976
			} elseif ( !$user->isAllowed( 'move-categorypages' )
1977
					&& $this->mNamespace == NS_CATEGORY ) {
1978
				// Show category page-specific message only if the user can move other pages
1979
				$errors[] = [ 'cant-move-to-category-page' ];