A question about PSR-12

48 views
Skip to first unread message

Memo Chou

unread,
Sep 22, 2019, 11:47:19 AM9/22/19
to PHP Framework Interoperability Group
Hi, everyone!

This is a part of PSR-12.

Can anybody tell me why use pipeline here? Is it should be an "or"(||)?

OtherThrowableType | AnotherThrowableType

Thanks!

螢幕快照 2019-09-22 下午11.45.00.png


Chuck Burgess

unread,
Sep 22, 2019, 11:49:16 AM9/22/19
to php...@googlegroups.com
That's not a pipeline from code... it's only an OR delimiter in the pseudo code of documenting.
CRB

--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/3ad8cf97-5a9a-4529-b4ee-06be47177e18%40googlegroups.com.

Korvin Szanto

unread,
Sep 22, 2019, 12:32:32 PM9/22/19
to php...@googlegroups.com
PHP 7.1 added exception multicatch using a single pipe operator, so no we wouldn't want to use an OR operator here

Chuck Burgess

unread,
Sep 22, 2019, 12:43:12 PM9/22/19
to php...@googlegroups.com
Ah, then I was way off... I thought this was about union typing in a docblock 🤦‍♂️

Reply all
Reply to author
Forward
0 new messages