public static function isTruthy($value)
    {
        if (!$value) {
            return $value === 0 || $value === '0';
        } elseif ($value instanceof \stdClass) {
            return (bool) get_object_vars($value);
        } elseif ($value instanceof JmesPathableArrayInterface) {
            return Utils::isTruthy(iterator_to_array($value));
        } elseif ($value instanceof JmesPathableObjectInterface) {
            return (bool) $value->toArray();
        } else {
            return true;
        }
    }
public static function isTruthy($value)
    {
        if (!$value) {
            return $value === 0 || $value === '0';
        } elseif ($value instanceof \stdClass) {
            return (bool) get_object_vars($value);
        } elseif ($value instanceof JmesPathableArrayInterface) {
            return Utils::isTruthy(iterator_to_array($value));
        } elseif ($value instanceof JmesPathableObjectInterface) {
            return (bool) $value->toArray();
        } else {
            return true;
        }
    }
public static function isTruthy ( $ value ) { if ( ! $ value ) { return $ value === 0 || $ value === '0' ; } elseif ( $ value instanceof \ stdClass ) { return ( bool ) get_object_vars ( $ value ) ; } elseif ( $ value instanceof JmesPathableArrayInterface ) { return Utils :: isTruthy ( iterator_to_array ( $ value ) ) ; } elseif ( $ value instanceof JmesPathableObjectInterface ) { return ( bool ) $ value -> toArray ( ) ; } else { return true ; } }
Returns true if the value is truthy

@param mixed $value Value to check

@return bool
Returns true if the value is truthy