Can you show the actual code/class? Might make it a bit easier
Jul 13, 2022
3
Level 2
Lara/PHPStan - Access to undefined property (object via API)
Been scouring the interwebs but can't seem to find an answer. I am getting errors from phpstan regarding access to undefined property but it's an object created from an API call. In this instance, I'm getting an access token for an oauth call.
187 Access to an undefined property object::$access_token.
My question is basically how do I define this before hand? Do I need to completely build out the structure that is received first? What if it's dynamic? Just trying to figure out the right way to go about this.
Please or to participate in this conversation.