Skip to content

Commit

Permalink
Merge pull request #19 from android-com-pl/analysis-yrJB25
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
rafaucau committed Jun 18, 2023
2 parents 6215238 + 4efe470 commit 44f6109
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Middleware/LSCachePurgeMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,17 @@ protected function processPurge(
$payload = json_decode($response->getBody()->getContents(), true);

if (isset($payload, $payload['included'])) {
$userData = Arr::first($payload['included'], fn($value, $key) => $value['type'] === 'users');
$userData = Arr::first($payload['included'], fn ($value, $key) => $value['type'] === 'users');
if ($userData) {
$userId = $userData['id'];
$userName = Arr::get($userData, 'attributes.username');

array_push(
$purgeParams,
"tag=user_$userId", "tag=user_$userName", "tag=users_$userId", "tag=users_$userName"
"tag=user_$userId",
"tag=user_$userName",
"tag=users_$userId",
"tag=users_$userName"
);
}
}
Expand Down

0 comments on commit 44f6109

Please sign in to comment.