I want to create a Stripe webhook, in some places I need to have some conditions like:
if ($event->object->data[0]->blah == “blah”) {…
Instead of these long conditions, isn’t it better to pass all event data to another class and just use getter methods like below?
if ($object->getBlah() == “blah”)
{
No disadvantage for performance? Or this is not recommended because of performance?