Fix phpcs

This commit is contained in:
Laurent Destailleur 2019-06-20 13:39:29 +02:00
parent afb6362317
commit 29e3199639

View File

@ -24,6 +24,7 @@
* \brief Library of accountancy functions * \brief Library of accountancy functions
*/ */
/** /**
* Check if a value is empty with some options * Check if a value is empty with some options
* *
@ -32,13 +33,13 @@
* @return array Bool * @return array Bool
* @author Michael - https://www.php.net/manual/fr/function.empty.php#90767 * @author Michael - https://www.php.net/manual/fr/function.empty.php#90767
*/ */
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))) {
return true; return true;
} else { }
return false; return false;
} }
}
/** /**
* Prepare array with list of tabs * Prepare array with list of tabs