Wrong types
General information
- SDK/Library version: 6.5.0
Issue description
I try to use v6.5.0 instead of our actual v6.4.1, but PhpStan found a lot of type errors.
- https://github.com/braintree/braintree_php/commit/e35c2a2d74a10e9cec5932506486e4b8bccfa4ba#diff-5d8643485614b6ed610f9d5e2113102403986e64cbd59a2d2705727b84518c4bR94 -
$addressIdaccepts null - https://github.com/braintree/braintree_php/commit/e35c2a2d74a10e9cec5932506486e4b8bccfa4ba#diff-0db98feccc39288c124fa8984ae925913df2972497e619db904b2977d36d1922R22 -
$signatureaccepts and check null also - https://github.com/braintree/braintree_php/commit/e35c2a2d74a10e9cec5932506486e4b8bccfa4ba#diff-d7abe012251d6b7ab4f79ba9c5e3ba472063ddeaf5882f62e5e5da776cbd819cR31 -
$paramsis array but expectsOptional, what is not defined. - https://github.com/braintree/braintree_php/commit/e35c2a2d74a10e9cec5932506486e4b8bccfa4ba#diff-90158b52f755d6c1030ab7527e6a1698dde8165467f7f9c3bdf48d92989abfacR26 -
sampleNotificationreturns not definedWebhookbut actually returns array
Commit https://github.com/braintree/braintree_php/commit/e35c2a2d74a10e9cec5932506486e4b8bccfa4ba is full types mistakes like this. Is it possible to fix this?
🙃 well, crud. Sorry about that. If you'd like to PR the fixes to the docs, please feel free to do so! I don't have an ETA on when these will get fixed up, but they will eventually get fixed.
https://github.com/braintree/braintree_php/pull/304
Going to turn this first issue on types into a mega-thread of issues similar issues opened. See also #314
related PRs - #315
for internal tracking, ticket 1401
Lumping in #326 with this as well, in that this PR highlights that returns and throws need cleaning up.