Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ public function canSendCommentEmail()
/**
* Replace links in string
*
* @param null|string|string[] $data
* @param null|string[] $allowedTags
* @return ($data is array ? array<?string> : ?string)
* @param null|string|string[] $data
* @param null|string[] $allowedTags
* @return null|array<int, null|string>|string
* @phpstan-return ($data is array ? array<?string> : ?string)
*/
#[Override]
public function escapeHtml($data, $allowedTags = null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ public function isCustomerNotificationNotApplicable(Mage_Sales_Model_Order_Statu
/**
* Replace links in string
*
* @param null|string|string[] $data
* @param null|string[] $allowedTags
* @return ($data is array ? array<?string> : ?string)
* @param null|string|string[] $data
* @param null|string[] $allowedTags
* @return null|array<int, null|string>|string
* @phpstan-return ($data is array ? array<?string> : ?string)
*/
#[Override]
public function escapeHtml($data, $allowedTags = null)
Expand Down
7 changes: 4 additions & 3 deletions app/code/core/Mage/Adminhtml/Helper/Sales.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ public function applySalableProductTypesFilter($collection)
/**
* Escape string preserving links
*
* @param null|string|string[] $data
* @param null|string[] $allowedTags
* @return ($data is array ? array<?string> : ?string)
* @param null|string|string[] $data
* @param null|string[] $allowedTags
* @return null|array<int, null|string>|string
* @phpstan-return ($data is array ? array<?string> : ?string)
*/
public function escapeHtmlWithLinks($data, $allowedTags = null)
{
Expand Down
7 changes: 4 additions & 3 deletions app/code/core/Mage/Core/Block/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -1213,9 +1213,10 @@ public function __()

/**
* Escape html entities
* @param null|string|string[] $data
* @param null|string[] $allowedTags
* @return ($data is array ? array<?string> : ?string)
* @param null|string|string[] $data
* @param null|string[] $allowedTags
* @return null|array<int, null|string>|string
* @phpstan-return ($data is array ? array<?string> : ?string)
*/
public function escapeHtml($data, $allowedTags = null)
{
Expand Down
14 changes: 8 additions & 6 deletions app/code/core/Mage/Core/Helper/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,10 @@ public function __()
* Escape html entities
*
* @template T of mixed|string|string[]
* @param T $data
* @param null|string[] $allowedTags
* @return (T is array ? string[] : (T is null|bool|int|string ? T : mixed))
* @param T $data
* @param null|string[] $allowedTags
* @return mixed|string|string[]
* @phpstan-return (T is array ? string[] : (T is null|bool|int|string ? T : mixed))
Comment thread
Hanmac marked this conversation as resolved.
*/
public function escapeHtml($data, $allowedTags = null)
{
Expand Down Expand Up @@ -299,9 +300,10 @@ public function escapeScriptIdentifiers($data)
/**
* Escape quotes in java script
*
* @param string|string[] $data
* @param string $quote
* @return ($data is array ? string[] : string)
* @param string|string[] $data
* @param string $quote
* @return string|string[]
* @phpstan-return ($data is array ? string[] : string)
*/
public function jsQuoteEscape($data, $quote = "'")
{
Expand Down
Loading