src/Blackprism/Serializer/Json/Serialize.php
protected function checkNullForAttribute($value, $attribute): bool
    {
        // We don't use $attribute here, we want filter all value with the same behavior
        if ($value === null) {
            return true;
        }

        if (is_array($value) === true && $value === []) {
            return true;
        }

        if ($value instanceof \Countable && count($value) === 0) {
            return true;
        }

        return false;
    }
protected function checkNullForAttribute($value, $attribute): bool
    {
        // We don't use $attribute here, we want filter all value with the same behavior
        if ($value === null) {
            return true;
        }

        if (is_array($value) === true && $value === []) {
            return true;
        }

        if ($value instanceof \Countable && count($value) === 0) {
            return true;
        }

        return false;
    }
protected function checkNullForAttribute ( $ value , $ attribute ) : bool { // We don't use $attribute here, we want filter all value with the same behavior if ( $ value === null ) { return true ; } if ( is_array ( $ value ) === true && $ value === [ ] ) { return true ; } if ( $ value instanceof \ Countable && count ( $ value ) === 0 ) { return true ; } return false ; }
Set attribute with value when value is not considered as a null value

@param mixed $value
@param string $attribute

@return bool
Set attribute with value when value is not considered as a null value