mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Fix more strict errors.
This commit is contained in:
parent
17ffcde505
commit
a7fcb0a61c
4 changed files with 14 additions and 11 deletions
|
@ -666,7 +666,7 @@ class App {
|
||||||
* @param boolean $return whether this function should return the contents of the file after being parsed by php or just a success notice
|
* @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
|
* @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);
|
$mapped = self::_mapped($name, $plugin);
|
||||||
if ($mapped) {
|
if ($mapped) {
|
||||||
$file = $mapped;
|
$file = $mapped;
|
||||||
|
|
|
@ -490,7 +490,7 @@ class ObjectTest extends CakeTestCase {
|
||||||
App::build(array(
|
App::build(array(
|
||||||
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
|
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
|
||||||
), true);
|
), true);
|
||||||
CakePlugin::loadAll();
|
CakePlugin::load('TestPlugin');
|
||||||
Router::reload();
|
Router::reload();
|
||||||
|
|
||||||
$result = $this->object->requestAction('/test_plugin/tests/index', array('return'));
|
$result = $this->object->requestAction('/test_plugin/tests/index', array('return'));
|
||||||
|
|
|
@ -300,11 +300,14 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests the compress method
|
* Tests the compress method
|
||||||
*
|
*
|
||||||
*/
|
* @return void
|
||||||
|
*/
|
||||||
public function testCompress() {
|
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();
|
$response = new CakeResponse();
|
||||||
if (ini_get("zlib.output_compression") === '1' || !extension_loaded("zlib")) {
|
if (ini_get("zlib.output_compression") === '1' || !extension_loaded("zlib")) {
|
||||||
|
|
|
@ -7,23 +7,23 @@ class TestSource extends DataSource {
|
||||||
return compact('model');
|
return compact('model');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function listSources() {
|
public function listSources($data = null) {
|
||||||
return array('test_source');
|
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');
|
return compact('model', 'fields', 'values');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function read($model, $queryData = array()) {
|
public function read(Model $model, $queryData = array()) {
|
||||||
return compact('model', 'queryData');
|
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');
|
return compact('model', 'fields', 'values');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete($model, $id) {
|
public function delete(Model $model, $id = null) {
|
||||||
return compact('model', 'id');
|
return compact('model', 'id');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue