Skip to content

Commit bd6c6fd

Browse files
committed
Remove deprecations
1 parent 21346ee commit bd6c6fd

9 files changed

Lines changed: 14 additions & 14 deletions

File tree

src/Console/Command/Export.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected function configure(): void
5656
/**
5757
* {@inheritdoc}
5858
*/
59-
protected function execute(InputInterface $input, OutputInterface $output)
59+
protected function execute(InputInterface $input, OutputInterface $output): int
6060
{
6161
$this->state->setAreaCode('frontend');
6262
$storeIds = $this->getStoreIds((int) $input->getOption('store'));

src/Exception/ExportPreviewValidationException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class ExportPreviewValidationException extends \Exception
1010
{
11-
public function __construct($message = '', $code = 0, Throwable $previous = null)
11+
public function __construct($message = '', $code = 0, ?Throwable $previous = null)
1212
{
1313
parent::__construct(sprintf('Product will not be exported. Reason: %s', $message), $code, $previous);
1414
}

src/Exception/ResponseException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class ResponseException extends \RuntimeException
88
{
9-
public function __construct(string $message = '', int $code = 0, \Throwable $previous = null) // phpcs:ignore
9+
public function __construct(string $message = '', int $code = 0, ?\Throwable $previous = null) // phpcs:ignore
1010
{
1111
parent::__construct($message ?: 'Response body was empty', $code, $previous);
1212
}

src/Model/Adminhtml/System/Config/Backend/Feed/Frequency.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public function __construct(
2828
ScopeConfigInterface $config,
2929
TypeListInterface $cacheTypeList,
3030
WriterInterface $configWriter,
31-
AbstractResource $resource = null,
32-
AbstractDb $resourceCollection = null,
31+
?AbstractResource $resource = null,
32+
?AbstractDb $resourceCollection = null,
3333
array $data = []
3434
) {
3535
parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);

src/Model/Api/CredentialsFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(ObjectManagerInterface $objectManager, AuthConfig $a
1919
$this->authConfig = $authConfig;
2020
}
2121

22-
public function create(array $authData = null)
22+
public function create(?array $authData = null)
2323
{
2424
return $this->objectManager->create(Credentials::class, $authData ??
2525
[

src/Model/Config/CmsConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __construct(ScopeConfigInterface $scopeConfig)
1717
$this->scopeConfig = $scopeConfig;
1818
}
1919

20-
public function getCmsBlacklist(int $scopeCode = null): array
20+
public function getCmsBlacklist(?int $scopeCode = null): array
2121
{
2222
$pages = (string) $this->scopeConfig->getValue(self::PATH_DISABLE_CMS_PAGES, 'store', $scopeCode);
2323
return array_filter(explode(',', $pages));

src/Model/Config/CommunicationConfig.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(ScopeConfigInterface $scopeConfig, UrlInterface $url
3131
$this->urlBuilder = $urlBuilder;
3232
}
3333

34-
public function getChannel(int $scopeId = null): string
34+
public function getChannel(?int $scopeId = null): string
3535
{
3636
return (string) $this->scopeConfig->getValue(self::PATH_CHANNEL, ScopeInterface::SCOPE_STORES, $scopeId);
3737
}
@@ -41,12 +41,12 @@ public function getAddress(): string
4141
return (string) $this->scopeConfig->getValue(self::PATH_ADDRESS, ScopeInterface::SCOPE_STORES);
4242
}
4343

44-
public function isChannelEnabled(int $scopeId = null): bool
44+
public function isChannelEnabled(?int $scopeId = null): bool
4545
{
4646
return $this->scopeConfig->isSetFlag(self::PATH_IS_ENABLED, ScopeInterface::SCOPE_STORES, $scopeId);
4747
}
4848

49-
public function isPushImportEnabled(int $scopeId = null): bool
49+
public function isPushImportEnabled(?int $scopeId = null): bool
5050
{
5151
return $this->scopeConfig->isSetFlag(self::PATH_DATA_TRANSFER_IMPORT, ScopeInterface::SCOPE_STORES, $scopeId);
5252
}

src/Model/Config/ExportConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function getSingleFields(?int $storeId = null): array
3939
return $this->getAttributeCodes($storeId, fn (array $row): bool => !$row['multi']);
4040
}
4141

42-
public function getPushImportDataTypes(int $scopeId = null): array
42+
public function getPushImportDataTypes(?int $scopeId = null): array
4343
{
4444
$configPath = 'factfinder/data_transfer/ff_push_import_type';
4545
$dataTypes = (string) $this->scopeConfig->getValue($configPath, ScopeInterface::SCOPE_STORES, $scopeId);

src/Model/FieldRoles.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function __construct(
2222
) {
2323
}
2424

25-
public function getFieldRoles(int $scopeId = null): array
25+
public function getFieldRoles(?int $scopeId = null): array
2626
{
2727
try {
2828
$config = $this->scopeConfig->getValue(self::PATH_PRODUCT_FIELD_ROLE, Scope::SCOPE_STORES, $scopeId);
@@ -32,12 +32,12 @@ public function getFieldRoles(int $scopeId = null): array
3232
}
3333
}
3434

35-
public function getFieldRole(string $roleName, int $scopeId = null): string
35+
public function getFieldRole(string $roleName, ?int $scopeId = null): string
3636
{
3737
return (string) ($this->getFieldRoles($scopeId)[$roleName] ?? '');
3838
}
3939

40-
public function saveFieldRoles(array $fieldRoles, int $scopeId = null): bool
40+
public function saveFieldRoles(array $fieldRoles, ?int $scopeId = null): bool
4141
{
4242
try {
4343
$roles = (string) $this->serializer->serialize($fieldRoles);

0 commit comments

Comments
 (0)