Fix phpcs
This commit is contained in:
parent
29e3199639
commit
ff0f6295d8
@ -25,14 +25,15 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if a value is empty with some options
|
* Check if a value is empty with some options
|
||||||
*
|
*
|
||||||
* @param allow_false : setting this to true will make the function consider a boolean value of false as NOT empty. This parameter is false by default.
|
* @author Michael - https://www.php.net/manual/fr/function.empty.php#90767
|
||||||
* @param allow_ws : setting this to true will make the function consider a string with nothing but white space as NOT empty. This parameter is false by default.
|
* @param mixed $var Value to test
|
||||||
* @return array Bool
|
* @param int|null $allow_false Setting this to true will make the function consider a boolean value of false as NOT empty. This parameter is false by default.
|
||||||
* @author Michael - https://www.php.net/manual/fr/function.empty.php#90767
|
* @param int|null $allow_ws Setting this to true will make the function consider a string with nothing but white space as NOT empty. This parameter is false by default.
|
||||||
*/
|
* @return boolean True of False
|
||||||
|
*/
|
||||||
function is_empty($var, $allow_false = false, $allow_ws = false)
|
function is_empty($var, $allow_false = false, $allow_ws = false)
|
||||||
{
|
{
|
||||||
if (!isset($var) || is_null($var) || ($allow_ws == false && trim($var) == "" && !is_bool($var)) || ($allow_false === false && is_bool($var) && $var === false) || (is_array($var) && empty($var))) {
|
if (!isset($var) || is_null($var) || ($allow_ws == false && trim($var) == "" && !is_bool($var)) || ($allow_false === false && is_bool($var) && $var === false) || (is_array($var) && empty($var))) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user