From e958e6c25fc1b2d4d4180e5c29380895ad1c27af Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 25 Feb 2012 20:06:48 -0500 Subject: [PATCH] Fix strict and warning errors from type hints. --- lib/Cake/Console/Command/AclShell.php | 3 ++- .../Case/Controller/Component/Auth/ControllerAuthorizeTest.php | 3 +-- lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Cake/Console/Command/AclShell.php b/lib/Cake/Console/Command/AclShell.php index 1f172e14d..8bde81592 100644 --- a/lib/Cake/Console/Command/AclShell.php +++ b/lib/Cake/Console/Command/AclShell.php @@ -17,6 +17,7 @@ */ App::uses('AppShell', 'Console/Command'); +App::uses('Controller', 'Controller'); App::uses('ComponentCollection', 'Controller'); App::uses('AclComponent', 'Controller/Component'); App::uses('DbAcl', 'Model'); @@ -90,7 +91,7 @@ class AclShell extends AppShell { if (!in_array($this->command, array('initdb'))) { $collection = new ComponentCollection(); $this->Acl = new AclComponent($collection); - $controller = null; + $controller = new Controller(); $this->Acl->startup($controller); } } diff --git a/lib/Cake/Test/Case/Controller/Component/Auth/ControllerAuthorizeTest.php b/lib/Cake/Test/Case/Controller/Component/Auth/ControllerAuthorizeTest.php index 1ece40311..6a58e6355 100644 --- a/lib/Cake/Test/Case/Controller/Component/Auth/ControllerAuthorizeTest.php +++ b/lib/Cake/Test/Case/Controller/Component/Auth/ControllerAuthorizeTest.php @@ -41,8 +41,7 @@ class ControllerAuthorizeTest extends CakeTestCase { } /** - * - * @expectedException CakeException + * @expectedException PHPUnit_Framework_Error */ public function testControllerTypeError() { $this->auth->controller(new StdClass()); diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php index c01678c68..b782eccd9 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php @@ -63,7 +63,7 @@ class SqlserverTestDb extends Sqlserver { * @param mixed $sql * @return void */ - protected function _matchRecords($model, $conditions = null) { + protected function _matchRecords(Model $model, $conditions = null) { return $this->conditions(array('id' => array(1, 2))); }