Remove unneeded else{} and return
authorSiebrand Mazeland <s.mazeland@xs4all.nl>
Mon, 1 Apr 2013 17:18:15 +0000 (19:18 +0200)
committerSiebrand Mazeland <s.mazeland@xs4all.nl>
Mon, 1 Apr 2013 18:43:05 +0000 (20:43 +0200)
Else action was default. Returned the result of a void function.

Change-Id: I9ddf051ded0228dd3dfdfe9312f467d9c57f1716

includes/api/ApiUpload.php

index 2dcf392..719032f 100644 (file)
@@ -444,9 +444,9 @@ class ApiUpload extends ApiBase {
                $verification = $this->mUpload->verifyUpload();
                if ( $verification['status'] === UploadBase::OK ) {
                        return;
-               } else {
-                       return $this->checkVerification( $verification );
                }
+
+               $this->checkVerification( $verification );
        }
 
        /**
@@ -455,7 +455,7 @@ class ApiUpload extends ApiBase {
        protected function checkVerification( array $verification ) {
                global $wgFileExtensions;
 
-               // TODO: Move them to ApiBase's message map
+               // @todo Move them to ApiBase's message map
                switch( $verification['status'] ) {
                        // Recoverable errors
                        case UploadBase::MIN_LENGTH_PARTNAME: