Skip to content

Commit 517bf50

Browse files
committed
MAGE-940 add types and document string cast
1 parent d0404e9 commit 517bf50

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Observer/RecommendSettings.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class RecommendSettings implements ObserverInterface
2222
/**
2323
* @var string
2424
*/
25-
protected $productId = '';
25+
protected string $productId = '';
2626

2727
/**
2828
* @param ConfigHelper $configHelper
@@ -43,7 +43,7 @@ public function __construct(
4343
* @param Observer $observer
4444
* @throws LocalizedException
4545
*/
46-
public function execute(Observer $observer)
46+
public function execute(Observer $observer): void
4747
{
4848
foreach ($observer->getData('changed_paths') as $changedPath) {
4949
// Validate before enable FBT on PDP or on cart page
@@ -161,7 +161,8 @@ protected function validateRecommendation(string $changedPath, string $recommend
161161
}
162162

163163
/**
164-
* @return string
164+
* @return string - Product ID string for use in API calls
165+
* @throws LocalizedException
165166
*/
166167
protected function getProductId(): string
167168
{

0 commit comments

Comments
 (0)