Skip to content

Commit 83f8d12

Browse files
Merge pull request #54 from Fonda-Digital/master
PHP 8.4 deprecation warnings
2 parents cde0863 + bf5ac84 commit 83f8d12

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

Console/Command/ImportMetricUnits.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ImportMetricUnits extends Command
1111
{
1212
protected ImportMetricUnitsJob $job;
1313

14-
public function __construct(ImportMetricUnitsJob $job, string $name = null)
14+
public function __construct(ImportMetricUnitsJob $job, ?string $name = null)
1515
{
1616
$this->job = $job;
1717

Console/Command/SetNotVisible.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class SetNotVisible extends Command
1111
{
1212
protected SetNotVisibleJob $job;
1313

14-
public function __construct(SetNotVisibleJob $job, string $name = null)
14+
public function __construct(SetNotVisibleJob $job, ?string $name = null)
1515
{
1616
$this->job = $job;
1717

Console/Command/SlackNotificationCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class SlackNotificationCommand extends Command
1515
{
1616
protected $runSlackMessage;
1717

18-
public function __construct(RunSlackMessage $runSlackMessage, $name = null)
18+
public function __construct(RunSlackMessage $runSlackMessage, ?string $name = null)
1919
{
2020
$this->runSlackMessage = $runSlackMessage;
2121
parent::__construct($name);

Helper/SlackHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class SlackHelper extends AbstractHelper
1414
* @param String $field
1515
* @param Int $storeId
1616
*/
17-
public function getConfigValue($field, $storeId = null)
17+
public function getConfigValue($field, ?int $storeId = null)
1818
{
1919
return $this->scopeConfig->getValue(
2020
$field,
@@ -28,7 +28,7 @@ public function getConfigValue($field, $storeId = null)
2828
* @param String $code
2929
* @param null $storeId
3030
*/
31-
public function getGeneralConfig($code, $storeId = null)
31+
public function getGeneralConfig($code, ?int $storeId = null)
3232
{
3333
return $this->getConfigValue(self::XML_PATH . $code, $storeId);
3434
}

Job/ImportMetricUnits.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(
3232
$this->config = $config;
3333
}
3434

35-
public function execute(OutputInterface $output = null): void
35+
public function execute(?OutputInterface $output = null): void
3636
{
3737
if (! $this->authenticator->getAkeneoApiClient()) {
3838
if ($output) {

Job/RunSlackMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class RunSlackMessage
1818
protected $logs;
1919
protected $slackMessage;
2020

21-
public function execute(InputInterface $input = null, OutputInterface $output = null)
21+
public function execute(?InputInterface $input = null, ?OutputInterface $output = null)
2222
{
2323
$message = $this->getMessage();
2424
if ($this->helperData->isEnable()) {

Job/SetNotVisible.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(CollectionFactory $collectionFactory, ScopeConfigInt
2929
$this->action = $action;
3030
}
3131

32-
public function execute(OutputInterface $output = null): void
32+
public function execute(?OutputInterface $output = null): void
3333
{
3434
$products = $this->collectionFactory->create()
3535
->addFieldToFilter('attribute_set_id', ['in' => $this->getNotVisibleFamilies()])

Job/SlackMessage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function success()
2929
* @param Collection $processingLogs
3030
* @return string
3131
*/
32-
public function warning(Collection $errorLogs = null, Collection $processingLogs = null)
32+
public function warning(?Collection $errorLogs = null, ?Collection $processingLogs = null)
3333
{
3434
$message = ':warning: *Warning!* There\'s a problem with today’s imports in *' . $this->store->getName()
3535
. "*.\n\n";

Plugin/Helper/Import/Product.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function __construct(
1515
) {
1616
}
1717

18-
public function beforeCreateTmpTableFromApi($subject, $result, $tableSuffix, $family = null)
18+
public function beforeCreateTmpTableFromApi($subject, $result, $tableSuffix, mixed $family = null)
1919
{
2020
if (is_null($this->codes)) {
2121
$this->codes = explode(',', (string)$this->config->getValue('akeneo_connector/justbetter/important_attributes'));

0 commit comments

Comments
 (0)