I've updated the code to use [] instead of array(). I added things like commas on the last key value pair in an array. This is per Drupal coding standards.

I fixed a few typos, formatted the comments per Drupal coding standards, and hopefully made the comments a bit easier to read.

I added new TranslatableMarkup() to the titles instead of going back to t(). I'm not sure why t() had been removed.

Now the code should be easier to read. At least it will be for me.

Comments

esod created an issue. See original summary.

esod’s picture

Assigned: esod » Unassigned
StatusFileSize
new31.04 KB

This patch applies successfully on the 8.x-1.x branch. This patch does not apply successfully on tag 8.x-1.14. I'm going to try and have a look at that issue next.

esod’s picture

Issue summary: View changes
esod’s picture

I see there is some overlap with Correct text in info.yml(s) on the edits I've made to the info.yml files. I can remove those edits if you like.

esod’s picture

StatusFileSize
new33.84 KB
new68.38 KB

This patch applies cleanly to 8x-1.14. I kept new TranslatableMarkup() for title.

esod’s picture

esod’s picture

Version: 8.x-1.14 » 8.x-1.x-dev
StatusFileSize
new31.04 KB

Again, I got confused with Drupal's patching system. This patch applies cleanly with the 8.x-1.x branch.

esod’s picture

StatusFileSize
new29.23 KB

I took out my changes to info.yml so there wouldn't be a merge conflict with Correct text in info.yml(s).

I changed new TranslatableMarkup() to t(). I'd like to start using new TranslatableMarkup() but I'm not sure about it and this ticket is just about coding standards anyway.

If we can get Fix Automated Tests merged in as soon as it passes testing, that will help to move the patches along.

esod’s picture

StatusFileSize
new25.29 KB

I rerolled the patch excluding the coding standards changes in AdminToolbarToolsAlterTest. I fix the coding standards in Fix Automated Tests. Thanks.

esod’s picture

damienmckenna’s picture

Title: Update code per Drupal coding standards. » Use short array syntax
Status: Active » Needs review

Thanks for working on that. Don't forget to set the status to "needs review" after you upload a patch.

damienmckenna’s picture

Status: Needs review » Needs work

The patch needs to be rerolled.

keenegan’s picture

Status: Needs work » Needs review
StatusFileSize
new30.31 KB

Reroll patch

romainj’s picture

Thanks for the patch.

  • romainj committed dc5e9ca on 8.x-1.x authored by Keenegan
    Issue #2706643 by esod, Keenegan, DamienMcKenna, romainj: Use short...
romainj’s picture

Patch #13 in latest dev version. Thanks to all.

romainj’s picture

StatusFileSize
new30.31 KB

Sorry but it is no more working so I had to make a new patch cancelling #13.

  • romainj committed 70c7cb8 on 8.x-1.x
    Issue #2706643 by esod, romainj, Keenegan, DamienMcKenna: Use short...
romainj’s picture

Patch #17 applied to latest dev version.

romainj’s picture

StatusFileSize
new27.42 KB

New patch.

  • romainj committed 2e3e77e on 8.x-1.x
    Issue #2706643 by esod, romainj, Keenegan, DamienMcKenna: Use short...
romainj’s picture

Patch #20 commited in latest dev branch.

romainj’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.