@@ -8,7 +8,7 @@ |
||
8 | 8 | class InMemoryTransactionFactory implements TransactionFactoryInterface |
9 | 9 | { |
10 | 10 | |
11 | - public function createTransaction($func): TransactionInterface |
|
11 | + public function createTransaction($func): TransactionInterface |
|
12 | 12 | { |
13 | 13 | return new InMemoryTransaction($func); |
14 | 14 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * @return mixed |
27 | 27 | * @throws \Exception |
28 | 28 | */ |
29 | - public function execute(): mixed |
|
29 | + public function execute(): mixed |
|
30 | 30 | { |
31 | 31 | try { |
32 | 32 | $handler = $this->func; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * @param $func |
49 | 49 | * @return $this |
50 | 50 | */ |
51 | - public function afterCommit($func): TransactionInterface |
|
51 | + public function afterCommit($func): TransactionInterface |
|
52 | 52 | { |
53 | 53 | $this->afterCommit->add($func); |
54 | 54 | return $this; |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * @param $func |
59 | 59 | * @return $this |
60 | 60 | */ |
61 | - public function afterRollback($func): TransactionInterface |
|
61 | + public function afterRollback($func): TransactionInterface |
|
62 | 62 | { |
63 | 63 | $this->afterRollback->add($func); |
64 | 64 | return $this; |
@@ -20,7 +20,7 @@ |
||
20 | 20 | } |
21 | 21 | |
22 | 22 | |
23 | - public function getUser(): LoggedInUser |
|
23 | + public function getUser(): LoggedInUser |
|
24 | 24 | { |
25 | 25 | return new LoggedInUser( |
26 | 26 | InMemoryLoggedInUserProvider::$USER_ID, |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * @param CreateNewPostDto $newPost |
16 | 16 | * @return Ulid |
17 | 17 | */ |
18 | - public function createPost(CreateNewPostDto $newPost): Ulid |
|
18 | + public function createPost(CreateNewPostDto $newPost): Ulid |
|
19 | 19 | { |
20 | 20 | $id = new Ulid(); |
21 | 21 | $em = $this->getEntityManager(); |
@@ -62,10 +62,10 @@ |
||
62 | 62 | public function updatePostHeader(UpdateExistingTagsPostHeaderDto $updatedPostHeader): void |
63 | 63 | { |
64 | 64 | foreach (self::$postHeaders |
65 | - ->filter(function ($header) use ($updatedPostHeader) { |
|
66 | - return $header->getId() == $updatedPostHeader->getId() && $header->getVersion() <= $updatedPostHeader->getVersion(); |
|
67 | - }) |
|
68 | - ->toArray() as $header) { |
|
65 | + ->filter(function ($header) use ($updatedPostHeader) { |
|
66 | + return $header->getId() == $updatedPostHeader->getId() && $header->getVersion() <= $updatedPostHeader->getVersion(); |
|
67 | + }) |
|
68 | + ->toArray() as $header) { |
|
69 | 69 | $header->setTitle($updatedPostHeader->getTitle()); |
70 | 70 | $header->setSummary($updatedPostHeader->getSummary()); |
71 | 71 | $header->setVersion($updatedPostHeader->getVersion()); |
@@ -24,14 +24,14 @@ |
||
24 | 24 | * @param Ulid $postId |
25 | 25 | * @param array $tags |
26 | 26 | */ |
27 | - public function createUpdateTags(Ulid $postId, array $tags): void |
|
27 | + public function createUpdateTags(Ulid $postId, array $tags): void |
|
28 | 28 | { |
29 | 29 | $this->tagsUpdatingRepository->updatePostTags($postId, $tags); |
30 | 30 | $this->deleteEmptyTags(); |
31 | 31 | } |
32 | 32 | |
33 | 33 | |
34 | - public function deleteEmptyTags(): void |
|
34 | + public function deleteEmptyTags(): void |
|
35 | 35 | { |
36 | 36 | $this->tagsDeletingRepository->deleteEmptyTags(); |
37 | 37 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * @param $func |
24 | 24 | * @return TransactionInterface |
25 | 25 | */ |
26 | - public function createTransaction($func): TransactionInterface |
|
26 | + public function createTransaction($func): TransactionInterface |
|
27 | 27 | { |
28 | 28 | $em = $this->getEntityManager(); |
29 | 29 | if(!$em->isOpen()) { |
@@ -53,10 +53,10 @@ |
||
53 | 53 | public function updatePostHeader(UpdateExistingCommentsPostHeaderDto $updatedPostHeader): void |
54 | 54 | { |
55 | 55 | foreach (self::$postHeaders |
56 | - ->filter(function ($header) use ($updatedPostHeader) { |
|
57 | - return $header->getId() == $updatedPostHeader->getId() && $header->getVersion() <= $updatedPostHeader->getVersion(); |
|
58 | - }) |
|
59 | - ->toArray() as $header) { |
|
56 | + ->filter(function ($header) use ($updatedPostHeader) { |
|
57 | + return $header->getId() == $updatedPostHeader->getId() && $header->getVersion() <= $updatedPostHeader->getVersion(); |
|
58 | + }) |
|
59 | + ->toArray() as $header) { |
|
60 | 60 | $header->setTitle($updatedPostHeader->getTitle()); |
61 | 61 | $header->setTags($updatedPostHeader->getTags()); |
62 | 62 | $header->setVersion($updatedPostHeader->getVersion()); |