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

FriendsOfPHP / PHP-CS-Fixer / 19178 / 7
93%
master: 93%

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

02 Nov 2019 04:41PM UTC coverage: 92.151% (+0.04%) from 92.109%
COLLECT_COVERAGE=1

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

Source Files on job 19178.7 (COLLECT_COVERAGE=1)
  • Tree
  • List 0
  • Changed 24
  • Source Changed 1
  • Coverage Changed 24
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 15028
  • Travis Job 19178.7
  • cb857917 on github
  • Prev Job for COLLECT_COVERAGE=1 on master (#19169.7)
  • Next Job for COLLECT_COVERAGE=1 on master (#19193.7)
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