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

FriendsOfPHP / PHP-CS-Fixer / 2613 / 2
84%
master: 93%

Build:
Build:
LAST BUILD BRANCH: phpdocAlignFixer
DEFAULT BRANCH: master
Ran 25 Feb 2015 03:24PM UTC
Files 111
Run time 13s
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

25 Feb 2015 03:13PM UTC coverage: 81.721% (+0.03%) from 81.69%
2613.2

push

travis-ci

keradus
bug #1020 BracesFixer - fix missing braces for nested if elseif else (malengrin)

This PR was submitted for the 1.6 branch but it was merged into the 1.5 branch instead (closes #1020).

Discussion
----------

BracesFixer - fix missing braces for nested if elseif else

Hi,

```php
if (true)
    if (false)
        echo 1;
    elseif (false)
        echo 2;
    else
        echo 3;
```
is currently rewritten as:

```php
if (true) {
    if (false) {
        echo 1;
    } elseif (false) {
        echo 2;
    }
} else {
        echo 3;
    }
```

Braces are misplaced, it should be:

```php
if (true) {
    if (false) {
        echo 1;
    } elseif (false) {
        echo 2;
    } else {
        echo 3;
    }
}
```

I've tried to fix this issue in this pull request.

Commits
-------

477c331 BracesFixer - fix missing braces for nested if elseif else

3210 of 3928 relevant lines covered (81.72%)

47.8 hits per line

Source Files on job 2613.2
  • Tree
  • List 0
  • Changed 12
  • Source Changed 1
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 2613
  • Travis Job 2613.2
  • f0cb3745 on github
  • Prev Job for on 1.5 (#2612.2)
  • Next Job for on 1.5 (#2617.4)
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