protected static function swapArgs(&$optional, &$swap, $default = null, $swap_required = true)
    {
        $is_swapped = false;
        if (empty($swap) && !empty($optional)) {
            $swap       = $optional;
            $optional   = $default;
            $is_swapped = true;
        }
        if ($swap_required && !$swap) {
            if (is_string($swap_required)) {
                $message = "Argument '{$swap_required}' is required.";
            } else {
                $message = "Missing argument.";
            }
            throw new Exceptions\InvalidArgumentException($message);
        }
        
        return $is_swapped;
    }