diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php
index 5a7fc05dd5466c6471344ad406437fac87a30387..9ad0d34d7894d5b76fe7f71016d1e21845dfb7a5 100644
--- a/core/lib/Drupal/Core/Render/Renderer.php
+++ b/core/lib/Drupal/Core/Render/Renderer.php
@@ -810,10 +810,11 @@ protected function xssFilterAdminIfUnsafe($string) {
    * @param array $elements
    *   A render array with #markup set.
    *
-   * @return \Drupal\Component\Render\MarkupInterface|string
-   *   The escaped markup wrapped in a Markup object. If $elements['#markup']
-   *   is an instance of \Drupal\Component\Render\MarkupInterface, it won't be
-   *   escaped or filtered again.
+   * @return array
+   *   The given array with the escaped markup wrapped in a Markup object.
+   *   If $elements['#markup'] is an instance of
+   *   \Drupal\Component\Render\MarkupInterface, it won't be escaped or filtered
+   *   again.
    *
    * @see \Drupal\Component\Utility\Html::escape()
    * @see \Drupal\Component\Utility\Xss::filter()