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

PHPCSStandards / PHP_CodeSniffer / 13381613036
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: 4.x
DEFAULT BRANCH: master
Ran 18 Feb 2025 01:50AM 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

18 Feb 2025 01:49AM UTC coverage: 77.327%. Remained the same
13381613036

push

github

jrfnl
PEAR/FunctionDeclaration: prevent fixer conflict for unfinished closures/live coding

The `PEAR.Functions.FunctionDeclaration` sniff contained code to protect against a fixer conflict for unfinished closures, however, this code did not work correctly as an unfinished closure will generally also not have a function body, which "undoes" the protection via the scope opener check.

In other words, the fixer conflict still existed and would result in one part of the sniff trying to _add_ a space between the `function` keyword and the open parenthesis, while another part of the sniff would be removing that space again.

```
        => Fixing file: 1/1 violations remaining
        PEAR.Functions.FunctionDeclaration:124 replaced token 11 (T_WHITESPACE on line 7) " (" => "("
        => Fixing file: 1/1 violations remaining [made 1 pass]...
        * fixed 1 violations, starting loop 2 *
        PEAR.Functions.FunctionDeclaration:94 replaced token 10 (T_FUNCTION on line 7) "function" => "function "
        => Fixing file: 1/1 violations remaining [made 2 passes]...
        * fixed 1 violations, starting loop 3 *
        PEAR.Functions.FunctionDeclaration:124 replaced token 11 (T_WHITESPACE on line 7) " (" => "("
        => Fixing file: 1/1 violations remaining [made 3 passes]...
        * fixed 1 violations, starting loop 4 *
        PEAR.Functions.FunctionDeclaration:94 replaced token 10 (T_FUNCTION on line 7) "function" => "function "
        => Fixing file: 1/1 violations remaining [made 4 passes]...
        * fixed 1 violations, starting loop 5 *
```

Fixed now by verifying if the function is named instead. That way we can be sure it's not a closure.

Includes test.

Builds on the previously pulled fix from PR 816.

Related to #152

2 of 2 new or added lines in 1 file covered. (100.0%)

19181 of 24805 relevant lines covered (77.33%)

76.74 hits per line

Jobs
ID Job ID Ran Files Coverage
1 os-windows-latest-php-8.4-custom-ini-false - 13381613036.1 18 Feb 2025 01:51AM UTC 262
2.77
GitHub Action Run
2 cbf-os-ubuntu-latest-ubuntu-latest-php-8.4-custom-ini-false - 13381613036.2 18 Feb 2025 01:54AM UTC 262
1.89
GitHub Action Run
3 cbf-os-ubuntu-latest-ubuntu-latest-php-8.1-custom-ini-true - 13381613036.3 18 Feb 2025 01:54AM UTC 262
1.9
GitHub Action Run
4 os-windows-latest-php-7.2-custom-ini-false - 13381613036.4 18 Feb 2025 01:50AM UTC 262
2.21
GitHub Action Run
5 os-ubuntu-latest-php-7.2-custom-ini-false - 13381613036.5 18 Feb 2025 01:56AM UTC 262
73.66
GitHub Action Run
6 cbf-os-ubuntu-latest-ubuntu-latest-php-7.2-custom-ini-false - 13381613036.6 18 Feb 2025 01:56AM UTC 262
0.81
GitHub Action Run
7 os-ubuntu-latest-php-8.1-custom-ini-true - 13381613036.7 18 Feb 2025 01:54AM UTC 262
75.84
GitHub Action Run
8 os-ubuntu-latest-php-8.4-custom-ini-false - 13381613036.8 18 Feb 2025 01:54AM UTC 262
75.83
GitHub Action Run
Source Files on build 13381613036
  • Tree
  • List 262
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #13381613036
  • e8abd9fc on github
  • Prev Build on 4.0 (#13349728482)
  • Next Build on 4.0 (#13382066417)
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