Check if value/values are not empty
This method uses func_get_args() so you can pass in as many variables/items as you want!

@return boolean True if all value/values are not empty, false if one of the elements are empty
238
public static function isNotEmpty() {
        $args = func_get_args();

        foreach ($args as $item) {

            if (is_array($item) && empty($item)) {
                return false;
            }
            else {
                $item = trim($item);
                if (empty($item) && $item !== "0") //0 as string is allowed, a field can be zero as string
                    return false;
            }
        }

        return true;
    }
687792
public function checkValue(&$value)
    {
        if (parent::checkValue($value) === true) {
            $value = trim($value);
            if (in_array($value,
                [
                    self::SELECTOR_ALL, self::SELECTOR_FIRST, self::SELECTOR_LEFT,
                    self::SELECTOR_RIGHT, self::SELECTOR_BLANK
                ])) {
                return true;
            } else {
                throw new \InvalidArgumentException("Invalid value '" . $value . "' for argument 'value'.");
            }
        }

        return false;
    }
287925
public function check()
    {
        $currentValue = (int) ini_get($this->setting);
        
        $return = false;
        foreach($this->requiredValues as $key => $requiredValue){
            $this->requiredValues[$key]['isValid'] = version_compare($currentValue, $requiredValue['requiredValue'], $requiredValue['operator']);
            
            if($this->requiredValues[$key]['isValid']){
                $return = true;
            }
        }
        
        return $return;
    }
523999
public static boolean isEmpty (Object value) {

        if (value == null) {
            return true;
        }

        if (value.getClass() == String.class) {
            return isEmpty(value.toString());
        }

        if (value.getClass().isArray()) {
            return Array.getLength(value) == 0;
        }

        if (value instanceof Collection) {
            return ((Collection)value).size() == 0;
        }

        return false;
    }
389429
public static function isEmpty($value)
    {
        if (!isset($value)) {
            return true;
        } elseif (is_bool($value)) {
            return false;
        } elseif ($value === 0) {
            return false;
        } elseif (empty($value)) {
            return true;
        } elseif (is_object($value) && method_exists($value, 'isEmpty')) {
            return $value->isEmpty();
        } elseif (static::isTraversable($value)) {
            foreach ($value as $k => $val) {
                if (!static::isEmpty($val)) {
                    return false;
                }
            }

            return true;
        }

        return false;
    }
606495
private function _fill()
    {

        if (empty($this->db)) return false;

        $sql = (string)"SHOW VARIABLES";
        $res = $this->db->query((string)$sql);

        if (!$res) return false;

        $data = $this->db->fetch_assoc_list($res);
        if (!empty($data)) {
            foreach ($data as $variable) {
                $this->$variable[(string)'Variable_name'] = (string)$variable['Value'];
            }
            $this->db->free($res);
        }

        // clear all the unecessary variables and the endles recursion of the db
        unset($this->db, $data, $variable);

        return true;
    }
613514
public function containsNullOnly()
    {
        $data = $this->getDataPlaceHolder();
        
        foreach ($data as $variable) {
            $value = $variable->getValue();
            
            if ($variable->isNull() === false) {
                return false;
            }
        }
        
        return true;
    }
686354
function (mixedVar) {

            var emptyValues = [undefined, null, false, 0, "", "0"],
                i, length;

            for (i = 0, length = emptyValues.length; i < length; i++) {
                if (mixedVar === emptyValues[i]) {
                    return true;
                }
            }

            if (typeof mixedVar === "object") {
                if ($this.count(mixedVar) === 0) {
                    return true;
                }
            }

            return false;
        }
761857
public function check()
    {
        $returnValue = null;

        
        $validity = null;
        $name = $this->getName();
        if (($value = ini_get($name)) !== false){
            // The ini value exists for this name.
            if ((($value == '') ? '0' : $value) == $this->getExpectedValue()){
                $validity = common_configuration_Report::VALID;
                $message = "PHP Configuration Option '${name}' = '${value}' has an expected value.";
            }
            else {
                $validity = common_configuration_Report::INVALID;
                $message = "PHP Configuration Option '${name}' = '${value}' has an unexpected value.";
            }
        }
        else {
            // Unknown ini value name.
            $validity = common_configuration_Report::UNKNOWN;
            $message = "PHP Configuration Option '${name}' is unknown.";
        }

        $returnValue = new common_configuration_Report($validity, $message, $this);
        

        return $returnValue;
    }
