From: Tim Düsterhus Date: Sat, 22 Dec 2012 12:14:38 +0000 (+0100) Subject: Ignore Zend libraries in CodeSniff, fix codestyle issues X-Git-Tag: 2.0.0_Beta_10~15^2~70 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=392cd6cbd631e51c82770848a07a02f63185d2f7;p=GitHub%2FWoltLab%2FWCF.git Ignore Zend libraries in CodeSniff, fix codestyle issues --- diff --git a/CodeSniff/WCF/ruleset.xml b/CodeSniff/WCF/ruleset.xml index c1297a3011..d24479cd32 100644 --- a/CodeSniff/WCF/ruleset.xml +++ b/CodeSniff/WCF/ruleset.xml @@ -1,8 +1,7 @@ WoltLab Community Framework Coding Standard - */wcfsetup/test.php - */wcfsetup/install.php + */zend/* */CodeSniff/* diff --git a/wcfsetup/install.php b/wcfsetup/install.php index 8fe2f60eec..22e4fc144a 100644 --- a/wcfsetup/install.php +++ b/wcfsetup/install.php @@ -6,6 +6,7 @@ * @copyright 2001-2011 WoltLab GmbH * @license GNU Lesser General Public License */ +// @codingStandardsIgnoreFile // define constants define('INSTALL_SCRIPT_DIR', dirname(__FILE__).'/'); define('SETUP_FILE', INSTALL_SCRIPT_DIR . 'WCFSetup.tar.gz'); diff --git a/wcfsetup/install/files/cli.php b/wcfsetup/install/files/cli.php index 6ad584759e..065ea1ade0 100644 --- a/wcfsetup/install/files/cli.php +++ b/wcfsetup/install/files/cli.php @@ -1,5 +1,6 @@ #!/usr/bin/env php 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 +} diff --git a/wcfsetup/install/files/lib/system/cli/command/ExitCommand.class.php b/wcfsetup/install/files/lib/system/cli/command/ExitCommand.class.php index 8df82088da..e76c509487 100644 --- a/wcfsetup/install/files/lib/system/cli/command/ExitCommand.class.php +++ b/wcfsetup/install/files/lib/system/cli/command/ExitCommand.class.php @@ -26,4 +26,4 @@ class ExitCommand implements ICommand { public function canAccess() { return true; } -} \ No newline at end of file +} diff --git a/wcfsetup/install/files/lib/system/cli/command/PackageCommand.class.php b/wcfsetup/install/files/lib/system/cli/command/PackageCommand.class.php index b61cfd10a2..58bfc8254f 100644 --- a/wcfsetup/install/files/lib/system/cli/command/PackageCommand.class.php +++ b/wcfsetup/install/files/lib/system/cli/command/PackageCommand.class.php @@ -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 +} diff --git a/wcfsetup/install/files/lib/system/cli/command/WorkerCommand.class.php b/wcfsetup/install/files/lib/system/cli/command/WorkerCommand.class.php index db16283e7a..21ead9300e 100644 --- a/wcfsetup/install/files/lib/system/cli/command/WorkerCommand.class.php +++ b/wcfsetup/install/files/lib/system/cli/command/WorkerCommand.class.php @@ -169,4 +169,4 @@ class WorkerCommand implements ICommand { // TODO: Check access return true; } -} \ No newline at end of file +} diff --git a/wcfsetup/test.php b/wcfsetup/test.php index d120b074ee..3ae5a36f56 100644 --- a/wcfsetup/test.php +++ b/wcfsetup/test.php @@ -13,6 +13,7 @@ * @copyright 2001-2012 WoltLab GmbH * @license GNU Lesser General Public License */ +// @codingStandardsIgnoreFile // check php version // php version $phpVersion = phpversion();