Skip to content

Commit cc548ae

Browse files
authored
Applying PHP_Codesniffer on some frequently used file for fbe (#822)
* Addressing linters on JS file * Format Setup.php * Format setup.phtml * Format FBEHelper.php * Format Config.php * Format Config.php * Format setup.phtml
1 parent 045290d commit cc548ae

File tree

7 files changed

+298
-238
lines changed

7 files changed

+298
-238
lines changed

app/code/Meta/BusinessExtension/Block/Adminhtml/Setup.php

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,17 @@ class Setup extends Template
9090
private ScopeConfigInterface $scopeConfig;
9191

9292
/**
93-
* @param Context $context
94-
* @param RequestInterface $request
95-
* @param FBEHelper $fbeHelper
96-
* @param SystemConfig $systemConfig
97-
* @param StoreRepositoryInterface $storeRepo
98-
* @param StoreManagerInterface $storeManager
99-
* @param CommerceExtensionHelper $commerceExtensionHelper
100-
* @param ApiKeyService $apiKeyService
93+
* @param Context $context
94+
* @param RequestInterface $request
95+
* @param FBEHelper $fbeHelper
96+
* @param SystemConfig $systemConfig
97+
* @param StoreRepositoryInterface $storeRepo
98+
* @param StoreManagerInterface $storeManager
99+
* @param CommerceExtensionHelper $commerceExtensionHelper
100+
* @param ApiKeyService $apiKeyService
101101
* @param AdobeCloudConfigInterface $adobeConfig
102-
* @param ScopeConfigInterface $scopeConfig
103-
* @param array $data
102+
* @param ScopeConfigInterface $scopeConfig
103+
* @param array $data
104104
*/
105105
public function __construct(
106106
Context $context,
@@ -197,7 +197,7 @@ public function getAAMSettingsRoute()
197197
/**
198198
* Fetch pixel id
199199
*
200-
* @param int $storeId
200+
* @param int $storeId
201201
* @return string|null
202202
*/
203203
public function fetchPixelId($storeId)
@@ -239,7 +239,7 @@ public function getSplashPageURL()
239239
/**
240240
* Get external business id
241241
*
242-
* @param int $storeId
242+
* @param int $storeId
243243
* @return string|null
244244
*/
245245
public function getExternalBusinessId($storeId)
@@ -321,7 +321,7 @@ public function getCurrencyCode(): ?string
321321
/**
322322
* Is fbe installed
323323
*
324-
* @param int $storeId
324+
* @param int $storeId
325325
* @return bool
326326
*/
327327
public function isFBEInstalled($storeId)
@@ -332,7 +332,7 @@ public function isFBEInstalled($storeId)
332332
/**
333333
* Get a URL to use to render the CommerceExtension IFrame for an onboarded Store.
334334
*
335-
* @param int $storeId
335+
* @param int $storeId
336336
* @return string
337337
*/
338338
public function getCommerceExtensionIFrameURL($storeId)
@@ -376,6 +376,7 @@ public function getSelectableStores()
376376
ARRAY_FILTER_USE_KEY,
377377
);
378378
}
379+
379380
/**
380381
* Get fbe installs config url endpoint
381382
*
@@ -429,7 +430,7 @@ public function getWebsiteId()
429430
/**
430431
* Get default store_id
431432
*
432-
* @return string
433+
* @return int
433434
*/
434435
public function getDefaultStoreViewId()
435436
{

app/code/Meta/BusinessExtension/Helper/FBEHelper.php

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ class FBEHelper
8080
/**
8181
* FBEHelper constructor
8282
*
83-
* @param ObjectManagerInterface $objectManager
84-
* @param Logger $logger
85-
* @param StoreManagerInterface $storeManager
86-
* @param SystemConfig $systemConfig
83+
* @param ObjectManagerInterface $objectManager
84+
* @param Logger $logger
85+
* @param StoreManagerInterface $storeManager
86+
* @param SystemConfig $systemConfig
8787
* @param ProductMetadataInterface $productMetadata
88-
* @param GraphAPIConfig $graphAPIConfig
89-
* @param GraphAPIAdapter $graphAPIAdapter
88+
* @param GraphAPIConfig $graphAPIConfig
89+
* @param GraphAPIAdapter $graphAPIAdapter
9090
*/
9191
public function __construct(
9292
ObjectManagerInterface $objectManager,
@@ -158,7 +158,7 @@ public function getSource(): string
158158
/**
159159
* Get partner agent
160160
*
161-
* @param bool $withMagentoVersion
161+
* @param bool $withMagentoVersion
162162
* @return string
163163
*/
164164
public function getPartnerAgent($withMagentoVersion = false)
@@ -174,7 +174,7 @@ public function getPartnerAgent($withMagentoVersion = false)
174174
/**
175175
* Get url
176176
*
177-
* @param string $partialURL
177+
* @param string $partialURL
178178
* @return mixed
179179
*/
180180
public function getUrl($partialURL)
@@ -186,8 +186,8 @@ public function getUrl($partialURL)
186186
/**
187187
* Create object
188188
*
189-
* @param string $fullClassName
190-
* @param array $arguments
189+
* @param string $fullClassName
190+
* @param array $arguments
191191
* @return mixed
192192
*/
193193
public function createObject($fullClassName, array $arguments = [])
@@ -198,7 +198,7 @@ public function createObject($fullClassName, array $arguments = [])
198198
/**
199199
* Get object
200200
*
201-
* @param string $fullClassName
201+
* @param string $fullClassName
202202
* @return mixed
203203
*/
204204
public function getObject($fullClassName)
@@ -209,7 +209,7 @@ public function getObject($fullClassName)
209209
/**
210210
* Is valid fbid
211211
*
212-
* @param string $id
212+
* @param string $id
213213
* @return bool
214214
*/
215215
public static function isValidFBID($id) // phpcs:ignore
@@ -242,7 +242,7 @@ public function getBaseUrl()
242242
/**
243243
* Get fbe external business id
244244
*
245-
* @param int $storeId
245+
* @param int $storeId
246246
* @return mixed|string|null
247247
*/
248248
public function getFBEExternalBusinessId($storeId)
@@ -259,7 +259,7 @@ public function getFBEExternalBusinessId($storeId)
259259
/**
260260
* Log
261261
*
262-
* @param string $info
262+
* @param string $info
263263
* @param mixed[] $context
264264
*/
265265
public function log($info, array $context = [])
@@ -292,7 +292,7 @@ public function log($info, array $context = [])
292292
/**
293293
* Log critical
294294
*
295-
* @param string $message
295+
* @param string $message
296296
* @param mixed[] $context
297297
*/
298298
public function logCritical($message, array $context = [])
@@ -304,7 +304,7 @@ public function logCritical($message, array $context = [])
304304
* Log exception
305305
*
306306
* @param Throwable $e
307-
* @param array $context
307+
* @param array $context
308308
*/
309309
public function logException(Throwable $e, array $context = [])
310310
{
@@ -318,10 +318,10 @@ public function logException(Throwable $e, array $context = [])
318318
/**
319319
* Log exception details
320320
*
321-
* @param int $code
321+
* @param int $code
322322
* @param string $message
323323
* @param string $traceAsString
324-
* @param array $context
324+
* @param array $context
325325
*/
326326
public function logExceptionDetails($code, $message, $traceAsString, array $context = [])
327327
{
@@ -362,7 +362,7 @@ public function logExceptionDetails($code, $message, $traceAsString, array $cont
362362
* Log exception and persist immediately with Meta
363363
*
364364
* @param Throwable $e
365-
* @param array $context
365+
* @param array $context
366366
*/
367367
public function logExceptionImmediatelyToMeta(Throwable $e, array $context = [])
368368
{
@@ -375,10 +375,10 @@ public function logExceptionImmediatelyToMeta(Throwable $e, array $context = [])
375375
*
376376
* `logExceptionImmediatelyToMeta` should be preferred whenever a /Throwable is available.
377377
*
378-
* @param int $code
378+
* @param int $code
379379
* @param string $message
380380
* @param string $traceAsString
381-
* @param array $context
381+
* @param array $context
382382
*/
383383
public function logExceptionDetailsImmediatelyToMeta($code, $message, $traceAsString, array $context = [])
384384
{
@@ -390,7 +390,7 @@ public function logExceptionDetailsImmediatelyToMeta($code, $message, $traceAsSt
390390
* Log telemetry and persist with Meta
391391
*
392392
* @param string $message
393-
* @param array $context
393+
* @param array $context
394394
*/
395395
public function logTelemetryToMeta(string $message, array $context = [])
396396
{
@@ -422,7 +422,7 @@ public function getStoreCurrencyCode()
422422
/**
423423
* Fetch aam settings
424424
*
425-
* @param string $pixelId
425+
* @param string $pixelId
426426
* @return mixed
427427
*/
428428
private function fetchAAMSettings($pixelId)
@@ -454,8 +454,8 @@ public function getAAMSettings()
454454
/**
455455
* Save aam settings
456456
*
457-
* @param object $settings
458-
* @param int $storeId
457+
* @param object $settings
458+
* @param int $storeId
459459
* @return false|string
460460
*/
461461
private function saveAAMSettings($settings, $storeId)
@@ -477,8 +477,8 @@ private function saveAAMSettings($settings, $storeId)
477477
/**
478478
* Fetch and save aam settings
479479
*
480-
* @param string $pixelId
481-
* @param int $storeId
480+
* @param string $pixelId
481+
* @param int $storeId
482482
* @return false|string|null
483483
*/
484484
public function fetchAndSaveAAMSettings($pixelId, $storeId)

0 commit comments

Comments
 (0)