@@ -4,6 +4,6 @@ |
||
4 | 4 | |
5 | 5 | require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; |
6 | 6 | |
7 | -return function (array $context) { |
|
7 | +return function(array $context) { |
|
8 | 8 | return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); |
9 | 9 | }; |
@@ -26,7 +26,7 @@ |
||
26 | 26 | ); |
27 | 27 | $cookies = $client->getResponse()->headers->getCookies(); |
28 | 28 | $bearer = Collection::from($cookies) |
29 | - ->find(function ($c) { |
|
29 | + ->find(function($c) { |
|
30 | 30 | return $c->getName() == "BEARER"; |
31 | 31 | }); |
32 | 32 | if ($bearer == null) { |
@@ -56,7 +56,7 @@ |
||
56 | 56 | [null, 'int', true, null], |
57 | 57 | |
58 | 58 | [$ulid, 'ulid', false, $ulid], |
59 | - [(string)$ulid, 'ulid', false, $ulid], |
|
59 | + [(string) $ulid, 'ulid', false, $ulid], |
|
60 | 60 | [null, 'ulid', false, $ulid], |
61 | 61 | [null, 'ulid', true, null], |
62 | 62 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | public function onUserRenamed(UserRenamedTagsIEvent $event): void |
24 | 24 | { |
25 | 25 | $this->transactionFactory |
26 | - ->createTransaction(function () use ($event) { |
|
26 | + ->createTransaction(function() use ($event) { |
|
27 | 27 | $this->securityEventsHandlingRepository->updateUserName( |
28 | 28 | new UpdatedTagsPostHeadersUserNameDto( |
29 | 29 | $event->getOldLogin(), |
@@ -26,7 +26,7 @@ |
||
26 | 26 | { |
27 | 27 | return |
28 | 28 | Collection::from($this->tagsFindingRepository->findTags()) |
29 | - ->map(function ($tag) { |
|
29 | + ->map(function($tag) { |
|
30 | 30 | return new FindTagsQueryResponse($tag->getTag(), $tag->getPostsCount()); |
31 | 31 | }) |
32 | 32 | ->toArray(); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | $this->getEntityManager() |
15 | 15 | ->getRepository(PostComments::class) |
16 | 16 | ->findOneBy(["postId" => $updatedComments->getPostId()]); |
17 | - if($append) { |
|
17 | + if ($append) { |
|
18 | 18 | $data = $comments->getComments(); |
19 | 19 | foreach ($updatedComments->getComments() as $newComment) { |
20 | 20 | array_push($data, $newComment); |
@@ -31,7 +31,7 @@ |
||
31 | 31 | if (!$user instanceof LoggedInUser) { |
32 | 32 | return false; |
33 | 33 | } |
34 | - return match ($attribute) { |
|
34 | + return match($attribute) { |
|
35 | 35 | Permission::EDIT, Permission::DELETE => $this->canPerformAction($subject->getId(), $user), |
36 | 36 | default => true, |
37 | 37 | }; |
@@ -34,10 +34,10 @@ |
||
34 | 34 | $this->validator->preDelete($command); |
35 | 35 | $deletedPost = $this->fromDeleteCommand($command); |
36 | 36 | $this->transactionFactory |
37 | - ->createTransaction(function () use ($deletedPost) { |
|
37 | + ->createTransaction(function() use ($deletedPost) { |
|
38 | 38 | $this->deletionRepository->deletePost($deletedPost); |
39 | 39 | }) |
40 | - ->afterCommit(function () use ($deletedPost) { |
|
40 | + ->afterCommit(function() use ($deletedPost) { |
|
41 | 41 | $this->publisher->publish(new PostDeletedOEvent($deletedPost)); |
42 | 42 | }) |
43 | 43 | ->execute(); |
@@ -41,10 +41,10 @@ |
||
41 | 41 | $this->validator->preCreate($command); |
42 | 42 | $newPost = $this->fromCreateCommand($command); |
43 | 43 | $id = $this->transactionFactory |
44 | - ->createTransaction(function () use ($newPost) { |
|
44 | + ->createTransaction(function() use ($newPost) { |
|
45 | 45 | return $this->creationRepository->createPost($newPost); |
46 | 46 | }) |
47 | - ->afterCommit(function ($id) use ($newPost) { |
|
47 | + ->afterCommit(function($id) use ($newPost) { |
|
48 | 48 | $this->publisher->publish(new PostCreatedOEvent($id, $newPost)); |
49 | 49 | }) |
50 | 50 | ->execute(); |