No suggestions for PDO object

I'm referencing a PDO object but not finding any of the functions available on it.

I've included "ext-pdo" in my composer.json but it seems trying to "use" it isn't helping. 

What am I missing?

I saw this very helpful post, but it's not helping me got to the root of my issue:

https://intellij-support.jetbrains.com/hc/en-us/community/posts/360008452780-No-suggestions-found-for-PDOStatement-object-returned-through-function

0
2 comments

Hi there,

Accordingly to your screenshot $pdo is a function parameter. You need to typehint it in order for the IDE to provide code completion. This can be done via PHP's own typehint or by using PHPDoc.

For example:

function sanitize (PDO $pdo, $str) {

 

1

Please sign in to leave a comment.