You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Almost all API models have _embedded key in responses, therefore all related PHP interfaces of model classes could declare the getter. For some models, only the final model classes define the getter but not the class's interface. This seems incorrect. And this ruins static analyzers like Psalm.
For example, interface PaymentInstrument realized by 5 model classes:
AlternativeInstrument
BankAccount
KhelocardCard
PaymentCard
PayPalAccount
Each has public function getEmbedded(), so the declaration public function getEmbedded(): ?object must exist in the interface.
The difference in return types in the case of each model class is not a problem, because PHP fully supports return covariance from PHP 7.4.0.
The text was updated successfully, but these errors were encountered:
Almost all API models have
_embedded
key in responses, therefore all related PHP interfaces of model classes could declare the getter. For some models, only the final model classes define the getter but not the class's interface. This seems incorrect. And this ruins static analyzers like Psalm.For example, interface
PaymentInstrument
realized by 5 model classes:Each has
public function getEmbedded()
, so the declarationpublic function getEmbedded(): ?object
must exist in the interface.The difference in return types in the case of each model class is not a problem, because PHP fully supports return covariance from PHP 7.4.0.
The text was updated successfully, but these errors were encountered: