mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Fix coding standards in Core/
This commit is contained in:
parent
61aba0f0f8
commit
63c992a85b
4 changed files with 16 additions and 20 deletions
|
@ -726,7 +726,7 @@ class App {
|
||||||
*/
|
*/
|
||||||
protected static function _loadVendor($name, $plugin, $file, $ext) {
|
protected static function _loadVendor($name, $plugin, $file, $ext) {
|
||||||
if ($mapped = self::_mapped($name, $plugin)) {
|
if ($mapped = self::_mapped($name, $plugin)) {
|
||||||
return (bool) include_once($mapped);
|
return (bool)include_once $mapped;
|
||||||
}
|
}
|
||||||
$fileTries = array();
|
$fileTries = array();
|
||||||
$paths = ($plugin) ? App::path('vendors', $plugin) : App::path('vendors');
|
$paths = ($plugin) ? App::path('vendors', $plugin) : App::path('vendors');
|
||||||
|
@ -744,7 +744,7 @@ class App {
|
||||||
foreach ($paths as $path) {
|
foreach ($paths as $path) {
|
||||||
if (file_exists($path . $file)) {
|
if (file_exists($path . $file)) {
|
||||||
self::_map($path . $file, $name, $plugin);
|
self::_map($path . $file, $name, $plugin);
|
||||||
return (bool) include($path . $file);
|
return (bool)include $path . $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -887,4 +887,5 @@ class App {
|
||||||
Cache::write('object_map', self::$_objects, '_cake_core_');
|
Cache::write('object_map', self::$_objects, '_cake_core_');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ class CakePlugin {
|
||||||
|
|
||||||
$path = self::path($plugin);
|
$path = self::path($plugin);
|
||||||
if ($config['bootstrap'] === true) {
|
if ($config['bootstrap'] === true) {
|
||||||
return include($path . 'Config' . DS . 'bootstrap.php');
|
return include $path . 'Config' . DS . 'bootstrap.php';
|
||||||
}
|
}
|
||||||
|
|
||||||
$bootstrap = (array)$config['bootstrap'];
|
$bootstrap = (array)$config['bootstrap'];
|
||||||
|
@ -224,4 +224,5 @@ class CakePlugin {
|
||||||
unset(self::$_plugins[$plugin]);
|
unset(self::$_plugins[$plugin]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,13 +69,13 @@ class Configure {
|
||||||
'www_root' => WWW_ROOT
|
'www_root' => WWW_ROOT
|
||||||
));
|
));
|
||||||
|
|
||||||
if (!include(APP . 'Config' . DS . 'core.php')) {
|
if (!include APP . 'Config' . DS . 'core.php') {
|
||||||
trigger_error(__d('cake_dev', "Can't find application core file. Please create %score.php, and make sure it is readable by PHP.", APP . 'Config' . DS), E_USER_ERROR);
|
trigger_error(__d('cake_dev', "Can't find application core file. Please create %score.php, and make sure it is readable by PHP.", APP . 'Config' . DS), E_USER_ERROR);
|
||||||
}
|
}
|
||||||
App::$bootstrapping = false;
|
App::$bootstrapping = false;
|
||||||
App::init();
|
App::init();
|
||||||
App::build();
|
App::build();
|
||||||
if (!include(APP . 'Config' . DS . 'bootstrap.php')) {
|
if (!include APP . 'Config' . DS . 'bootstrap.php') {
|
||||||
trigger_error(__d('cake_dev', "Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", APP . 'Config' . DS), E_USER_ERROR);
|
trigger_error(__d('cake_dev', "Can't find application bootstrap file. Please create %sbootstrap.php, and make sure it is readable by PHP.", APP . 'Config' . DS), E_USER_ERROR);
|
||||||
}
|
}
|
||||||
$level = -1;
|
$level = -1;
|
||||||
|
@ -335,5 +335,5 @@ class Configure {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Object class, allowing __construct and __destruct in PHP4.
|
|
||||||
*
|
|
||||||
* Also includes methods for logging and the special method RequestAction,
|
|
||||||
* to call other Controllers' Actions from anywhere.
|
|
||||||
*
|
|
||||||
* PHP 5
|
|
||||||
*
|
|
||||||
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||||||
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
* Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||||||
*
|
*
|
||||||
|
@ -206,4 +199,5 @@ class Object {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue