public function renderDocParams()

in util/Endpoint.php [436:471]


    public function renderDocParams(): string
    {
        $space = $this->getMaxLengthBodyPartsParams();

        $result = "\n    /**\n";
        if (isset($this->content['documentation']['description'])) {
            $result .= sprintf("     * %s\n", str_replace("\n", '', $this->content['documentation']['description']));
            $result .= "     *\n";
        }
        $result .= $this->extractPartsDescription($space);
        $result .= $this->extractParamsDescription($space);
        $result .= $this->extractBodyDescription($space);
        $result .= "     *\n";
        $result .= "     * @param array \$params Associative array of parameters\n";
        $result .= sprintf("     * @return %s\n", $this->getMethod() === ['HEAD'] ? 'bool' : 'array');

        if (isset($this->content['documentation']['url'])) {
            $result .= "     * @see {$this->content['documentation']['url']}\n";
        }
        if ($this->content['stability'] !== 'stable') {
            switch ($this->content['stability']) {
                case 'experimental':
                    $note = 'This API is EXPERIMENTAL and may be changed or removed completely in a future release';
                    break;
                case 'beta':
                    $note = 'This API is BETA and may change in ways that are not backwards compatible';
                    break;
            }
            if (isset($note)) {
                $result .= sprintf("     *\n     * @note %s\n     *\n", $note);
            }
        }
        $result .= "     */";

        return $result;
    }