Skip to content

Commit

Permalink
fix : php-cs-fixer & phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
hschoenenberger committed Feb 13, 2024
1 parent 50c5eff commit 1ced5b6
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 9 deletions.
23 changes: 20 additions & 3 deletions src/Account/CommandHandler/UpdateModuleHandler.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
<?php
/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License version 3.0
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* @author PrestaShop SA and Contributors <[email protected]>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/

namespace PrestaShop\Module\PsAccounts\Account\CommandHandler;

use Exception;
use PrestaShop\Module\PsAccounts\Account\Command\UpdateModuleCommand;
use PrestaShop\Module\PsAccounts\Account\LinkShop;
use PrestaShop\Module\PsAccounts\Account\Session\Firebase\ShopSession;
Expand All @@ -26,7 +43,7 @@ class UpdateModuleHandler
private $accountsClient;

public function __construct(
AccountsClient $accountsClient,
AccountsClient $accountsClient,
LinkShop $linkShop,
ShopSession $shopSession
) {
Expand All @@ -44,7 +61,7 @@ public function handle(UpdateModuleCommand $command)
{
$this->accountsClient->updateShopModule(
$this->linkShop->getShopUuid(),
(string)$this->shopSession->getToken(),
(string) $this->shopSession->getToken(),
$command->payload
);
}
Expand Down
5 changes: 3 additions & 2 deletions src/Factory/CircuitBreakerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,18 @@ public static function create($resourceId)
}

/**
* @param $resourceId
* @param string $resourceId
*
* @return CircuitBreaker
*
* @throws \Exception
*/
public static function getOrCreate($resourceId)
{
if (! array_key_exists($resourceId, static::$instances)) {
if (!array_key_exists($resourceId, static::$instances)) {
static::create($resourceId);
}

return static::$instances[$resourceId];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Hook/ActionModuleInstallAfter.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function execute(array $params = [])
CircuitBreakerFactory::resetAll();

$this->commandBus->handle(new UpdateModuleCommand(new Dto\UpdateModule([
'version' => \Ps_accounts::VERSION
'version' => \Ps_accounts::VERSION,
])));
}
}
1 change: 0 additions & 1 deletion src/Hook/ActionObjectShopDeleteBefore.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

use Exception;
use PrestaShop\Module\PsAccounts\Account\Command\DeleteUserShopCommand;
use PrestaShop\Module\PsAccounts\Cqrs\CommandBus;

class ActionObjectShopDeleteBefore extends Hook
{
Expand Down
1 change: 0 additions & 1 deletion src/Hook/ActionObjectShopUpdateAfter.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
use PrestaShop\Module\PsAccounts\Account\Command\UpdateUserShopCommand;
use PrestaShop\Module\PsAccounts\Account\Dto\UpdateShop;
use PrestaShop\Module\PsAccounts\Adapter\Link;
use PrestaShop\Module\PsAccounts\Cqrs\CommandBus;

class ActionObjectShopUpdateAfter extends Hook
{
Expand Down
1 change: 0 additions & 1 deletion src/Hook/ActionObjectShopUrlUpdateAfter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
use PrestaShop\Module\PsAccounts\Account\Command\UpdateUserShopCommand;
use PrestaShop\Module\PsAccounts\Account\Dto\UpdateShop;
use PrestaShop\Module\PsAccounts\Adapter\Link;
use PrestaShop\Module\PsAccounts\Cqrs\CommandBus;

class ActionObjectShopUrlUpdateAfter extends Hook
{
Expand Down

0 comments on commit 1ced5b6

Please sign in to comment.