We recently upgraded on of our projects to PHP7, which doesn't allow the following:
class SomeTestClass {
/**
* This is the constructor
*/
public function SomeTestClass (){
//Whatever
}
}
The constructor should be renamed to __construct
instead of the class-name. PhpStorm correctly indicates this as "Old style constructor usage". Can I search all files of my project for this specific error type?
There's an inspection for this: PHP → Code Style → Old style constructor. You can then use the menu Code → Inspect code to find them all.