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

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

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

pending completion
2613

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

3451 of 4158 relevant lines covered (83.0%)

189.28 hits per line

Jobs
ID Job ID Ran Files Coverage
1 2613.1 25 Feb 2015 03:21PM UTC 0
81.49
Travis Job 2613.1
2 2613.2 25 Feb 2015 03:22PM UTC 0
81.72
Travis Job 2613.2
3 2613.3 25 Feb 2015 03:25PM UTC 0
81.87
Travis Job 2613.3
4 2613.4 25 Feb 2015 03:25PM UTC 0
81.87
Travis Job 2613.4
5 2613.5 25 Feb 2015 03:26PM UTC 0
74.22
Travis Job 2613.5
Source Files on build 2613
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2613
  • f0cb3745 on github
  • Prev Build on 1.5 (#2612)
  • Next Build on 1.5 (#2617)
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