I'd keep it not intended. Static call isn't considered "part of the chain".

On Mon, Jul 22, 2024 at 9:46 AM Rik van der Heijden <
m...@rikvanderheijden.com> wrote:

> Hi all,
>
> I'm currently working on implementing PER Coding Style 2.0 for PHP
> CodeSniffer, and I'm facing some ambiguity in the specification.
>
> There is a section on method chaining. But what if the first called method
> is a static call to a class. It is not outlined if the static call should
> be indented or not.
>
> Like this:
>
> MyClass::getInstance()
>     ->foo()
>     ->bar();
>
> Or this:
>
> MyClass
>     ::getInstance()
>     ->foo()
>     ->bar();
>
> This is ambigious in the specification currently since it does not outline
> whether a static call is considered 'part of the chain' or not.
>
> Also, hello, my name is Rik and I'm new here. I'm in the PHP 'world' for
> +- 20y. I might have more questions/suggestions as I'm plowing through it.
>
> Kind regards,
>
> Rik
>
> --
> 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 php-fig+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/php-fig/4651e1cc-2789-4d78-b602-2fe44895e123n%40googlegroups.com
> <https://groups.google.com/d/msgid/php-fig/4651e1cc-2789-4d78-b602-2fe44895e123n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 php-fig+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/CA%2BFA5VV-StD4HZ918-j8D0hveEYwo7tDVmP6K5%3Dk%3DdyvGEjqow%40mail.gmail.com.

Reply via email to