diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Comments/View.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Comments/View.php index 68ba7c51bba6b..ea3de37ed5b98 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Comments/View.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Comments/View.php @@ -109,9 +109,9 @@ public function canSendCommentEmail() /** * Replace links in string * - * @param array|string $data + * @param string|int|float|\Stringable|array $data * @param null|array $allowedTags - * @return string + * @return ($data is array ? string[] : string) */ public function escapeHtml($data, $allowedTags = null) { diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php index 48278a8babc40..06d9a68b365c0 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/History.php @@ -1,7 +1,7 @@ $data * @param null|array $allowedTags - * @return string + * @return ($data is array ? string[] : string) */ public function escapeHtml($data, $allowedTags = null) { diff --git a/app/code/Magento/Sales/Helper/Admin.php b/app/code/Magento/Sales/Helper/Admin.php index b21e6757cbefb..61ef5d4cf2232 100644 --- a/app/code/Magento/Sales/Helper/Admin.php +++ b/app/code/Magento/Sales/Helper/Admin.php @@ -1,7 +1,7 @@ $data * @param null|array $allowedTags - * @return string + * @return ($data is array ? string[] : string) */ public function escapeHtmlWithLinks($data, $allowedTags = null) { diff --git a/lib/internal/Magento/Framework/Escaper.php b/lib/internal/Magento/Framework/Escaper.php index 9c249923197fb..6787a0b5230c8 100644 --- a/lib/internal/Magento/Framework/Escaper.php +++ b/lib/internal/Magento/Framework/Escaper.php @@ -1,7 +1,7 @@ $data * @param array|null $allowedTags - * @return string|array + * @return ($data is array ? string[] : string) */ public function escapeHtml($data, $allowedTags = null) { @@ -267,7 +267,7 @@ private function escapeAttributeValue($name, $value) /** * Escape a string for the HTML attribute context * - * @param string $string + * @param string|int|float|\Stringable $string * @param boolean $escapeSingleQuote * @return string * @since 101.0.0 @@ -313,7 +313,7 @@ public function encodeUrlParam($string) /** * Escape string for the JavaScript context * - * @param string $string + * @param string|int|float|\Stringable $string * @return string * @since 101.0.0 */ diff --git a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php index 3b02619286b59..06f7b66033d5c 100644 --- a/lib/internal/Magento/Framework/View/Element/AbstractBlock.php +++ b/lib/internal/Magento/Framework/View/Element/AbstractBlock.php @@ -1,7 +1,7 @@ $data * @param array|null $allowedTags - * @return string + * @return ($data is array ? string[] : string) * @deprecated 103.0.0 Use $escaper directly in templates and in blocks. * @see Escaper Usage */ @@ -906,7 +906,7 @@ public function escapeHtml($data, $allowedTags = null) /** * Escape string for the JavaScript context * - * @param string $string + * @param string|int|float|\Stringable $string * @return string * @since 101.0.0 * @deprecated 103.0.0 Use $escaper directly in templates and in blocks. @@ -920,7 +920,7 @@ public function escapeJs($string) /** * Escape a string for the HTML attribute context * - * @param string $string + * @param string|int|float|\Stringable $string * @param boolean $escapeSingleQuote * @return string * @since 101.0.0