mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fix strict and warning errors from type hints.
This commit is contained in:
parent
973dce916a
commit
e958e6c25f
3 changed files with 4 additions and 4 deletions
|
@ -17,6 +17,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
App::uses('AppShell', 'Console/Command');
|
App::uses('AppShell', 'Console/Command');
|
||||||
|
App::uses('Controller', 'Controller');
|
||||||
App::uses('ComponentCollection', 'Controller');
|
App::uses('ComponentCollection', 'Controller');
|
||||||
App::uses('AclComponent', 'Controller/Component');
|
App::uses('AclComponent', 'Controller/Component');
|
||||||
App::uses('DbAcl', 'Model');
|
App::uses('DbAcl', 'Model');
|
||||||
|
@ -90,7 +91,7 @@ class AclShell extends AppShell {
|
||||||
if (!in_array($this->command, array('initdb'))) {
|
if (!in_array($this->command, array('initdb'))) {
|
||||||
$collection = new ComponentCollection();
|
$collection = new ComponentCollection();
|
||||||
$this->Acl = new AclComponent($collection);
|
$this->Acl = new AclComponent($collection);
|
||||||
$controller = null;
|
$controller = new Controller();
|
||||||
$this->Acl->startup($controller);
|
$this->Acl->startup($controller);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,7 @@ class ControllerAuthorizeTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @expectedException PHPUnit_Framework_Error
|
||||||
* @expectedException CakeException
|
|
||||||
*/
|
*/
|
||||||
public function testControllerTypeError() {
|
public function testControllerTypeError() {
|
||||||
$this->auth->controller(new StdClass());
|
$this->auth->controller(new StdClass());
|
||||||
|
|
|
@ -63,7 +63,7 @@ class SqlserverTestDb extends Sqlserver {
|
||||||
* @param mixed $sql
|
* @param mixed $sql
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
protected function _matchRecords($model, $conditions = null) {
|
protected function _matchRecords(Model $model, $conditions = null) {
|
||||||
return $this->conditions(array('id' => array(1, 2)));
|
return $this->conditions(array('id' => array(1, 2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue