Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
raviks789 opened this issue Mar 6, 2024 · 1 comment

Comments

@raviks789
Copy link
Contributor

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.
@nilmerg
Copy link
Member

nilmerg commented Mar 28, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants