diff --git a/models/response/RequestData.php b/models/response/RequestData.php index a693e77..c02da29 100644 --- a/models/response/RequestData.php +++ b/models/response/RequestData.php @@ -122,7 +122,7 @@ class RequestData extends Response /** * @var \nikserg\ItcomPublicApi\models\response\Enrolment */ - public Enrolment $enrolment; + public ?Enrolment $enrolment; /** * @var string */ @@ -138,7 +138,7 @@ protected function prepareResponseContent(array $responseContent): array $responseContent['subjectFields'][$key] = new SubjectField($value); } $responseContent['keyUsage'] = new KeyUsage($responseContent['keyUsage']); - $responseContent['enrolment'] = new Enrolment($responseContent['enrolment']); + $responseContent['enrolment'] = isset($responseContent['enrolment']) ? new Enrolment($responseContent['enrolment']) : null; return $responseContent; }