Comments

akshay_d created an issue. See original summary.

akshay_d’s picture

Status: Active » Needs review
StatusFileSize
new11.04 KB

The short array syntax is used for the Following
src/Form/PathautoBulkUpdateForm.php
src/Form/PathautoSettingsForm.php
src/Form/PatternEnableForm.php

bnjmnm’s picture

Status: Needs review » Needs work
StatusFileSize
new61.57 KB

I found several dozen additional instances that need to be converted to short array syntax. The PHP Code sniffer report is attached - additional code standard violations are listed but you can focus on the Short array syntax must be used to define arrays ones.

Also want to make sure you're aware of this if you aren't already https://www.drupal.org/docs/8/modules/code-review-module/installing-code.... Once you have this installed, you can generate reports such as the one attached, and quickly identify areas that need code standards fixes.

akshay_d’s picture

Thanks for the inputs I will fix rest short array syntax soon.

akshay_d’s picture

Status: Needs work » Needs review
StatusFileSize
new103.49 KB

Fixed the Short array syntax Coding standards

Status: Needs review » Needs work

The last submitted patch, 5: Short_array_syntax_used-3029311-5.patch, failed testing. View results

akshay_d’s picture

Status: Needs work » Needs review
StatusFileSize
new103.94 KB

Consider the last patch Updated all the changes

Status: Needs review » Needs work

The last submitted patch, 7: Short_array_syntax_used-3029311-6.patch, failed testing. View results

akshay_d’s picture

Status: Needs work » Needs review
StatusFileSize
new103.94 KB

fixed Short array syntax

Status: Needs review » Needs work

The last submitted patch, 9: Short_array_syntax_used-3029311-9.patch, failed testing. View results

bnjmnm’s picture

A local code sniffer would catch these errors so you can confirm a patch works before uploading it here. Drupal Slack can be a good place to get assistance if you're having trouble getting the steps in the Code sniffer guide to work.

You'll eventually want to get testing set up on your local environment as well. The initial setup is a bit of work and probably not necessary for this specific task, but will make contributing to future issues much easier.

akshay_d’s picture

Status: Needs work » Needs review
StatusFileSize
new104.57 KB

Fixed Short array syntax

akshay_d’s picture

Please Review

berdir’s picture

Status: Needs review » Fixed

Thanks. Found one more and fixed that too.

I fear you did that by hand. You might want to know that there are scripts for that, see how core did it: #2776975: March 3, 2017: Convert core to array syntax coding standards for Drupal 8.3.x RC phase

  • Berdir committed 1737dff on 8.x-1.x authored by akshay_d
    Issue #3029311 by akshay_d, bnjmnm, Berdir: Use short array syntax
    

Status: Fixed » Closed (fixed)

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