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

FriendsOfPHP / PHP-CS-Fixer / 15464 / 6
93%
master: 93%

Build:
DEFAULT BRANCH: master
Ran 01 Jun 2018 12:03PM UTC
Files 363
Run time 27s
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

01 Jun 2018 11:35AM UTC coverage: 80.805% (+0.03%) from 80.777%
COLLECT_COVERAGE=1

push

travis-ci

keradus
feature #3640 Add PhpdocToReturnTypeFixer (Slamdunk, keradus)

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

Discussion
----------

Add PhpdocToReturnTypeFixer

```diff
 /**
  * @return \My\Bar
  */
-function my_foo()
+function my_foo(): \My\Bar
 {}
```

- [x] Mark as *risky*
- [x] Require ^7.0
- [x] Fix ^7.1 [*void return*, *iterable*]
- [x] Fix ^7.2 [*object type*]
- [x] Fix ^7.1 [*nullable types*]
- [x] Config to fix scalar types, default to **false** because of unexpected results if *stryct_types* are enabled or not
- [x] `@return static` => `: self`
- [x] ~Config to overwrite existing mismatching types: PHPDoc wins~ can't do this, because `FunctionNotation\ReturnTypeDeclarationFixer` changes the output of this fixer
- [x] Ignore mixed types
- [x] Ignore [generics](https://wiki.php.net/rfc/generics) and array of types
- [x] Run before `FunctionNotation\ReturnTypeDeclarationFixer` #2207
- [x] Run before `Import\FullyQualifiedStrictTypesFixer` #3276
- [x] Run ~before~ integration test with `FunctionNotation\VoidReturnFixer` #2740
- [x] Run after `Phpdoc\PhpdocScalarFixer`

Suggestions for the name of the fixer are welcome.

Commits
-------

d7a409c1 Add PhpdocToReturnTypeFixer

11248 of 13920 relevant lines covered (80.8%)

34.02 hits per line

Source Files on job 15464.6 (COLLECT_COVERAGE=1)
  • Tree
  • List 0
  • Changed 4
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 14390
  • Travis Job 15464.6
  • 1bf708d4 on github
  • Prev Job for COLLECT_COVERAGE=1 on master (#15436.6)
  • Next Job for COLLECT_COVERAGE=1 on master (#15467.6)
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