mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Removing use of low() in core classes and functions. Refs #6525
This commit is contained in:
parent
7c4dfed299
commit
30f8709bb4
4 changed files with 11 additions and 11 deletions
|
@ -496,7 +496,7 @@ if (!function_exists('file_put_contents')) {
|
||||||
$expires = strtotime($expires, $now);
|
$expires = strtotime($expires, $now);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (low($target)) {
|
switch (strtolower($target)) {
|
||||||
case 'cache':
|
case 'cache':
|
||||||
$filename = CACHE . $path;
|
$filename = CACHE . $path;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -173,8 +173,8 @@ class ApiShell extends Shell {
|
||||||
foreach ($commands as $cmd) {
|
foreach ($commands as $cmd) {
|
||||||
$this->out("{$cmd}\n\n");
|
$this->out("{$cmd}\n\n");
|
||||||
}
|
}
|
||||||
} elseif (isset($commands[low($this->args[1])])) {
|
} elseif (isset($commands[strtolower($this->args[1])])) {
|
||||||
$this->out($commands[low($this->args[1])] . "\n\n");
|
$this->out($commands[strtolower($this->args[1])] . "\n\n");
|
||||||
} else {
|
} else {
|
||||||
$this->out("Command '" . $this->args[1] . "' not found");
|
$this->out("Command '" . $this->args[1] . "' not found");
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,7 +108,7 @@ class DbConfigTask extends Shell {
|
||||||
$driver = $this->in('Driver:', array('db2', 'firebird', 'mssql', 'mysql', 'mysqli', 'odbc', 'oracle', 'postgres', 'sqlite', 'sybase'), 'mysql');
|
$driver = $this->in('Driver:', array('db2', 'firebird', 'mssql', 'mysql', 'mysqli', 'odbc', 'oracle', 'postgres', 'sqlite', 'sybase'), 'mysql');
|
||||||
|
|
||||||
$persistent = $this->in('Persistent Connection?', array('y', 'n'), 'n');
|
$persistent = $this->in('Persistent Connection?', array('y', 'n'), 'n');
|
||||||
if (low($persistent) == 'n') {
|
if (strtolower($persistent) == 'n') {
|
||||||
$persistent = 'false';
|
$persistent = 'false';
|
||||||
} else {
|
} else {
|
||||||
$persistent = 'true';
|
$persistent = 'true';
|
||||||
|
@ -124,7 +124,7 @@ class DbConfigTask extends Shell {
|
||||||
$port = $this->in('Port?', null, 'n');
|
$port = $this->in('Port?', null, 'n');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (low($port) == 'n') {
|
if (strtolower($port) == 'n') {
|
||||||
$port = null;
|
$port = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ class DbConfigTask extends Shell {
|
||||||
while ($prefix == '') {
|
while ($prefix == '') {
|
||||||
$prefix = $this->in('Table Prefix?', null, 'n');
|
$prefix = $this->in('Table Prefix?', null, 'n');
|
||||||
}
|
}
|
||||||
if (low($prefix) == 'n') {
|
if (strtolower($prefix) == 'n') {
|
||||||
$prefix = null;
|
$prefix = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ class DbConfigTask extends Shell {
|
||||||
while ($encoding == '') {
|
while ($encoding == '') {
|
||||||
$encoding = $this->in('Table encoding?', null, 'n');
|
$encoding = $this->in('Table encoding?', null, 'n');
|
||||||
}
|
}
|
||||||
if (low($encoding) == 'n') {
|
if (strtolower($encoding) == 'n') {
|
||||||
$encoding = null;
|
$encoding = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ class DbConfigTask extends Shell {
|
||||||
$schema = $this->in('Table schema?', null, 'n');
|
$schema = $this->in('Table schema?', null, 'n');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (low($schema) == 'n') {
|
if (strtolower($schema) == 'n') {
|
||||||
$schema = null;
|
$schema = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ class DbConfigTask extends Shell {
|
||||||
$dbConfigs[] = $config;
|
$dbConfigs[] = $config;
|
||||||
$doneYet = $this->in('Do you wish to add another database configuration?', null, 'n');
|
$doneYet = $this->in('Do you wish to add another database configuration?', null, 'n');
|
||||||
|
|
||||||
if (low($doneYet == 'n')) {
|
if (strtolower($doneYet == 'n')) {
|
||||||
$done = true;
|
$done = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -614,7 +614,7 @@ class ModelTask extends Shell {
|
||||||
$prompt = "{$model->name} {$type} {$associations[$type][$i]['alias']}";
|
$prompt = "{$model->name} {$type} {$associations[$type][$i]['alias']}";
|
||||||
$response = $this->in("{$prompt}?", array('y','n'), 'y');
|
$response = $this->in("{$prompt}?", array('y','n'), 'y');
|
||||||
|
|
||||||
if ('n' == low($response)) {
|
if ('n' == strtolower($response)) {
|
||||||
unset($associations[$type][$i]);
|
unset($associations[$type][$i]);
|
||||||
} elseif ($type == 'hasMany') {
|
} elseif ($type == 'hasMany') {
|
||||||
unset($associations['hasOne'][$i]);
|
unset($associations['hasOne'][$i]);
|
||||||
|
@ -637,7 +637,7 @@ class ModelTask extends Shell {
|
||||||
$prompt = __('Would you like to define some additional model associations?', true);
|
$prompt = __('Would you like to define some additional model associations?', true);
|
||||||
$wannaDoMoreAssoc = $this->in($prompt, array('y','n'), 'n');
|
$wannaDoMoreAssoc = $this->in($prompt, array('y','n'), 'n');
|
||||||
$possibleKeys = $this->_generatePossibleKeys();
|
$possibleKeys = $this->_generatePossibleKeys();
|
||||||
while (low($wannaDoMoreAssoc) == 'y') {
|
while (strtolower($wannaDoMoreAssoc) == 'y') {
|
||||||
$assocs = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany');
|
$assocs = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany');
|
||||||
$this->out(__('What is the association type?', true));
|
$this->out(__('What is the association type?', true));
|
||||||
$assocType = intval($this->inOptions($assocs, __('Enter a number',true)));
|
$assocType = intval($this->inOptions($assocs, __('Enter a number',true)));
|
||||||
|
|
Loading…
Add table
Reference in a new issue