Skip to content

Commit

Permalink
[TASK] Fix phpstan issue on v13
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessCoder committed Jan 23, 2025
1 parent 0f6bbe2 commit e91a963
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/Content/ContentTypeValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ public function validateContentTypeRecord(array $parameters): string
$view->assign('recordIsNew', $recordIsNew);

if ($recordIsNew) {
return $view->render();
return is_string($output = $view->render()) ? $output : '';
}

$contentType = $this->contentTypeManager->determineContentTypeForTypeString($record['content_type']);
if (!$contentType) {
$view->assign('recordIsNew', true);
return $view->render();
return is_string($output = $view->render()) ? $output : '';
}

$usesTemplateFile = true;
Expand All @@ -91,7 +91,7 @@ public function validateContentTypeRecord(array $parameters): string
],
]);

return $view->render();
return is_string($output = $view->render()) ? $output : '';
}

protected function validateContextMatchesSignature(ContentTypeDefinitionInterface $definition): bool
Expand Down

0 comments on commit e91a963

Please sign in to comment.