Hey, everyone!
Just noticed the way how "very complex" example is being put in 2.5:
I would think it is a little bit illogical, because it violates of how we're formatting multiline arguments for functions, see 4.5:
Another example is the same 2.5 section:
function somethingWithReflection(
\ReflectionObject
|\ReflectionClass
|\ReflectionMethod
|\ReflectionParameter
|\ReflectionProperty $reflect
): object|null {
// ...
}
That's why I suspect it is just a typo, and correct example for "veryComplex" would be:
function veryComplex(
array
|(ArrayAccess&Traversable)
|(Traversable&Countable) $input
): ArrayAccess&Traversable {
// ...
}
WDYT about it?
Feel free to ask me to create PR if my assumptions are correct π
Best regards