From 1cb24ae5376071c203965f1323eef8900a16805e Mon Sep 17 00:00:00 2001 From: euromark Date: Sat, 12 Oct 2013 01:27:00 +0200 Subject: [PATCH] CS fixes using phpcs-fixer auto-correction. --- lib/Cake/Cache/Engine/RedisEngine.php | 2 -- lib/Cake/Error/ExceptionRenderer.php | 1 - lib/Cake/I18n/I18n.php | 2 -- lib/Cake/Log/Engine/BaseLog.php | 1 - lib/Cake/Log/Engine/SyslogLog.php | 2 -- lib/Cake/Model/Behavior/TreeBehavior.php | 4 ++-- lib/Cake/Network/CakeResponse.php | 2 +- lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php | 1 - lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php | 1 - lib/Cake/Test/Case/Model/AclNodeTest.php | 1 - lib/Cake/TestSuite/CakeTestRunner.php | 1 - lib/Cake/TestSuite/CakeTestSuiteDispatcher.php | 1 - lib/Cake/TestSuite/Coverage/BaseCoverageReport.php | 1 - 13 files changed, 3 insertions(+), 17 deletions(-) diff --git a/lib/Cake/Cache/Engine/RedisEngine.php b/lib/Cake/Cache/Engine/RedisEngine.php index c481f8c6f..4d92cd8e8 100644 --- a/lib/Cake/Cache/Engine/RedisEngine.php +++ b/lib/Cake/Cache/Engine/RedisEngine.php @@ -213,8 +213,6 @@ class RedisEngine extends CacheEngine { /** * Disconnects from the redis server - * - * @return void */ public function __destruct() { if (!$this->settings['persistent']) { diff --git a/lib/Cake/Error/ExceptionRenderer.php b/lib/Cake/Error/ExceptionRenderer.php index 76f0ddff5..485e32a9c 100644 --- a/lib/Cake/Error/ExceptionRenderer.php +++ b/lib/Cake/Error/ExceptionRenderer.php @@ -89,7 +89,6 @@ class ExceptionRenderer { * code error depending on the code used to construct the error. * * @param Exception $exception Exception - * @return mixed Return void or value returned by controller's `appError()` function */ public function __construct(Exception $exception) { $this->controller = $this->_getController($exception); diff --git a/lib/Cake/I18n/I18n.php b/lib/Cake/I18n/I18n.php index 9eb739534..2f27023d0 100644 --- a/lib/Cake/I18n/I18n.php +++ b/lib/Cake/I18n/I18n.php @@ -98,8 +98,6 @@ class I18n { /** * Constructor, use I18n::getInstance() to get the i18n translation object. - * - * @return void */ public function __construct() { $this->l10n = new L10n(); diff --git a/lib/Cake/Log/Engine/BaseLog.php b/lib/Cake/Log/Engine/BaseLog.php index 3e071935b..a7b3953bb 100644 --- a/lib/Cake/Log/Engine/BaseLog.php +++ b/lib/Cake/Log/Engine/BaseLog.php @@ -38,7 +38,6 @@ abstract class BaseLog implements CakeLogInterface { * __construct method * * @param array $config Configuration array - * @return void */ public function __construct($config = array()) { $this->config($config); diff --git a/lib/Cake/Log/Engine/SyslogLog.php b/lib/Cake/Log/Engine/SyslogLog.php index 4c6147903..d70eca5a0 100644 --- a/lib/Cake/Log/Engine/SyslogLog.php +++ b/lib/Cake/Log/Engine/SyslogLog.php @@ -154,8 +154,6 @@ class SyslogLog extends BaseLog { /** * Closes the logger connection - * - * @return void **/ public function __destruct() { closelog(); diff --git a/lib/Cake/Model/Behavior/TreeBehavior.php b/lib/Cake/Model/Behavior/TreeBehavior.php index e87abedc3..94c2bb443 100644 --- a/lib/Cake/Model/Behavior/TreeBehavior.php +++ b/lib/Cake/Model/Behavior/TreeBehavior.php @@ -682,7 +682,7 @@ class TreeBehavior extends ModelBehavior { $children = $Model->find('all', $params); $hasChildren = (bool)$children; - if (!is_null($parentId)) { + if ($parentId !== null) { if ($hasChildren) { $Model->updateAll( array($this->settings[$Model->alias]['left'] => $counter), @@ -713,7 +713,7 @@ class TreeBehavior extends ModelBehavior { $children = $Model->find('all', $params); } - if (!is_null($parentId) && $hasChildren) { + if ($parentId !== null && $hasChildren) { $Model->updateAll( array($this->settings[$Model->alias]['right'] => $counter), array($Model->escapeField() => $parentId) diff --git a/lib/Cake/Network/CakeResponse.php b/lib/Cake/Network/CakeResponse.php index f6a0ed2e5..2f60667fe 100644 --- a/lib/Cake/Network/CakeResponse.php +++ b/lib/Cake/Network/CakeResponse.php @@ -570,7 +570,7 @@ class CakeResponse { if (is_numeric($header)) { list($header, $value) = array($value, null); } - if (is_null($value)) { + if ($value === null) { list($header, $value) = explode(':', $header, 2); } $this->_headers[$header] = is_array($value) ? array_map('trim', $value) : trim($value); diff --git a/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php b/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php index c29550b01..1eab437f2 100644 --- a/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php +++ b/lib/Cake/Test/Case/Controller/Component/Acl/DbAclTest.php @@ -158,7 +158,6 @@ class DbAclTwoTest extends DbAcl { /** * construct method * - * @return void */ public function __construct() { $this->Aro = new AroTwoTest(); diff --git a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php index ed102d2c5..2891236b8 100644 --- a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php @@ -99,7 +99,6 @@ class AuthTestController extends Controller { /** * construct method * - * @return void */ public function __construct($request, $response) { $request->addParams(Router::parse('/auth_test')); diff --git a/lib/Cake/Test/Case/Model/AclNodeTest.php b/lib/Cake/Test/Case/Model/AclNodeTest.php index d8986ea81..bd71c701f 100644 --- a/lib/Cake/Test/Case/Model/AclNodeTest.php +++ b/lib/Cake/Test/Case/Model/AclNodeTest.php @@ -185,7 +185,6 @@ class TestDbAcl extends DbAcl { /** * construct method * - * @return void */ public function __construct() { $this->Aro = new DbAroTest(); diff --git a/lib/Cake/TestSuite/CakeTestRunner.php b/lib/Cake/TestSuite/CakeTestRunner.php index fe64e30fe..9b98ffdde 100644 --- a/lib/Cake/TestSuite/CakeTestRunner.php +++ b/lib/Cake/TestSuite/CakeTestRunner.php @@ -33,7 +33,6 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner { * * @param mixed $loader * @param array $params list of options to be used for this run - * @return void */ public function __construct($loader, $params) { parent::__construct($loader); diff --git a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php index 4c10d1859..e7a5dabd8 100644 --- a/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php +++ b/lib/Cake/TestSuite/CakeTestSuiteDispatcher.php @@ -79,7 +79,6 @@ class CakeTestSuiteDispatcher { /** * constructor * - * @return void */ public function __construct() { $this->_baseUrl = $_SERVER['PHP_SELF']; diff --git a/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php b/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php index d737768c6..1df1ae912 100644 --- a/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php +++ b/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php @@ -61,7 +61,6 @@ abstract class BaseCoverageReport { * * @param array $coverage Array of coverage data from PHPUnit_Test_Result * @param CakeBaseReporter $reporter A reporter to use for the coverage report. - * @return void */ public function __construct($coverage, CakeBaseReporter $reporter) { $this->_rawCoverage = $coverage;