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

\Zendesk\API\Resources\Core\Search::find has wrong parameter type annotation #462

Closed
georgms opened this issue Jan 7, 2021 · 2 comments
Closed

Comments

@georgms
Copy link

georgms commented Jan 7, 2021

\Zendesk\API\Resources\Core\Search::find parameter $query has the type annotation null while it should clearly be string:

I came across this while validating a project with PHPStan.

@pointybeard
Copy link
Contributor

pointybeard commented Feb 18, 2022

Hit this one while running PHPStan also. Quick fix is to add a line like this to phpstan.neon.dist in the ignoreErrors segment:

  ignoreErrors:
    - '#Parameter \#1 \$query of method Zendesk\\API\\Resources\\Core\\Search::find\(\) expects null, string given.#'

Proper fix, of course, is to change * @param null $query to * @param string $query as mentioned.

@pointybeard
Copy link
Contributor

Just popped through PR #486 for this one.

ecoologic added a commit that referenced this issue Oct 10, 2023
fix: Incorrect DocBlock param type for $query (closes #462).
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