PHPCS
is complaining about php doc
for implementations of interfaces that already have the php doc
provided in the interface.
My question is, how do I cleanly get PHPCS
to ignore interface method implementations, similar to java's @Override
?
Below is an example of how I do it in java and what I have in php. My goal is to be able to ignore it for methods from interfaces that already have php doc. If the method is not a implementation, then it should still be required to have a php doc provided.
How it Works in Java
In java, I can have an interface like so:
public interface Sandbox {
/**
* Description of some method.
*/
void someMethod();
}
And a class that implements it as so:
public class SandboxImpl implements Sandbox {
@Override
public void someMethod() {
// This is the concrete implementaiton.
}
}
With the above, java picks up the java doc without any issues and the @Override helps get past any check style checks.
What I have in PHP
In php, I have an interface like:
interface Sandbox
{
/**
* Some php doc.
*
* @return mixed
*/
public function someMethod();
}
With a class that implements it like:
class SandboxImpl implements Sandbox
{
public function someMethod()
{
// TODO: Implement someMethod() method.
}
}