mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
use empty() check instead of == [] compare
This commit is contained in:
parent
21e45202f5
commit
a76900043e
@ -249,7 +249,7 @@ class CLI
|
||||
{
|
||||
$extra_output = ' [ Default: "' . $default . '" ]';
|
||||
}
|
||||
elseif ($options !== [])
|
||||
elseif (! empty($options))
|
||||
{
|
||||
$extra_output = ' [ ' . implode(', ', $options) . ' ]';
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ class Cell
|
||||
|
||||
if ($paramCount === 0)
|
||||
{
|
||||
if ($paramArray !== [])
|
||||
if (! empty($paramArray))
|
||||
{
|
||||
throw new \InvalidArgumentException("{$class}::{$method} has no params.");
|
||||
}
|
||||
|
@ -642,7 +642,7 @@ class Parser extends View
|
||||
}
|
||||
|
||||
// Get our filter name
|
||||
$filter = $param !== [] ? trim(strtolower(substr($filter, 0, strpos($filter, '(')))) : trim($filter);
|
||||
$filter = ! empty($param) ? trim(strtolower(substr($filter, 0, strpos($filter, '(')))) : trim($filter);
|
||||
|
||||
if ( ! array_key_exists($filter, $this->config->filters))
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user