protected function isEmpty($value, Rule $rule)
    {
        if (is_callable($rule->isEmpty)) {
            return call_user_func($rule->isEmpty, $value);
        }

        return $value === null || $value === [] || $value === '';
    }
protected function isEmpty($value, Rule $rule)
    {
        if (is_callable($rule->isEmpty)) {
            return call_user_func($rule->isEmpty, $value);
        }

        return $value === null || $value === [] || $value === '';
    }
protected function isEmpty ( $ value , Rule $ rule ) { if ( is_callable ( $ rule -> isEmpty ) ) { return call_user_func ( $ rule -> isEmpty , $ value ) ; } return $ value === null || $ value === [ ] || $ value === '' ; }
Checks if the given value is empty.

A value is considered empty if it is null, an empty array, or the trimmed result is an empty string.
Note that this method is different from PHP empty(). It will return false when the value is 0.

@param mixed $value the value to be checked
@param Rule  $rule
@return bool whether the value is empty
Checks if the given value is empty .