Skip to content

Commit

Permalink
Fix more strict errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Nov 13, 2011
1 parent 17ffcde commit a7fcb0a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Core/App.php
Expand Up @@ -666,7 +666,7 @@ protected static function _loadClass($name, $plugin, $type, $originalType, $pare
* @param boolean $return whether this function should return the contents of the file after being parsed by php or just a success notice
* @return mixed if $return contents of the file after php parses it, boolean indicating success otherwise
*/
protected function _loadFile($name, $plugin, $search, $file, $return) {
protected static function _loadFile($name, $plugin, $search, $file, $return) {
$mapped = self::_mapped($name, $plugin);
if ($mapped) {
$file = $mapped;
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Test/Case/Core/ObjectTest.php
Expand Up @@ -490,7 +490,7 @@ public function testRequestActionPlugins() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
), true);
CakePlugin::loadAll();
CakePlugin::load('TestPlugin');
Router::reload();

$result = $this->object->requestAction('/test_plugin/tests/index', array('return'));
Expand Down
11 changes: 7 additions & 4 deletions lib/Cake/Test/Case/Network/CakeResponseTest.php
Expand Up @@ -300,11 +300,14 @@ public function testCache() {
}

/**
* Tests the compress method
*
*/
* Tests the compress method
*
* @return void
*/
public function testCompress() {
$this->skipIf(php_sapi_name() !== 'cli', 'The response compression can only be tested in cli.');
if (php_sapi_name() !== 'cli') {
$this->markTestSkipped('The response compression can only be tested in cli.');
}

$response = new CakeResponse();
if (ini_get("zlib.output_compression") === '1' || !extension_loaded("zlib")) {
Expand Down
Expand Up @@ -7,23 +7,23 @@ public function describe($model) {
return compact('model');
}

public function listSources() {
public function listSources($data = null) {
return array('test_source');
}

public function create($model, $fields = array(), $values = array()) {
public function create(Model $model, $fields = array(), $values = array()) {
return compact('model', 'fields', 'values');
}

public function read($model, $queryData = array()) {
public function read(Model $model, $queryData = array()) {
return compact('model', 'queryData');
}

public function update($model, $fields = array(), $values = array()) {
public function update(Model $model, $fields = array(), $values = array()) {
return compact('model', 'fields', 'values');
}

public function delete($model, $id) {
public function delete(Model $model, $id = null) {
return compact('model', 'id');
}
}

0 comments on commit a7fcb0a

Please sign in to comment.