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

FriendsOfPHP / PHP-CS-Fixer / 19178
93%

Build:
DEFAULT BRANCH: master
Ran 02 Nov 2019 05:05PM UTC
Jobs 1
Files 395
Run time 23s
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
19178

push

travis-ci

keradus
feature #3928 Add FinalPublicMethodForAbstractClassFixer (Slamdunk)

This PR was merged into the 2.16-dev branch.

Discussion
----------

Add FinalPublicMethodForAbstractClassFixer

```diff
 abstract class AbstractMachine
 {
-    public function start()
+    final public function start()
     {}
 }
```

#### No exception and no configuration are intentional

If you want to override a method, use the [Template method pattern](https://en.wikipedia.org/wiki/Template_method_pattern).

This fixer enforces API encapsulation in an inheritance environment.

I left out magic methods:

1. Because some of them are not API
1. And the rest have issues with SPL releated array classes etc

Further reading: [When to declare methods final](https://slamdunk.github.io/blog/when-to-declare-methods-final/)

Commits
-------

19f823c6 Add FinalPublicMethodForAbstractClassFixer

15415 of 16728 relevant lines covered (92.15%)

61.95 hits per line

Jobs
ID Job ID Ran Files Coverage
7 19178.7 (COLLECT_COVERAGE=1) 02 Nov 2019 05:03PM UTC 0
92.15
Travis Job 19178.7
Source Files on build 19178
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #19178
  • cb857917 on github
  • Prev Build on master (#19169)
  • Next Build on master (#19193)
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