php-fig / per-coding-style

PER coding style
259 stars 26 forks source link

Expand Properties and Constants on constants where it makes sense #72

Closed samdark closed 1 year ago

Crell commented 1 year ago

Should we go further and apply the same to enum cases?

Edit: Wait, no, we didn't bother making them compacted because no one uses that style. Ignore me. 😄

KorvinSzanto commented 1 year ago

This makes sense to me. I also think it makes sense to expand the underscore is meaningless directive to include all constructs including variables and enum cases and anything else anyway.

Crell commented 1 year ago

That makes sense. @samdark, can you expand the wording a bit?

samdark commented 1 year ago

@Crell

  1. The section is "4.3 Properties and Constants" so variables and other constructs do not fit there.
  2. Underscore is typically used in foreach ($items as $key => $_item) to indicate that only key is needed.
Crell commented 1 year ago

Valid. OK, let's proceed here.