diff options
author | Reedy <reedy@wikimedia.org> | 2020-05-09 21:37:23 +0100 |
---|---|---|
committer | Reedy <reedy@wikimedia.org> | 2020-05-09 22:16:27 +0100 |
commit | c7206dae3ff7460f9b12e057aefbed44f1bed0c5 (patch) | |
tree | 68e39b9596e6910bc4db6b45fff080144df68814 /includes/export | |
parent | 60bace4d37c37d072b30617a3bb8191bb35ec3ed (diff) | |
download | mediawikicore-c7206dae3ff7460f9b12e057aefbed44f1bed0c5.tar.gz mediawikicore-c7206dae3ff7460f9b12e057aefbed44f1bed0c5.zip |
export: Remove excessive indenting and unnecessary else
Change-Id: I393e86774d832d8f89b6d29c82d3e7bc45d21a09
Diffstat (limited to 'includes/export')
-rw-r--r-- | includes/export/DumpFileOutput.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/includes/export/DumpFileOutput.php b/includes/export/DumpFileOutput.php index e92b68c2c5e5..ab54fcf6a7fd 100644 --- a/includes/export/DumpFileOutput.php +++ b/includes/export/DumpFileOutput.php @@ -70,9 +70,9 @@ class DumpFileOutput extends DumpOutput { * @throws MWException */ protected function renameOrException( $newname ) { - if ( !rename( $this->filename, $newname ) ) { - throw new MWException( __METHOD__ . ": rename of file {$this->filename} to $newname failed\n" ); - } + if ( !rename( $this->filename, $newname ) ) { + throw new MWException( __METHOD__ . ": rename of file {$this->filename} to $newname failed\n" ); + } } /** @@ -84,9 +84,8 @@ class DumpFileOutput extends DumpOutput { if ( is_array( $newname ) ) { if ( count( $newname ) > 1 ) { throw new MWException( __METHOD__ . ": passed multiple arguments for rename of single file\n" ); - } else { - $newname = $newname[0]; } + $newname = $newname[0]; } return $newname; } |