PHP Equivalent of Java's @Override When Implementing Interface (For check style) -
phpcs complaining php doc implementations of interfaces have php doc provided in interface.
my question is, how cleanly phpcs ignore interface method implementations, similar java's @override?
below example of how in java , have in php. goal able ignore methods interfaces have php doc. if method not implementation, should still required have php doc provided.
how works in java
in java, can have interface so:
public interface sandbox { /** * description of method. */ void somemethod(); } and class implements so:
public class sandboximpl implements sandbox { @override public void somemethod() { // concrete implementaiton. } } with above, java picks java doc without issues , @override helps past check style checks.
what have in php
in php, have interface like:
interface sandbox { /** * php doc. * * @return mixed */ public function somemethod(); } with class implements like:
class sandboximpl implements sandbox { public function somemethod() { // todo: implement somemethod() method. } }
Comments
Post a Comment