Skip to content

Does PER 3.0 has an issue with "very complex" example in section 2.5?Β #131

@levdovlatov

Description

@levdovlatov

Hey, everyone!

Just noticed the way how "very complex" example is being put in 2.5:

Image

I would think it is a little bit illogical, because it violates of how we're formatting multiline arguments for functions, see 4.5:

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions