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

PHPCSStandards / PHP_CodeSniffer / 13822886692
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: catch-per-3.0
DEFAULT BRANCH: master
Ran 12 Mar 2025 10:38PM UTC
Jobs 8
Files 262
Run time 1min
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: 77.421%. Remained the same
13822886692

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.

19191 of 24788 relevant lines covered (77.42%)

76.9 hits per line

Jobs
ID Job ID Ran Files Coverage
1 cbf-os-ubuntu-latest-ubuntu-latest-php-7.2-custom-ini-false - 13822886692.1 12 Mar 2025 10:43PM UTC 262
0.81
GitHub Action Run
2 cbf-os-ubuntu-latest-ubuntu-latest-php-8.4-custom-ini-false - 13822886692.2 12 Mar 2025 10:41PM UTC 262
1.89
GitHub Action Run
3 os-windows-latest-php-7.2-custom-ini-false - 13822886692.3 12 Mar 2025 10:38PM UTC 262
2.06
GitHub Action Run
4 os-ubuntu-latest-php-7.2-custom-ini-false - 13822886692.4 12 Mar 2025 10:43PM UTC 262
73.74
GitHub Action Run
5 os-ubuntu-latest-php-8.4-custom-ini-false - 13822886692.5 12 Mar 2025 10:41PM UTC 262
75.92
GitHub Action Run
6 os-windows-latest-php-8.4-custom-ini-false - 13822886692.6 12 Mar 2025 10:39PM UTC 262
2.6
GitHub Action Run
7 os-ubuntu-latest-php-8.1-custom-ini-true - 13822886692.7 12 Mar 2025 10:42PM UTC 262
75.94
GitHub Action Run
8 cbf-os-ubuntu-latest-ubuntu-latest-php-8.1-custom-ini-true - 13822886692.8 12 Mar 2025 10:42PM UTC 262
1.9
GitHub Action Run
Source Files on build 13822886692
  • Tree
  • List 262
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #13822886692
  • 170bb731 on github
  • Prev Build on 4.0 (#13776315911)
  • Next Build on 4.0 (#13823399634)
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