mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 04:26:20 +00:00
Code cleanup
Remove unneeded sprintf. Fix doc blocks. Remove duplicated keys in tests assertions. Use boolean value for CakeRequest $parseEnvironment param.
This commit is contained in:
parent
5551727a4b
commit
6d75d90c25
7 changed files with 5 additions and 9 deletions
|
@ -70,9 +70,7 @@ class PhpReader implements ConfigReaderInterface {
|
||||||
|
|
||||||
include $file;
|
include $file;
|
||||||
if (!isset($config)) {
|
if (!isset($config)) {
|
||||||
throw new ConfigureException(
|
throw new ConfigureException(__d('cake_dev', 'No variable $config found in %s', $file));
|
||||||
sprintf(__d('cake_dev', 'No variable $config found in %s'), $file)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
return $config;
|
return $config;
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@ class Component extends Object {
|
||||||
*
|
*
|
||||||
* @param Controller $controller Controller with components to shutdown
|
* @param Controller $controller Controller with components to shutdown
|
||||||
* @return void
|
* @return void
|
||||||
* @link @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::shutdown
|
* @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::shutdown
|
||||||
*/
|
*/
|
||||||
public function shutdown(Controller $controller) {
|
public function shutdown(Controller $controller) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -2959,7 +2959,7 @@ class DboSource extends DataSource {
|
||||||
/**
|
/**
|
||||||
* Generate a database-native schema for the given Schema object
|
* Generate a database-native schema for the given Schema object
|
||||||
*
|
*
|
||||||
* @param Model $schema An instance of a subclass of CakeSchema
|
* @param CakeSchema $schema An instance of a subclass of CakeSchema
|
||||||
* @param string $tableName Optional. If specified only the table name given will be generated.
|
* @param string $tableName Optional. If specified only the table name given will be generated.
|
||||||
* Otherwise, all tables defined in the schema are generated.
|
* Otherwise, all tables defined in the schema are generated.
|
||||||
* @return string
|
* @return string
|
||||||
|
|
|
@ -93,7 +93,6 @@ class MemcacheEngineTest extends CakeTestCase {
|
||||||
'persistent' => true,
|
'persistent' => true,
|
||||||
'compress' => false,
|
'compress' => false,
|
||||||
'engine' => 'Memcache',
|
'engine' => 'Memcache',
|
||||||
'persistent' => true,
|
|
||||||
'groups' => array()
|
'groups' => array()
|
||||||
);
|
);
|
||||||
$this->assertEquals($expecting, $settings);
|
$this->assertEquals($expecting, $settings);
|
||||||
|
|
|
@ -155,7 +155,6 @@ class CrudAuthorizeTest extends CakeTestCase {
|
||||||
'create' => 'create',
|
'create' => 'create',
|
||||||
'read' => 'read',
|
'read' => 'read',
|
||||||
'index' => 'read',
|
'index' => 'read',
|
||||||
'add' => 'create',
|
|
||||||
'edit' => 'update',
|
'edit' => 'update',
|
||||||
'view' => 'read',
|
'view' => 'read',
|
||||||
'delete' => 'delete',
|
'delete' => 'delete',
|
||||||
|
|
|
@ -1254,7 +1254,7 @@ class ControllerTest extends CakeTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function testPropertyBackwardsCompatibility() {
|
public function testPropertyBackwardsCompatibility() {
|
||||||
$request = new CakeRequest('posts/index', null);
|
$request = new CakeRequest('posts/index', false);
|
||||||
$request->addParams(array('controller' => 'posts', 'action' => 'index'));
|
$request->addParams(array('controller' => 'posts', 'action' => 'index'));
|
||||||
$request->data = array('Post' => array('id' => 1));
|
$request->data = array('Post' => array('id' => 1));
|
||||||
$request->here = '/posts/index';
|
$request->here = '/posts/index';
|
||||||
|
|
|
@ -1315,7 +1315,7 @@ class RouterTest extends CakeTestCase {
|
||||||
$this->assertEquals($expected, $result);
|
$this->assertEquals($expected, $result);
|
||||||
|
|
||||||
$result = Router::parse('/posts/view/1.rss');
|
$result = Router::parse('/posts/view/1.rss');
|
||||||
$expected = array('plugin' => null, 'controller' => 'posts', 'action' => 'view', 'pass' => array('1'), 'named' => array(), 'ext' => 'rss', 'named' => array());
|
$expected = array('plugin' => null, 'controller' => 'posts', 'action' => 'view', 'pass' => array('1'), 'named' => array(), 'ext' => 'rss');
|
||||||
$this->assertEquals($expected, $result);
|
$this->assertEquals($expected, $result);
|
||||||
|
|
||||||
$result = Router::parse('/posts/view/1.rss?query=test');
|
$result = Router::parse('/posts/view/1.rss?query=test');
|
||||||
|
|
Loading…
Add table
Reference in a new issue