The typehint doesn't allow null here.
Found by PHPStan.
Change-Id: I3e30bf49e778c42e8313a5b6de3d943ed7002c81
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 );
}
}