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

Fix type errors, incorrect docblocks #395

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

braindawg
Copy link
Contributor

Description

Fixes some typing issues that Psalm caught. Calls to Pusher::log() with a disallowed null param, a docblock with the wrong method signatures, and several docblocks that have not been updated to match the now stricter types of their method signatures or class properties.

There should be no behavioral changes except that the log function calls will no longer trigger TypeErrors.

CHANGELOG

  • [FIXED] Correct Pusher.php docblock types to match method signatures/class properties
  • [FIXED] Update the Pusher::webhook() method to no longer throw TypeErrors when logging

There were some oversights made here when types were added to these
method signatures. The method signatures in question are stricter than
the docblock-hinted types, so the extra docblock types have been
removed to match the enforced method signatures.

One docblock looks like it was copy-pasted from a different function
with a completely different method signature, so the param list in the
docblock has been corrected.

The docblock hint for Pusher::$client hadn't been updated since curl was
replaced with Guzzle as the HTTP client of choice.
Looks like these calls to Pusher::log() didn't get updated after pusher#305
changed the method signature to require an array in the second param.
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

Successfully merging this pull request may close these issues.

1 participant