Checks whether this is a call to a $wpdb method that we want to sniff.

If available in the child class, the $methodPtr, $i and $end properties are
automatically set to correspond to the start and end of the method call.
The $i property is also set if this is not a method call but rather the
use of a $wpdb property.

@since 0.8.0
@since 0.9.0  The return value is now always boolean. The $end and $i member
vars are automatically updated.
@since 0.14.0 Moved this method from the `PreparedSQL` sniff to the base WP sniff.

{@internal This method should probably be refactored.}}

@param int   $stackPtr        The index of the $wpdb variable.
@param array $target_methods  Array of methods. Key(s) should be method name.

@return bool Whether this is a $wpdb method call.