@@ -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) { |
@@ -38,7 +38,7 @@ |
||
38 | 38 | { |
39 | 39 | $result = []; |
40 | 40 | foreach (InMemoryEventPublisher::$publishedEvents |
41 | - ->filter(function ($event) use ($eventClass) { |
|
41 | + ->filter(function($event) use ($eventClass) { |
|
42 | 42 | return $event::class == $eventClass; |
43 | 43 | }) |
44 | 44 | ->toArray() as $event) { |
@@ -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(); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | */ |
32 | 32 | public function onPostCreated(PostCreatedTagsIEvent $event): void |
33 | 33 | { |
34 | - $this->transactionFactory->createTransaction(function () use ($event) { |
|
34 | + $this->transactionFactory->createTransaction(function() use ($event) { |
|
35 | 35 | $this->postEventsTagsRepository->createPostHeader( |
36 | 36 | new CreateNewTagsPostHeaderDto( |
37 | 37 | $event->getId(), |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function onPostUpdated(PostUpdatedTagsIEvent $event): void |
56 | 56 | { |
57 | - $this->transactionFactory->createTransaction(function () use ($event) { |
|
57 | + $this->transactionFactory->createTransaction(function() use ($event) { |
|
58 | 58 | $this->postEventsTagsRepository->updatePostHeader( |
59 | 59 | new UpdateExistingTagsPostHeaderDto( |
60 | 60 | $event->getId(), |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | */ |
75 | 75 | public function onPostDeleted(PostDeletedTagsIEvent $event): void |
76 | 76 | { |
77 | - $this->transactionFactory->createTransaction(function () use ($event) { |
|
77 | + $this->transactionFactory->createTransaction(function() use ($event) { |
|
78 | 78 | $this->postEventsTagsRepository->deletePostHeader( |
79 | 79 | new DeleteExistingTagsPostHeaderDto($event->getId()) |
80 | 80 | ); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | p.id, p.title, p.body, p.summary, p.tags, p.updatedAt, p.version |
82 | 82 | ) from $postClass p where p.deletedAt is null"; |
83 | 83 | if ($from != null) { |
84 | - $dql = $dql . " and p.createdAt >= :from"; |
|
84 | + $dql = $dql." and p.createdAt >= :from"; |
|
85 | 85 | } |
86 | 86 | $query = $this->getEntityManager()->createQuery( |
87 | 87 | $dql |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $postClass = Post::class; |
102 | 102 | $dql = "select p.id from $postClass p where p.deletedAt is not null"; |
103 | 103 | if ($from != null) { |
104 | - $dql = $dql . " and p.deletedAt >= :from"; |
|
104 | + $dql = $dql." and p.deletedAt >= :from"; |
|
105 | 105 | } |
106 | 106 | $query = $this->getEntityManager()->createQuery( |
107 | 107 | $dql |
@@ -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); |