Skip to content

Commit 4023232

Browse files
Merge pull request #890 from sdinteractive/feature/fix-php-8.4-issues
Fix php 8.4 issues
2 parents a6330ae + c0d13a3 commit 4023232

File tree

15 files changed

+42
-42
lines changed

15 files changed

+42
-42
lines changed

app/code/Meta/BusinessExtension/Model/System/Config.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ public function isPriceInclTax($scopeId = null, $scope = null): bool
881881
* @param string|null $scope
882882
* @return bool
883883
*/
884-
public function isServerTestModeEnabled(int $scopeId = null, string $scope = null): bool
884+
public function isServerTestModeEnabled(?int $scopeId = null, ?string $scope = null): bool
885885
{
886886
return (bool)$this->getConfig(
887887
self::XML_PATH_FACEBOOK_CONVERSION_MANAGEMENT_ENABLE_SERVER_TEST,
@@ -897,7 +897,7 @@ public function isServerTestModeEnabled(int $scopeId = null, string $scope = nul
897897
* @param string|null $scope
898898
* @return string|null
899899
*/
900-
public function getServerTestCode(int $scopeId = null, string $scope = null): ?string
900+
public function getServerTestCode(?int $scopeId = null, ?string $scope = null): ?string
901901
{
902902
return $this->getConfig(
903903
self::XML_PATH_FACEBOOK_CONVERSION_MANAGEMENT_SERVER_TEST_CODE,
@@ -913,7 +913,7 @@ public function getServerTestCode(int $scopeId = null, string $scope = null): ?s
913913
* @param string|null $scope
914914
* @return mixed
915915
*/
916-
public function getWeightUnit(int $scopeId = null, string $scope = null)
916+
public function getWeightUnit(?int $scopeId = null, ?string $scope = null)
917917
{
918918
return $this->getConfig('general/locale/weight_unit', $scopeId, $scope);
919919
}
@@ -925,7 +925,7 @@ public function getWeightUnit(int $scopeId = null, string $scope = null)
925925
* @param string|null $scope
926926
* @return bool
927927
*/
928-
public function isAdditionalAttributesSyncDisabled(int $scopeId = null, string $scope = null): bool
928+
public function isAdditionalAttributesSyncDisabled(?int $scopeId = null, ?string $scope = null): bool
929929
{
930930
return (bool)$this->getConfig(
931931
self::XML_PATH_FACEBOOK_DISABLE_ADDITIONAL_ATTRIBUTES_SYNC,
@@ -941,7 +941,7 @@ public function isAdditionalAttributesSyncDisabled(int $scopeId = null, string $
941941
* @param string|null $scope
942942
* @return bool
943943
*/
944-
public function isUnsupportedProductsDisabled(int $scopeId = null, string $scope = null): bool
944+
public function isUnsupportedProductsDisabled(?int $scopeId = null, ?string $scope = null): bool
945945
{
946946
return (bool)$this->getConfig(
947947
self::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_DISABLE_UNSUPPORTED_PRODUCTS,
@@ -958,7 +958,7 @@ public function isUnsupportedProductsDisabled(int $scopeId = null, string $scope
958958
* @param string|null $scope
959959
* @return int
960960
*/
961-
public function getProductsFetchBatchSize(int $default = 200, int $scopeId = null, string $scope = null): int
961+
public function getProductsFetchBatchSize(int $default = 200, ?int $scopeId = null, ?string $scope = null): int
962962
{
963963
$batch_size = (int)$this->getConfig(
964964
self::XML_PATH_FACEBOOK_PRODUCTS_FETCH_BATCH_SIZE,
@@ -978,7 +978,7 @@ public function getProductsFetchBatchSize(int $default = 200, int $scopeId = nul
978978
* @param string|null $scope
979979
* @return bool
980980
*/
981-
public function isMemoryProfilingEnabled(int $scopeId = null, string $scope = null): bool
981+
public function isMemoryProfilingEnabled(?int $scopeId = null, ?string $scope = null): bool
982982
{
983983
return (bool)$this->getConfig(
984984
self::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_ENABLE_MEMORY_PROFILING,
@@ -1042,7 +1042,7 @@ public function isFBEAdsInstalled($storeId = null)
10421042
* @param int|null $storeId
10431043
* @return bool
10441044
*/
1045-
public function isFBEShopInstalled(int $storeId = null): bool
1045+
public function isFBEShopInstalled(?int $storeId = null): bool
10461046
{
10471047
return $this->isFeatureInstalled('fb_shop', $storeId) ||
10481048
$this->isFeatureInstalled('ig_shopping', $storeId) ||
@@ -1055,7 +1055,7 @@ public function isFBEShopInstalled(int $storeId = null): bool
10551055
* @param int|null $storeId
10561056
* @return bool
10571057
*/
1058-
public function isInstalledShopOnsiteEligible(int $storeId = null): bool
1058+
public function isInstalledShopOnsiteEligible(?int $storeId = null): bool
10591059
{
10601060
return $this->getConfig(self::XML_PATH_FACEBOOK_BUSINESS_EXTENSION_IS_ONSITE_ELIGIBLE, $storeId);
10611061
}

app/code/Meta/BusinessExtension/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "magento2-module",
55
"license": "Apache-2.0",
66
"require": {
7-
"php": "~8.1.0||~8.2.0||~8.3.0",
7+
"php": "~8.1.0||~8.2.0||~8.3.0||~8.4.0",
88
"ext-json": "*",
99
"magento/framework": "*",
1010
"magento/framework-message-queue": "*",

app/code/Meta/Catalog/Block/Adminhtml/Config/Backend/ArraySerialized.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ public function __construct(
4444
ScopeConfigInterface $config,
4545
TypeListInterface $cacheTypeList,
4646
Logger $logger,
47-
AbstractResource $resource = null,
48-
AbstractDb $resourceCollection = null,
47+
?AbstractResource $resource = null,
48+
?AbstractDb $resourceCollection = null,
4949
array $data = []
5050
) {
5151
$this->serializer = $serializer;

app/code/Meta/Catalog/Block/Adminhtml/Diagnostics.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function getSampleAffectedItems(array $diagnosticItem, int $catalogId, in
168168
* @param int|null $store
169169
* @return string
170170
*/
171-
public function getAdminUrl(ProductInterface $product, int $store = null)
171+
public function getAdminUrl(ProductInterface $product, ?int $store = null)
172172
{
173173
$params = ['id' => $product->getId()];
174174
if ($store) {

app/code/Meta/Catalog/Model/Config/Backend/Catalog.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public function __construct(
6060
TypeListInterface $cacheTypeList,
6161
SystemConfig $systemConfig,
6262
Request $request,
63-
AbstractResource $resource = null,
64-
AbstractDb $resourceCollection = null,
63+
?AbstractResource $resource = null,
64+
?AbstractDb $resourceCollection = null,
6565
array $data = []
6666
) {
6767
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);

app/code/Meta/Catalog/Model/Product/Feed/Mapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function mapLink(BundleLinkInterface $link): array
146146
* @param string|null $link_type
147147
* @return array
148148
*/
149-
public function mapProductLinks(array $product_links, string $link_type = null): array
149+
public function mapProductLinks(array $product_links, ?string $link_type = null): array
150150
{
151151
if ($link_type != null) {
152152
$product_links = array_filter($product_links, function ($product_link) use ($link_type) {

app/code/Meta/Catalog/Model/Product/Feed/Method/NavigationFeedApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ public function generateNavigationFeed($jsTreeData): string
122122
* @return bool|mixed
123123
* @throws Exception
124124
*/
125-
public function execute($flowName, int $storeId = null): mixed
125+
public function execute($flowName, ?int $storeId = null): mixed
126126
{
127127
$this->storeId = $storeId;
128128
$store = $this->systemConfig->getStoreManager()->getStore($storeId);

app/code/Meta/Catalog/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Meta Business Extension Catalog module",
44
"type": "magento2-module",
55
"require": {
6-
"php": "~8.1.0||~8.2.0||~8.3.0",
6+
"php": "~8.1.0||~8.2.0||~8.3.0||~8.4.0",
77
"magento/framework": "*",
88
"magento/module-inventory-configuration-api": "*",
99
"magento/module-inventory-sales-api": "*",

app/code/Meta/Conversion/Plugin/Tracker/AddGuestPaymentInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function afterSavePaymentInformation(
3131
$cartId,
3232
$email,
3333
PaymentInterface $paymentMethod,
34-
AddressInterface $billingAddress = null
34+
?AddressInterface $billingAddress = null
3535
) {
3636
if ($result) {
3737
$payload = $this->addPaymentInfoTracker->getPayload($this->getInitialPayload($cartId));

app/code/Meta/Conversion/Plugin/Tracker/AddPaymentInfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function afterSavePaymentInformation(
2727
bool $result,
2828
$cartId,
2929
PaymentInterface $paymentMethod,
30-
AddressInterface $billingAddress = null
30+
?AddressInterface $billingAddress = null
3131
) {
3232
if ($result) {
3333
$payload = $this->addPaymentInfoTracker->getPayload($this->getInitialPayload($cartId));

0 commit comments

Comments
 (0)