Does PER 3.0 has an issue with "very complex" example in section 2.5?
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 35/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- php
- Domain
- documentation
Research direction
Compare the “very complex” example in section 2.5 with the multiline argument formatting described in section 4.5. Confirm the intended formatting with the surrounding examples and discussion; done means section 2.5 uses the agreed consistent example.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- No language data
- Stars
- 284
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from php-fig/per-coding-style
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
php-fig/per-coding-style#154 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
php-fig/per-coding-style#149 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
php-fig/per-coding-style#119 · 8 comments ·
All issues in php-fig/per-coding-style
Similar issues
-
sync-en
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100