From 3940dc78be67514b5fb822edc7d9d7731dafabb8 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 20 May 2016 17:46:17 +0200 Subject: [PATCH] Add @noinspection PhpMissingBreakStatementInspection --- .../files/lib/system/importer/UserImporter.class.php | 1 + wcfsetup/install/files/lib/system/io/Zip.class.php | 4 ++++ .../files/lib/system/option/FileSizeOptionType.class.php | 6 ++++++ .../package/plugin/BoxPackageInstallationPlugin.class.php | 1 + 4 files changed, 12 insertions(+) diff --git a/wcfsetup/install/files/lib/system/importer/UserImporter.class.php b/wcfsetup/install/files/lib/system/importer/UserImporter.class.php index aee9bf306f..36cc858c9c 100644 --- a/wcfsetup/install/files/lib/system/importer/UserImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/UserImporter.class.php @@ -66,6 +66,7 @@ class UserImporter extends AbstractImporter { // fetch user with same username $conflictingUser = User::getUserByUsername($data['username']); switch (ImportHandler::getInstance()->getUserMergeMode()) { + /** @noinspection PhpMissingBreakStatementInspection */ case self::MERGE_MODE_USERNAME_OR_EMAIL: // merge target will be the conflicting user $targetUser = $conflictingUser; diff --git a/wcfsetup/install/files/lib/system/io/Zip.class.php b/wcfsetup/install/files/lib/system/io/Zip.class.php index 6287e73e02..07cbb3f155 100644 --- a/wcfsetup/install/files/lib/system/io/Zip.class.php +++ b/wcfsetup/install/files/lib/system/io/Zip.class.php @@ -292,11 +292,15 @@ class Zip extends File implements IArchive { case 8: $content = gzinflate($content); break; + case 12: if (function_exists('bzdecompress')) $content = bzdecompress($content); else throw new SystemException('The bzip2 extension is not available'); + break; + case 0: break; + default: throw new SystemException('Compression '.$header['compression'].' is not supported'); } diff --git a/wcfsetup/install/files/lib/system/option/FileSizeOptionType.class.php b/wcfsetup/install/files/lib/system/option/FileSizeOptionType.class.php index 0fee86ee7a..b847b321f7 100644 --- a/wcfsetup/install/files/lib/system/option/FileSizeOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/FileSizeOptionType.class.php @@ -32,19 +32,25 @@ class FileSizeOptionType extends TextOptionType { $number = $matches[0]; if (preg_match('/[kmgt]i?b$/i', $newValue, $multiplier)) { switch (mb_strtolower($multiplier[0])) { + /** @noinspection PhpMissingBreakStatementInspection */ case 'tb': $number *= 1000; + /** @noinspection PhpMissingBreakStatementInspection */ case 'gb': $number *= 1000; + /** @noinspection PhpMissingBreakStatementInspection */ case 'mb': $number *= 1000; case 'kb': $number *= 1000; break; + /** @noinspection PhpMissingBreakStatementInspection */ case 'tib': $number *= 1024; + /** @noinspection PhpMissingBreakStatementInspection */ case 'gib': $number *= 1024; + /** @noinspection PhpMissingBreakStatementInspection */ case 'mib': $number *= 1024; case 'kib': diff --git a/wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php index 848d8f8cee..c23ef6d234 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php @@ -132,6 +132,7 @@ class BoxPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin $ignoreMissingContent = false; switch ($boxType) { + /** @noinspection PhpMissingBreakStatementInspection */ case 'system': if (empty($data['elements']['objectType'])) { throw new SystemException("Missing required element 'objectType' for 'system'-type box '{$identifier}'"); -- 2.20.1