Ignore Zend libraries in CodeSniff, fix codestyle issues
authorTim Düsterhus <duesterhus@woltlab.com>
Sat, 22 Dec 2012 12:14:38 +0000 (13:14 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Sat, 22 Dec 2012 12:14:38 +0000 (13:14 +0100)
CodeSniff/WCF/ruleset.xml
wcfsetup/install.php
wcfsetup/install/files/cli.php
wcfsetup/install/files/lib/system/cli/command/CronjobCommand.class.php
wcfsetup/install/files/lib/system/cli/command/ExitCommand.class.php
wcfsetup/install/files/lib/system/cli/command/PackageCommand.class.php
wcfsetup/install/files/lib/system/cli/command/WorkerCommand.class.php
wcfsetup/test.php

index c1297a30115fc34d3fcaa3dc7db32eca44d00cdb..d24479cd3268fea11b5d330145b516f1d6ef7bba 100644 (file)
@@ -1,8 +1,7 @@
 <?xml version="1.0"?>
 <ruleset name="WCF">
        <description>WoltLab Community Framework Coding Standard</description>
-       <exclude-pattern>*/wcfsetup/test.php</exclude-pattern>
-       <exclude-pattern>*/wcfsetup/install.php</exclude-pattern>
+       <exclude-pattern>*/zend/*</exclude-pattern>
        <exclude-pattern>*/CodeSniff/*</exclude-pattern>
        
        <rule ref="Generic.Classes.DuplicateClassName" />
index 8fe2f60eec43c1b39eb795f85e8d297f838485b3..22e4fc144aabc009e76031fdcf2f5ba222e4489b 100644 (file)
@@ -6,6 +6,7 @@
  * @copyright  2001-2011 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  */
+// @codingStandardsIgnoreFile
 // define constants
 define('INSTALL_SCRIPT_DIR', dirname(__FILE__).'/');
 define('SETUP_FILE', INSTALL_SCRIPT_DIR . 'WCFSetup.tar.gz');
index 6ad584759ed9de656de455491a8e9255fbed9f9c..065ea1ade05befefa78b07997af5d23037f288dc 100644 (file)
@@ -1,5 +1,6 @@
 #!/usr/bin/env php
 <?php
+// @codingStandardsIgnoreFile
 /**
  * @author     Tim Düsterhus
  * @copyright  2001-2011 WoltLab GmbH
index fb904fdaac03203efd348f23f9444bdb3f589fd7..058a2d939732b10ebcbda51b84e104688f46c10c 100644 (file)
@@ -71,7 +71,8 @@ class CronjobCommand implements ICommand {
                                        Log::info("Executing cronjob #", $cronjob->cronjobID, ': ', StringUtil::truncate(CLIWCF::getLanguage()->get($cronjob->description), 40));
                                }
                        }
-                       else if ($cronjob->nextExec < time()) { // use time() instead of TIME_NOW, as the latter may be outdated
+                       // use time() instead of TIME_NOW, as the latter may be outdated
+                       else if ($cronjob->nextExec < time()) {
                                $cronjobs[] = $cronjob;
                                if (VERBOSITY >= 0) {
                                        Log::info("Executing cronjob #", $cronjob->cronjobID, ': ', StringUtil::truncate(CLIWCF::getLanguage()->get($cronjob->description), 40));
@@ -132,4 +133,4 @@ class CronjobCommand implements ICommand {
                // TODO: Check access
                return true;
        }
-}
\ No newline at end of file
+}
index 8df82088da80ca0e94afa9cd8392dbc84ade1637..e76c509487e4ab049a1419469822616c2b1d71ae 100644 (file)
@@ -26,4 +26,4 @@ class ExitCommand implements ICommand {
        public function canAccess() {
                return true;
        }
-}
\ No newline at end of file
+}
index b61cfd10a2d882a787afa11f291ca9a952770318..58bfc8254fd91c188af4838c30f8bc87210e69c8 100644 (file)
@@ -85,7 +85,7 @@ class PackageCommand implements ICommand {
                        if (!$archive->isValidInstall()) {
                                throw new UserInputException('', 'noValidInstall');
                        }
-                       elseif ($archive->isAlreadyInstalled()) {
+                       else if ($archive->isAlreadyInstalled()) {
                                throw new UserInputException('', 'uniqueAlreadyInstalled');
                        }
                }
@@ -117,4 +117,4 @@ class PackageCommand implements ICommand {
        public function canAccess() {
                return CLIWCF::getSession()->getPermission('admin.system.package.canInstallPackage') || CLIWCF::getSession()->getPermission('admin.system.package.canUpdatePackage');
        }
-}
\ No newline at end of file
+}
index db16283e7a7c6cfc7ef397beb98f998bac54fabc..21ead9300e483d42cc7a305cc95adf7f26108a2e 100644 (file)
@@ -169,4 +169,4 @@ class WorkerCommand implements ICommand {
                // TODO: Check access
                return true;
        }
-}
\ No newline at end of file
+}
index d120b074ee8ff88408af9cf8453d8eb7d14b5b3f..3ae5a36f56c9f491c6726965a7af31514f8ab3f0 100644 (file)
@@ -13,6 +13,7 @@
  * @copyright  2001-2012 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  */
+// @codingStandardsIgnoreFile
 // check php version
 // php version
 $phpVersion = phpversion();