mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +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);
|
||||
}
|
||||
|
||||
switch (low($target)) {
|
||||
switch (strtolower($target)) {
|
||||
case 'cache':
|
||||
$filename = CACHE . $path;
|
||||
break;
|
||||
|
|
|
@ -173,8 +173,8 @@ class ApiShell extends Shell {
|
|||
foreach ($commands as $cmd) {
|
||||
$this->out("{$cmd}\n\n");
|
||||
}
|
||||
} elseif (isset($commands[low($this->args[1])])) {
|
||||
$this->out($commands[low($this->args[1])] . "\n\n");
|
||||
} elseif (isset($commands[strtolower($this->args[1])])) {
|
||||
$this->out($commands[strtolower($this->args[1])] . "\n\n");
|
||||
} else {
|
||||
$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');
|
||||
|
||||
$persistent = $this->in('Persistent Connection?', array('y', 'n'), 'n');
|
||||
if (low($persistent) == 'n') {
|
||||
if (strtolower($persistent) == 'n') {
|
||||
$persistent = 'false';
|
||||
} else {
|
||||
$persistent = 'true';
|
||||
|
@ -124,7 +124,7 @@ class DbConfigTask extends Shell {
|
|||
$port = $this->in('Port?', null, 'n');
|
||||
}
|
||||
|
||||
if (low($port) == 'n') {
|
||||
if (strtolower($port) == 'n') {
|
||||
$port = null;
|
||||
}
|
||||
|
||||
|
@ -155,7 +155,7 @@ class DbConfigTask extends Shell {
|
|||
while ($prefix == '') {
|
||||
$prefix = $this->in('Table Prefix?', null, 'n');
|
||||
}
|
||||
if (low($prefix) == 'n') {
|
||||
if (strtolower($prefix) == 'n') {
|
||||
$prefix = null;
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ class DbConfigTask extends Shell {
|
|||
while ($encoding == '') {
|
||||
$encoding = $this->in('Table encoding?', null, 'n');
|
||||
}
|
||||
if (low($encoding) == 'n') {
|
||||
if (strtolower($encoding) == 'n') {
|
||||
$encoding = null;
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,7 @@ class DbConfigTask extends Shell {
|
|||
$schema = $this->in('Table schema?', null, 'n');
|
||||
}
|
||||
}
|
||||
if (low($schema) == 'n') {
|
||||
if (strtolower($schema) == 'n') {
|
||||
$schema = null;
|
||||
}
|
||||
|
||||
|
@ -185,7 +185,7 @@ class DbConfigTask extends Shell {
|
|||
$dbConfigs[] = $config;
|
||||
$doneYet = $this->in('Do you wish to add another database configuration?', null, 'n');
|
||||
|
||||
if (low($doneYet == 'n')) {
|
||||
if (strtolower($doneYet == 'n')) {
|
||||
$done = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -614,7 +614,7 @@ class ModelTask extends Shell {
|
|||
$prompt = "{$model->name} {$type} {$associations[$type][$i]['alias']}";
|
||||
$response = $this->in("{$prompt}?", array('y','n'), 'y');
|
||||
|
||||
if ('n' == low($response)) {
|
||||
if ('n' == strtolower($response)) {
|
||||
unset($associations[$type][$i]);
|
||||
} elseif ($type == 'hasMany') {
|
||||
unset($associations['hasOne'][$i]);
|
||||
|
@ -637,7 +637,7 @@ class ModelTask extends Shell {
|
|||
$prompt = __('Would you like to define some additional model associations?', true);
|
||||
$wannaDoMoreAssoc = $this->in($prompt, array('y','n'), 'n');
|
||||
$possibleKeys = $this->_generatePossibleKeys();
|
||||
while (low($wannaDoMoreAssoc) == 'y') {
|
||||
while (strtolower($wannaDoMoreAssoc) == 'y') {
|
||||
$assocs = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany');
|
||||
$this->out(__('What is the association type?', true));
|
||||
$assocType = intval($this->inOptions($assocs, __('Enter a number',true)));
|
||||
|
|
Loading…
Add table
Reference in a new issue