src/Invoice/Creator.php
protected function addEmpty(array &$array, $key, $value, $default = '')
    {
        if (!empty($value)) {
            $array[$key] = $value;
            return true;
        } else {
            $array[$key] = $default;
            return false;
        }
    }
protected function addEmpty(array &$array, $key, $value, $default = '')
    {
        if (!empty($value)) {
            $array[$key] = $value;
            return true;
        } else {
            $array[$key] = $default;
            return false;
        }
    }
protected function addEmpty ( array & $ array , $ key , $ value , $ default = '' ) { if ( ! empty ( $ value ) ) { $ array [ $ key ] = $ value ; return true ; } else { $ array [ $ key ] = $ default ; return false ; } }
Helper method to add a value to an array even if it is empty.

@param array $array
@param string $key
@param mixed $value
@param mixed $default

@return bool
True if the value was not empty and thus has been added, false if the
default has been added.
Helper method to add a value to an array even if it is empty .