From d9ce6af1cee24527f9cde6448be65951f5692d3a Mon Sep 17 00:00:00 2001 From: Andreas Hennings Date: Wed, 27 Nov 2024 12:42:35 +0100 Subject: [PATCH] Issue #56: Add strict_types declaration, don't rely on implicit cast. --- src/Controller/ViewerController.php | 4 +++- src/Cool/CollaboraDiscovery.php | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Controller/ViewerController.php b/src/Controller/ViewerController.php index e1059f83..bf35410f 100644 --- a/src/Controller/ViewerController.php +++ b/src/Controller/ViewerController.php @@ -10,6 +10,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +declare(strict_types=1); + namespace Drupal\collabora_online\Controller; use Drupal\collabora_online\Cool\CollaboraDiscovery; @@ -96,7 +98,7 @@ public function editor(MediaInterface $media, Request $request, $edit = FALSE) { $render_array['#attached']['library'][] = 'collabora_online/cool.frame'; $response = new Response(); - $response->setContent($this->renderer->renderRoot($render_array)); + $response->setContent((string) $this->renderer->renderRoot($render_array)); return $response; } diff --git a/src/Cool/CollaboraDiscovery.php b/src/Cool/CollaboraDiscovery.php index 3c3b285b..2f761e4d 100644 --- a/src/Cool/CollaboraDiscovery.php +++ b/src/Cool/CollaboraDiscovery.php @@ -10,6 +10,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +declare(strict_types=1); + namespace Drupal\collabora_online\Cool; use Drupal\collabora_online\Exception\CollaboraNotAvailableException;