diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index 74a1d5ca60c..473ae61a65a 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -305,7 +305,7 @@ protected function _loadSchema() { * @param string $table * @return void */ - protected function _create($Schema, $table = null) { + protected function _create(CakeSchema $Schema, $table = null) { $db = ConnectionManager::getDataSource($this->Schema->connection); $drop = $create = array(); @@ -395,7 +395,7 @@ protected function _update(&$Schema, $table = null) { * @param CakeSchema $Schema * @return void */ - protected function _run($contents, $event, &$Schema) { + protected function _run($contents, $event, CakeSchema $Schema) { if (empty($contents)) { $this->err(__d('cake_console', 'Sql could not be run')); return; diff --git a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php index 0057c3bb325..4570eec1272 100644 --- a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php @@ -471,8 +471,11 @@ public function testUpdateWithTable() { ); $this->Shell->args = array('SchemaShellTest', 'articles'); $this->Shell->startup(); - $this->Shell->expects($this->any())->method('in')->will($this->returnValue('y')); - $this->Shell->expects($this->once())->method('_run') + $this->Shell->expects($this->any()) + ->method('in') + ->will($this->returnValue('y')); + $this->Shell->expects($this->once()) + ->method('_run') ->with($this->arrayHasKey('articles'), 'update', $this->isInstanceOf('CakeSchema')); $this->Shell->update();