461844
public function isEmpty() {
		$empty = true;
		foreach($this->properties as $key=>$value) {
			if ($key=='id') continue;
			if (!empty($value)) { 
				$empty = false;
		
			}	
		}
		return $empty;
	}
647544
public function val()
    {
        $el = count($this) > 1 ? $this->get(0) : $this;
        switch (strtoupper($el->nodeName(false))) {
            case 'TEXTAREA':
                return $el->html();
            case 'INPUT':
                switch (strtoupper($el->attr('type'))) {
                    case 'CHECKBOX':if ($el->attr('checked') === false) {
                            return false;
                        }

                    default:return $el->attr('value');
                }
                return $el->html();
            case 'SELECT': // ???

            default:return false;
        }
    }
300075
public function isEmpty() {
		return empty($this->shortDescription) 
				&& empty($this->longDescription) 
				&& $this->tags->size() == 0;
	}
166222
protected function isMatchingRequestVariables()
    {
        foreach ($this->getMatchRequestVariables() as $key => $value)
        {
            if ($this->getRequest()->get($key) != $value)
            {
                return false;
            }
        }

        return true;
    }
846854
static public function arrayDeepMerge()
    {
        $numArgs = func_num_args();

        if (0 == $numArgs) {
            return false;
        }

        if (1 == $numArgs) {
            return func_get_arg(0);
        }

        if (2 == $numArgs) {
            $args = func_get_args();
            $args[2] = array();
            if (is_array($args[0]) && is_array($args[1])) {
                foreach (array_unique(array_merge(array_keys($args[0]),array_keys($args[1]))) as $key) {
                    $isKey0 = array_key_exists($key, $args[0]);
                    $isKey1 = array_key_exists($key, $args[1]);

                    if (is_int($key)) {
                        if ($isKey0) {
                            $args[2][] = $args[0][$key];
                        }
                        if ($isKey1) {
                            $args[2][] = $args[1][$key];
                        }
                    } elseif ($isKey0 && $isKey1 && is_array($args[0][$key]) && is_array($args[1][$key])) {
                        $args[2][$key] = static::arrayDeepMerge($args[0][$key], $args[1][$key]);
                    } else if ($isKey0 && $isKey1) {
                        $args[2][$key] = $args[1][$key];
                    } else if (!$isKey1) {
                        $args[2][$key] = $args[0][$key];
                    } else if (!$isKey0) {
                        $args[2][$key] = $args[1][$key];
                    }
                }
                return $args[2];
            } else {
              return $args[1];
            }
        }

        $args = func_get_args();
        $args[1] = static::arrayDeepMerge($args[0], $args[1]);
        array_shift($args);

        return call_user_func_array(array(get_called_class(), 'arrayDeepMerge'), $args);
    }
872687
public function isEmpty(): bool {
        foreach ($this->coordinates as $value) {
            if (is_nan($value)) {
                return true;
            }
        }
        return false;
    }
654834
public function validateValidItem()
    {
        if (!$this->value) {
            return;
        }

        // load allowed values in values_list
        // @todo Imants: Actually we don't need to load all values from Model in
        //       array, just to check couple of posted values.
        //       Probably we should do SELECT * FROM t WHERE id IN ($values) or
        //       something like that to limit array size and time spent on
        //       parsing all DB records in Model.
        $this->getValueList();

        $values = explode($this->separator, $this->value);
        foreach ($values as $v) {
            if (!isset($this->value_list[$v])) {
                $this->displayFieldError("Value $v is not one of the offered values");

                return $this->validate();
            }
        }
    }
237928
public function hasValues()
    {
        $keys = array_values($this->data[0]);
        foreach ($this->data[1] as $key) {
            $this->failIf((!in_array($key, $keys)));
        }
    }