Delete always true condition
authorJakub Vrana <jakub@vrana.cz>
Sun, 2 Dec 2018 18:28:11 +0000 (19:28 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sun, 2 Dec 2018 18:28:11 +0000 (19:28 +0100)
The typehint doesn't allow null here.

Found by PHPStan.

Change-Id: I3e30bf49e778c42e8313a5b6de3d943ed7002c81

includes/upload/UploadFromChunks.php

index ee6f250..58541b2 100644 (file)
@@ -54,11 +54,7 @@ class UploadFromChunks extends UploadFromFile {
                if ( $stash ) {
                        $this->stash = $stash;
                } else {
-                       if ( $user ) {
-                               wfDebug( __METHOD__ . " creating new UploadFromChunks instance for " . $user->getId() . "\n" );
-                       } else {
-                               wfDebug( __METHOD__ . " creating new UploadFromChunks instance with no user\n" );
-                       }
+                       wfDebug( __METHOD__ . " creating new UploadFromChunks instance for " . $user->getId() . "\n" );
                        $this->stash = new UploadStash( $this->repo, $this->user );
                }
        }