Replaced short array syntax usages with traditional array syntax#411
Replaced short array syntax usages with traditional array syntax#411aik099 merged 1 commit intominkphp:masterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #411 +/- ##
=========================================
Coverage 86.07% 86.07%
Complexity 184 184
=========================================
Files 1 1
Lines 510 510
=========================================
Hits 439 439
Misses 71 71 ☔ View full report in Codecov by Sentry. |
uuf6429
left a comment
There was a problem hiding this comment.
I'm not a fan of this change since:
- in my eyes, it's a downgrade
- it still isn't the proper way of telling devs what kind of coding style is allowed
- it would have been automated and more future-proof if done through PHP-CS-Fixer (or similar)
In practices, since it's harmless, I'm fine with approving it.
Syntax is syntax. Use whichever that works but be consistent throughout the codebase. This wasn't the case, hence this PR. Anyway this PR is a transient step (as I've probably mentioned elsewhere) to keep syntax consistent. In another PR you can perform system-wide (driver code & driver tests) syntax change to short array declaration (you can use tools shown in the PR description).
Completely agree. I'm open to suggestions. Please create an issue where we can discuss our options. We can later apply same concepts to the In an ideal world:
What we have now:
. |
The short array syntax was accidentally introduced in the #407.
If there is a need, then we can mass-convert driver code to use short array syntax (e.g. using PHP_CodeSniffer rule or PhpStorm inspection).