public function getUsage(
        $showRequiredFirst = true,
        $customBinary = null,
        $customScript = null
    ) {
        $fullUsage = '';

        if ($customBinary == null) {
            $fullUsage = 'php ';
        } else {
            $fullUsage = $customBinary.' ';
        }

        if ($customScript == null) {
            $fullUsage .= basename($_SERVER['SCRIPT_NAME']).' ';
        } else {
            $fullUsage .= $customScript.' ';
        }

        foreach ($this->prefixes as $prefix => $parameters) {
            if ($showRequiredFirst) {
                usort($parameters, function ($p1, $p2) {
                    if ($p1->required && $p2->required) {
                        return 0;
                    }

                    if ($p1->required && ! $p2->required) {
                        return -1;
                    }

                    if ($p2->required && ! $p1->required) {
                        return 1;
                    }
                });
            }

            foreach ($parameters as $parameter) {
                if ($parameter->parent == null) {
                    $fullUsage .= $parameter->getUsage().' ';
                }
            }
        }

        return $fullUsage;
    }