From 04441c5bddb7e62cf60aacbaf4146361d7907670 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Thu, 7 Mar 2024 21:54:32 +0100 Subject: [PATCH] Use getObject event args member function instead of deprecated getEntity --- Entity/Application.php | 2 +- Entity/Country.php | 2 +- Entity/Dance.php | 2 +- Entity/GoogleCalendar.php | 2 +- Entity/GoogleToken.php | 2 +- Entity/Location.php | 2 +- Entity/Slot.php | 2 +- Entity/Snippet.php | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Entity/Application.php b/Entity/Application.php index 5d31203..4e94f20 100644 --- a/Entity/Application.php +++ b/Entity/Application.php @@ -238,7 +238,7 @@ class Application { */ public function preUpdate(PreUpdateEventArgs $eventArgs) { //Check that we have an application instance - if (($application = $eventArgs->getEntity()) instanceof Application) { + if (($application = $eventArgs->getObject()) instanceof Application) { //Set updated value $application->setUpdated(new \DateTime('now')); } diff --git a/Entity/Country.php b/Entity/Country.php index 07124c5..5674007 100644 --- a/Entity/Country.php +++ b/Entity/Country.php @@ -227,7 +227,7 @@ class Country { */ public function preUpdate(PreUpdateEventArgs $eventArgs) { //Check that we have an country instance - if (($country = $eventArgs->getEntity()) instanceof Country) { + if (($country = $eventArgs->getObject()) instanceof Country) { //Set updated value $country->setUpdated(new \DateTime('now')); } diff --git a/Entity/Dance.php b/Entity/Dance.php index 796b81f..0b132c8 100644 --- a/Entity/Dance.php +++ b/Entity/Dance.php @@ -249,7 +249,7 @@ class Dance { */ public function preUpdate(PreUpdateEventArgs $eventArgs) { //Check that we have a dance instance - if (($dance = $eventArgs->getEntity()) instanceof Dance) { + if (($dance = $eventArgs->getObject()) instanceof Dance) { //Set updated value $dance->setUpdated(new \DateTime('now')); } diff --git a/Entity/GoogleCalendar.php b/Entity/GoogleCalendar.php index 940a678..ff4f455 100644 --- a/Entity/GoogleCalendar.php +++ b/Entity/GoogleCalendar.php @@ -216,7 +216,7 @@ class GoogleCalendar { */ public function preUpdate(PreUpdateEventArgs $eventArgs): ?GoogleCalendar { //Check that we have an snippet instance - if (($entity = $eventArgs->getEntity()) instanceof GoogleCalendar) { + if (($entity = $eventArgs->getObject()) instanceof GoogleCalendar) { //Set updated value return $entity->setUpdated(new \DateTime('now')); } diff --git a/Entity/GoogleToken.php b/Entity/GoogleToken.php index 68a1d38..3da7279 100644 --- a/Entity/GoogleToken.php +++ b/Entity/GoogleToken.php @@ -283,7 +283,7 @@ class GoogleToken { */ public function preUpdate(PreUpdateEventArgs $eventArgs): ?GoogleToken { //Check that we have an snippet instance - if (($entity = $eventArgs->getEntity()) instanceof GoogleToken) { + if (($entity = $eventArgs->getObject()) instanceof GoogleToken) { //Set updated value return $entity->setUpdated(new \DateTime('now')); } diff --git a/Entity/Location.php b/Entity/Location.php index 73b07f7..85283df 100644 --- a/Entity/Location.php +++ b/Entity/Location.php @@ -468,7 +468,7 @@ class Location { */ public function preUpdate(PreUpdateEventArgs $eventArgs) { //Check that we have a location instance - if (($location = $eventArgs->getEntity()) instanceof Location) { + if (($location = $eventArgs->getObject()) instanceof Location) { //Set updated value $location->setUpdated(new \DateTime('now')); } diff --git a/Entity/Slot.php b/Entity/Slot.php index 116c29f..445f053 100644 --- a/Entity/Slot.php +++ b/Entity/Slot.php @@ -164,7 +164,7 @@ class Slot { */ public function preUpdate(PreUpdateEventArgs $eventArgs) { //Check that we have a slot instance - if (($slot = $eventArgs->getEntity()) instanceof Slot) { + if (($slot = $eventArgs->getObject()) instanceof Slot) { //Set updated value $slot->setUpdated(new \DateTime('now')); } diff --git a/Entity/Snippet.php b/Entity/Snippet.php index a764a66..fa5fe99 100644 --- a/Entity/Snippet.php +++ b/Entity/Snippet.php @@ -432,7 +432,7 @@ class Snippet { */ public function preUpdate(PreUpdateEventArgs $eventArgs) { //Check that we have an snippet instance - if (($snippet = $eventArgs->getEntity()) instanceof Snippet) { + if (($snippet = $eventArgs->getObject()) instanceof Snippet) { //Set updated value $snippet->setUpdated(new \DateTime('now')); } -- 2.41.0