Skip to content

Commit

Permalink
Fix CS.
Browse files Browse the repository at this point in the history
  • Loading branch information
zerai committed Feb 28, 2024
1 parent 877f6da commit a46d0cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
namespace IdentityAccess\AdapterForWeb;

use IdentityAccess\Core\ExternalSystemNotifier;
use IdentityAccess\Core\ShowUnverifiedAccounts;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
Expand Down
1 change: 0 additions & 1 deletion _iam/src/Core/ExternalSystemNotifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public function __construct(
* Eventi interni:
* user.* (ex: user.created, user.disabled/enabled)
* oauth.* (ex: oauth.client.created, oauth.consent.revoked, oauth.client.scope.updated)
*
*/
public function internalMessageListener(object $event): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ public function __construct(
#[EventHandler(listenTo: 'iam.new-user-registration-was-accepted')]
public function handle(#[payload] array $event, #[headers] array $headers): void
{

$isAlreadyProcessed = $this->cacheItemPool->getItem('already-processed-message.' . (string) $headers['id']);
if (!$isAlreadyProcessed->isHit()) {
if (! $isAlreadyProcessed->isHit()) {
// ... item does not exist in the cache
$this->logger->info('---------------------- precess external message ----------------------');
//TODO:
Expand All @@ -43,9 +42,11 @@ public function handle(#[payload] array $event, #[headers] array $headers): void
// or
// create own projections from external events.

$isAlreadyProcessed->set(['processed' => true]);
$isAlreadyProcessed->set([
'processed' => true,
]);
$this->cacheItemPool->save($isAlreadyProcessed);
}else{
} else {
$this->logger->info('---------------------- SKIPPED ALREADY PROCESSED MESSAGE ----------------------');
}
}
Expand Down

0 comments on commit a46d0cc

Please sign in to comment.