I'm working on PHPStorm and changing a PHP project from procedural code to OOP, however, when changing to OOP PHP doesn't seem to find objects' methods, here's a picture

how do I solve this? Or should I just ignore it?
that is because you should use
/**
* @var RegistrationDB
*/
var $db;
/**
* @var Notifier
*/
var $notifier;
function __construct() {
$this->db = new RegistrationDB();
$this->notifier = new Notifier();
}
in the constructor,
if (!$this->db->hasUser($email)) ...
when you try to reference the property (underpinned by the var $db).
EDIT : added phpdoc pragmas to render the property's class resolvable.
EDIT 2 : in php OOP, the object's properties are declared by a var. So, var $db; implies that a db property exists for the classes' instance objects
var $db; in class Foo
...
$a = new Foo();
$a->db; // correct
$a->$db; // very probable runtime error
for example, from one of my current projects :
$clinic = \DAO\clinics::insert( true , 'Funky Clinic inc' , new DateTime('now'));
$clinic->active = true;
$logger->info($clinic);
$clinic->$active = false; // <- this is line 20 from the stack trace
The third line will log properly the object to my log file, while line 4 will bomb with the following error in the console :
> php TestPatient.php
PHP Fatal error: Cannot access empty property in /Users/yvesleborg/devel/Shiva/MyClient/HisProject/DAO/SQL/v1.0/TestPatient.php on line 20
PHP Stack trace:
PHP 1. {main}() /Users/yvesleborg/devel/Shiva/MyClient/HisProject/DAO/SQL/v1.0/TestPatient.php:0