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

FriendsOfPHP / PHP-CS-Fixer / 15464
93%

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

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

Jobs
ID Job ID Ran Files Coverage
6 15464.6 (COLLECT_COVERAGE=1) 01 Jun 2018 11:56AM UTC 0
80.8
Travis Job 15464.6
Source Files on build 15464
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #15464
  • 1bf708d4 on github
  • Prev Build on master (#15436)
  • Next Build on master (#15467)
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