Closed (won't fix)
Project:
Drupal core
Version:
8.1.x-dev
Component:
database system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2016 at 09:33 UTC
Updated:
8 Jul 2016 at 02:08 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
IRuslan commentedComment #3
IRuslan commentedPatch in the attachment.
Comment #4
IRuslan commentedAlso noted same problem in core/modules/locale/src/PluralFormula.php.
Patch is updated.
Comment #6
IRuslan commentedComment #8
daffie commentedThe preferred way in Drupal for describing an array is with square brackets. So I am closing this issue.
@IRuslan: Thank you for your effort.
Comment #9
IRuslan commentedActually, I disagree.
If we search within core '@return []' - only usages from ConnectionTest.php will be found, while if you will search for '@return array' there are more than 1000 usages.
As a result, whole Core code written in '@return array' manner instead of '@return []'.
Comment #10
daffie commented@IRuslan: From the https://www.drupal.org/coding-standards/docs#types. I read the following:
So it used to be "array" and now squared brackets are preferred. Both are good. If you agree, we can close this issue.
Comment #11
IRuslan commentedOk, thanks for the link.
I just wanted to be consistent in Core:)
But I think there are a lot of more important issues to review.