Skip to content

Closes #973 Use short array syntax#995

Merged
remyperona merged 2 commits intodevelopfrom
chore/973-cs-array
Dec 19, 2025
Merged

Closes #973 Use short array syntax#995
remyperona merged 2 commits intodevelopfrom
chore/973-cs-array

Conversation

@remyperona
Copy link
Copy Markdown
Contributor

Description

Fixes #973

Type of change

  • Chore

Detailed scenario

What was tested

n/a

How to test

n/a

Technical description

Documentation

  • Disallow long array syntax in PHPCS
  • Replace long array by short array syntax

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.

@remyperona remyperona requested a review from Copilot July 28, 2025 18:43
@remyperona remyperona self-assigned this Jul 28, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the codebase by replacing the deprecated long array syntax array() with the modern short array syntax [] and updates PHPCS configuration to enforce this practice. The change improves code readability and consistency while aligning with modern PHP standards.

  • Updates PHPCS configuration to disallow long array syntax
  • Systematically replaces array() with [] throughout the codebase
  • Modernizes array initialization and parameter passing

Reviewed Changes

Copilot reviewed 41 out of 42 changed files in this pull request and generated no comments.

File Description
phpcs.xml Adds rule to disallow long array syntax
Multiple PHP files Converts array declarations from array() to [] syntax

@codacy-production
Copy link
Copy Markdown

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -0.10%) 0.00% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (547abdd) 14270 48 0.34%
Head commit (8708078) 14270 (+0) 48 (+0) 0.34% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#995) 272 0 0.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@remyperona remyperona added this pull request to the merge queue Dec 19, 2025
Merged via the queue into develop with commit a5acacb Dec 19, 2025
11 of 12 checks passed
@remyperona remyperona deleted the chore/973-cs-array branch December 19, 2025 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Coding Standards: replace long array syntax by short array syntax

2 participants