• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PHPCSStandards / PHP_CodeSniffer / 13822886692 / 3
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: catch-per-3.0
DEFAULT BRANCH: master
Ran 12 Mar 2025 10:43PM UTC
Files 262
Run time 11s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Mar 2025 10:35PM UTC coverage: 2.057%. Remained the same
13822886692.3

push

github

jrfnl
Ruleset: bug fix - correctly handle empty array property setting

While already handled correctly for inline properties set via `phpcs:set`, setting a property to an empty array from a ruleset file was not handled correctly until now.

As things were, when setting an array property from the ruleset to an empty array like so:
```xml
    <rule ref="Standard.Category.SniffName">
        <properties>
            <property name="arrayProperty" type="array"/>
        </properties>
    </rule>
```

 the property value would be set to:
```php
public $arrayProperty = [
    0 => '',
];
```
... while the expected behaviour would be:
```php
public $arrayProperty = [];
```

While it is not expected that this type of property setting is encountered a lot in the wild, it should still work correctly.

Fixed now.

Includes test safeguarding the fix.

627 of 30477 relevant lines covered (2.06%)

0.23 hits per line

Source Files on job os-windows-latest-php-7.2-custom-ini-false - 13822886692.3
  • Tree
  • List 262
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 13822886692
  • 170bb731 on github
  • Prev Job for on 4.0 (#13776315911.4)
  • Next Job for on 4.0 (#13823399634.8)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc