braintree / braintree_php

Braintree PHP library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
547 stars 224 forks source link

Wrong phpdoc return types in several classes #314

Closed Meyfarth closed 2 years ago

Meyfarth commented 2 years ago

General information

Issue description

After updating to the latest version of braintree_php, our static analysis tool didn't recognize the magic properties anymore (I saw in-between that @property annotations were removed, that would explain it).

I tried to bypass this by calling the __get() method (which is defined in the base class) directly, but then ended up having another error: can't call __get() on unknown class \Braintree\Error

The PHPDoc regarding this return type on few classes are not up to date. I already created a PR with the fix (#313), including each class that had a faulty PHPDoc.

Please feel free to close this when you merge the PR

hollabaq86 commented 2 years ago

👋 @Meyfarth thanks for reaching out, going to close this issue so that we can track all type fixes in one pinned issue (#305)