All public
methods of abstract
classes should be final
.
Enforce API encapsulation in an inheritance architecture. If you want to override a method, use the Template method pattern.
Warning
Using this rule is risky.
Risky when overriding public
methods of abstract
classes.
--- Original
+++ New
<?php
abstract class AbstractMachine
{
- public function start()
+ final public function start()
{}
}