mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
CS fixes using phpcs-fixer auto-correction.
This commit is contained in:
parent
63b65e2f69
commit
1cb24ae537
13 changed files with 3 additions and 17 deletions
|
@ -213,8 +213,6 @@ class RedisEngine extends CacheEngine {
|
|||
|
||||
/**
|
||||
* Disconnects from the redis server
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __destruct() {
|
||||
if (!$this->settings['persistent']) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -154,8 +154,6 @@ class SyslogLog extends BaseLog {
|
|||
|
||||
/**
|
||||
* Closes the logger connection
|
||||
*
|
||||
* @return void
|
||||
**/
|
||||
public function __destruct() {
|
||||
closelog();
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -158,7 +158,6 @@ class DbAclTwoTest extends DbAcl {
|
|||
/**
|
||||
* construct method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->Aro = new AroTwoTest();
|
||||
|
|
|
@ -99,7 +99,6 @@ class AuthTestController extends Controller {
|
|||
/**
|
||||
* construct method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($request, $response) {
|
||||
$request->addParams(Router::parse('/auth_test'));
|
||||
|
|
|
@ -185,7 +185,6 @@ class TestDbAcl extends DbAcl {
|
|||
/**
|
||||
* construct method
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->Aro = new DbAroTest();
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -79,7 +79,6 @@ class CakeTestSuiteDispatcher {
|
|||
/**
|
||||
* constructor
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->_baseUrl = $_SERVER['PHP_SELF'];
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue