Browse Source

CS fixes using phpcs-fixer auto-correction.

euromark 12 years ago
parent
commit
1cb24ae537

+ 0 - 2
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']) {

+ 0 - 1
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);

+ 0 - 2
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();

+ 0 - 1
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);

+ 0 - 2
lib/Cake/Log/Engine/SyslogLog.php

@@ -154,8 +154,6 @@ class SyslogLog extends BaseLog {
 
 /**
  * Closes the logger connection
- *
- * @return void
  **/
 	public function __destruct() {
 		closelog();

+ 2 - 2
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)

+ 1 - 1
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);

+ 0 - 1
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();

+ 0 - 1
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'));

+ 0 - 1
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();

+ 0 - 1
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);

+ 0 - 1
lib/Cake/TestSuite/CakeTestSuiteDispatcher.php

@@ -79,7 +79,6 @@ class CakeTestSuiteDispatcher {
 /**
  * constructor
  *
- * @return void
  */
 	public function __construct() {
 		$this->_baseUrl = $_SERVER['PHP_SELF'];

+ 0 - 1
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;