Call to methods like Connection::lastInsertID(), Connection::errorInfo() etc, through __call() magic method is unidentified by PHPStan. This can be solved by one of the following three solutions:
- Using
@method annotation in PHPDoc to say which methods of the PDO object is found inside the class.
- Explicitly implement the methods that are required in the class.
- Implement a getter method for PDO object and access PDO object's methods through it.