Hi Vinor,
I'm of the mind that having the closing parenthesis not indented provides
enough of a visual break.
That said the current PSR-12 spec allows for new lines after your opening
bracket in your function declaration so your last example is completely
valid.

Best wishes,
Korvin

On Wed, Sep 27, 2017 at 12:33 AM Vinor cola <[email protected]> wrote:

> Hello,
>
> I'd like to argue against this syntax:
>
> function (
>     string $foo,
>     string $bar,
>     int $baz
> ): string {
>     echo 'foo';
> }
>
> It make code not easily readable since you cannot efficiently separate
> arguments from function body: there is no clear separate between them, and
> the whole function looks like a signle block. Instead, I'd propose:
>
> function (
>     string $foo,
>     string $bar,
>     int $baz
> ): string
> {
>     echo 'foo';
> }
>
>
> or
>
> function (
>     string $foo,
>     string $bar,
>     int $baz
> ): string {
>
>     echo 'foo';
> }
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "PHP Framework Interoperability Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/php-fig/98bc7ef8-33e2-4c0b-b68f-b5b7b39284be%40googlegroups.com
> <https://groups.google.com/d/msgid/php-fig/98bc7ef8-33e2-4c0b-b68f-b5b7b39284be%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/CANeXGWWMXiQKCjPrUJLcqHOc2OdWUwTwwWanUUPvaDH_5B2jCg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to