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

FriendsOfPHP / PHP-CS-Fixer / 15080
93%

Build:
DEFAULT BRANCH: master
Ran 10 May 2018 06:12PM UTC
Jobs 1
Files 351
Run time 17s
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
15080

cron

travis-ci

keradus
feature #3709 Add SetTypeToCastFixer (SpacePossum)

This PR was squashed before being merged into the 2.12-dev branch (closes #3709).

Discussion
----------

Add SetTypeToCastFixer

```
$ php php-cs-fixer describe set_type_to_cast
Description of set_type_to_cast rule.
Cast shall be used, not `settype`.

Fixer applying this rule is risky.
Risky when the `settype` function is overridden.

Fixing examples:
 * Example #1.
   ---------- begin diff ----------
   --- Original
   +++ New
   @@ -1,3 +1,3 @@
    <?php
   -settype($foo, "integer");
   -settype($bar, "string");
   -settype($bar, "null");
   +$foo = (int) $foo;
   +$bar = (string) $bar;
   +$bar = null;

   ----------- end diff -----------
```

might require some priority tweaking with other rules

Commits
-------

997d997d Add SetTypeToCastFixer

10591 of 13041 relevant lines covered (81.21%)

34.08 hits per line

Jobs
ID Job ID Ran Files Coverage
5 15080.5 (COLLECT_COVERAGE=1) 10 May 2018 06:04PM UTC 0
81.21
Travis Job 15080.5
Source Files on build 15080
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #15080
  • 2991ea57 on github
  • Prev Build on master (#15067)
  • Next Build on master (#15089)
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