mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-04 10:32:40 +00:00
Merge pull request #7447 from ravage84/2.7-lib-improvements
Various improvements to the CakePHP lib files
This commit is contained in:
commit
12f5aee5a2
54 changed files with 140 additions and 120 deletions
|
@ -558,7 +558,7 @@ class AclShell extends AppShell {
|
|||
* or an array of properties to use in AcoNode::node()
|
||||
*
|
||||
* @param string $class Class type you want (Aro/Aco)
|
||||
* @param string|array $identifier A mixed identifier for finding the node.
|
||||
* @param string|array|null $identifier A mixed identifier for finding the node, otherwise null.
|
||||
* @return int Integer of NodeId. Will trigger an error if nothing is found.
|
||||
*/
|
||||
protected function _getNodeId($class, $identifier) {
|
||||
|
@ -568,7 +568,7 @@ class AclShell extends AppShell {
|
|||
$identifier = var_export($identifier, true);
|
||||
}
|
||||
$this->error(__d('cake_console', 'Could not find node using reference "%s"', $identifier));
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
return Hash::get($node, "0.{$class}.id");
|
||||
}
|
||||
|
|
|
@ -210,7 +210,7 @@ class FixtureTask extends BakeTask {
|
|||
* @param string $model Name of model to bake.
|
||||
* @param string $useTable Name of table to use.
|
||||
* @param array $importOptions Options for public $import
|
||||
* @return string Baked fixture content
|
||||
* @return string|null Baked fixture content, otherwise null.
|
||||
*/
|
||||
public function bake($model, $useTable = false, $importOptions = array()) {
|
||||
App::uses('CakeSchema', 'Model');
|
||||
|
@ -243,7 +243,7 @@ class FixtureTask extends BakeTask {
|
|||
$data = $this->_Schema->read(array('models' => false, 'connection' => $this->connection));
|
||||
if (!isset($data['tables'][$useTable])) {
|
||||
$this->err("<warning>Warning:</warning> Could not find the '${useTable}' table for ${model}.");
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
|
||||
$tableInfo = $data['tables'][$useTable];
|
||||
|
|
|
@ -89,7 +89,7 @@ class ViewTask extends BakeTask {
|
|||
$this->_interactive();
|
||||
}
|
||||
if (empty($this->args[0])) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
if (!isset($this->connection)) {
|
||||
$this->connection = 'default';
|
||||
|
|
|
@ -179,11 +179,11 @@ class TestShell extends Shell {
|
|||
/**
|
||||
* Parse the CLI options into an array CakeTestDispatcher can use.
|
||||
*
|
||||
* @return array Array of params for CakeTestDispatcher
|
||||
* @return array|null Array of params for CakeTestDispatcher or null.
|
||||
*/
|
||||
protected function _parseArgs() {
|
||||
if (empty($this->args)) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
$params = array(
|
||||
'core' => false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue