diff --git a/src/Endpoints/ZakenEndpoint.php b/src/Endpoints/ZakenEndpoint.php index 0658e20..80c7bf5 100644 --- a/src/Endpoints/ZakenEndpoint.php +++ b/src/Endpoints/ZakenEndpoint.php @@ -5,7 +5,7 @@ namespace OWC\Zaaksysteem\Endpoints; use OWC\Zaaksysteem\Entities\Entity; -use OWC\Zaaksysteem\Entities\Status; +use OWC\Zaaksysteem\Entities\StatusType; use OWC\Zaaksysteem\Entities\Zaak; use OWC\Zaaksysteem\Http\Response; use OWC\Zaaksysteem\Resolvers\ContainerResolver; @@ -52,7 +52,7 @@ protected function buildEntity($data): Entity $class = $this->entityClass; $zaak = new $class($data, $this->client::CALLABLE_NAME, $this->client::CLIENT_NAME); - $statusToelichting = $zaak->status instanceof Status && isset($zaak->status->statustype) ? $zaak->status->statustype->statusExplanation() : ''; + $statusToelichting = $zaak->status->statustype instanceof StatusType ? $zaak->status->statustype->statusExplanation() : ''; $zaak->setValue('leverancier', $zaak->getClientNamePretty()); $zaak->setValue('steps', $this->handleProcessStatusses($this->getStatussenSorted($zaak), $statusToelichting)); $zaak->setValue('status_history', $zaak->statussen);