Add @noinspection PhpMissingBreakStatementInspection
authorMatthias Schmidt <gravatronics@live.com>
Fri, 20 May 2016 15:46:17 +0000 (17:46 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Fri, 20 May 2016 15:46:17 +0000 (17:46 +0200)
wcfsetup/install/files/lib/system/importer/UserImporter.class.php
wcfsetup/install/files/lib/system/io/Zip.class.php
wcfsetup/install/files/lib/system/option/FileSizeOptionType.class.php
wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php

index aee9bf306f5949b0faaad22b6dec8521a51523b6..36cc858c9cba8d04418e809d6bc553d2b0c6d04f 100644 (file)
@@ -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;
index 6287e73e02ed4753ec74b11281c95e6c425b005d..07cbb3f1555bc0b85245999b7572db77f736ab1a 100644 (file)
@@ -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');
                }
index 0fee86ee7af9255231b88e898461af95754f138e..b847b321f7823043b0177e27368df14ab59bf74f 100644 (file)
@@ -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':
index 848d8f8cee381030cdf297b4d84b058c70fa333d..c23ef6d2341783d7b1a4e541ae2ccd969ed9aadf 100644 (file)
@@ -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}'");