Is there a way I can use PHP Code Sniffer and/or PHP Mess Detector to detect if my classes/properties/methods have proper docblocks? For example:
class Foo
{
protected $bar;
public function doStuff(){
// ...
}
}
The above example should raise red flags. However, the following example should pass:
/**
* Class Foo
* @package Vendor\Module
*/
class Foo
{
/**
* @var Vendor\Module\Model\Bar
*/
protected $bar;
/**
* This method does stuff
* @return bool
*/
public function doStuff(){
// ...
}
}
I'm not per definition interested if the docblocks are correct (if the return types match that what is returned), I mean: it would be nice if it also does that, but the first step I want to take is the ensure that the docblocks are present.