Skip to content

Connection: Call to methods of PDO methods through __call magic method unidentified by PHPStan #81

@raviks789

Description

@raviks789

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:

  1. Using @method annotation in PHPDoc to say which methods of the PDO object is found inside the class.
  2. Explicitly implement the methods that are required in the class.
  3. Implement a getter method for PDO object and access PDO object's methods through it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions