phpstan error: Accessing property $prop on possibly null value
code: myFunction($possiblyNullObject->prop ?? null);
explanation: In this case, $possiblyNullObject, could be null based on its type information. But that is OK because the null coalescing operator takes care of that for us. The operator returns the first operand if it exists and is not null. Fortunately for us the property is considered not to exist if the object you are accessing it on does not exist, and that is safe to check it that way.
You're right, I'll fix this.
Most helpful comment
You're right, I'll fix this.