Re: Reformat method synopsis whitespaces

Kamil Tekiela <[email protected]>
Newsgroups gmane.comp.php.documentation.general
Message-ID <CAGBsUrfE4ENQ-7ccH2ONYr7z6_6EzKabT0FZVtwMuXLZdhC9_A@mail.gmail.com>
Hi Mate,

This looks better, but I have to say that personally, I hate wasting
vertical space. If there was a way to keep the synopsis horizontal I
would prefer that.
I see that with PHP 8, this has become a problem. Other languages usually
have shorter names or fewer parameters. There are some docs that wrap
around to the second line e.g.
https://numpy.org/doc/stable/reference/generated/numpy.isfinite.html#numpy.isfinite

With PHP 8, we are going to see multi-line synopsis more and more. We have
to do something about it and I think this solution is ok.

Regarding the formatting, I love it. It's what I am used to seeing in my
own code from automatic formatting.

Regards,
Kamil

On Tue, 1 Jun 2021 at 22:23, Máté Kocsis <[email protected]> wrote:

> Hi Kamil,
>
> There's an example for 0 parameters in the PR (
> https://user-images.githubusercontent.com/6057627/120331916-8c7ded00-c2ee-11eb-9c2b-65fb2dc96449.png
> ),
> and my implementation doesn't special-case functions/methods with a single
> parameter, so these parameters also end up on a new line.
>
> Regards:
> Máté
>
> Kamil Tekiela <[email protected]> ezt írta (időpont: 2021. jún. 1., K,
> 18:49):
>
>> Hi Mate,
>>
>> What would it look like on a signature with none or a single parameter?
>>
>> Regards,
>> Kamil
>>
>> On Tue, 1 Jun 2021 at 17:14, Máté Kocsis <[email protected]> wrote:
>>
>>> Hi Everyone,
>>>
>>> I'm looking for feedback with regard to my PR which reformats method
>>> synopses (https://github.com/php/phd/pull/38):
>>>
>>> Currently, we display function/method signatures without any line
>>> breaks, but with a lot of unnecessary spaces between parameters, as well as
>>> around the parameter list. See an example here:
>>> https://pasteboard.co/K4BXRuv.png
>>>
>>> My PR would add a line break for each parameter as well as remove any
>>> other unnecessary whitespaces. See https://pasteboard.co/K4BZNN9.png for
>>> example (but the linked PR has a few more images attached).
>>>
>>> I'm curious if anybody sees any issue with the new formatting? Class
>>> synopses look a bit weird, but I don't think it's worse than what we
>>> currently have.
>>>
>>> Regards:
>>> Máté
>>>
>>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.