@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * @param CommentCreatedPostsIEvent $event |
29 | 29 | */ |
30 | - public function onCommentCreated(CommentCreatedPostsIEvent $event): void |
|
30 | + public function onCommentCreated(CommentCreatedPostsIEvent $event): void |
|
31 | 31 | { |
32 | 32 | $this->postValidator->preHandleCommentCreated($event); |
33 | 33 | $this->transactionFactory |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | ->execute(); |
43 | 43 | } |
44 | 44 | |
45 | - public function onCommentsBaselined(CommentsBaselinedPostsIEvent $event): void |
|
45 | + public function onCommentsBaselined(CommentsBaselinedPostsIEvent $event): void |
|
46 | 46 | { |
47 | 47 | $this->postValidator->preHandleCommentsBaselined($event); |
48 | 48 | $this->transactionFactory |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @param FindAllPostsQuery $query |
29 | 29 | * @return Page<FindPostHeaderQueryResponse> |
30 | 30 | */ |
31 | - public function findAllPosts(FindAllPostsQuery $query): Page |
|
31 | + public function findAllPosts(FindAllPostsQuery $query): Page |
|
32 | 32 | { |
33 | 33 | $page = $this->findingRepository->findPosts($query->getPageNo()); |
34 | 34 | return new Page(Collection::from( |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * @param FindPostByIdQuery $query |
49 | 49 | * @return FindPostQueryResponse|null |
50 | 50 | */ |
51 | - public function findPostById(FindPostByIdQuery $query): ?FindPostQueryResponse |
|
51 | + public function findPostById(FindPostByIdQuery $query): ?FindPostQueryResponse |
|
52 | 52 | { |
53 | 53 | return $this->toSinglePostResponse( |
54 | 54 | $this->findingRepository->findPost($query->getId()) |
@@ -11,5 +11,5 @@ |
||
11 | 11 | * @param CreateNewPostDto $newPost |
12 | 12 | * @return Ulid - id of the new Post |
13 | 13 | */ |
14 | - public function createPost(CreateNewPostDto $newPost): Ulid; |
|
14 | + public function createPost(CreateNewPostDto $newPost): Ulid; |
|
15 | 15 | } |
16 | 16 | \ No newline at end of file |
@@ -9,5 +9,5 @@ |
||
9 | 9 | /** |
10 | 10 | * @param UpdateExistingPostDto $dto |
11 | 11 | */ |
12 | - public function updatePost(UpdateExistingPostDto $dto): void; |
|
12 | + public function updatePost(UpdateExistingPostDto $dto): void; |
|
13 | 13 | } |
14 | 14 | \ No newline at end of file |
@@ -9,5 +9,5 @@ |
||
9 | 9 | /** |
10 | 10 | * @param DeleteExistingPostDto $dto |
11 | 11 | */ |
12 | - public function deletePost(DeleteExistingPostDto $dto): void; |
|
12 | + public function deletePost(DeleteExistingPostDto $dto): void; |
|
13 | 13 | } |
14 | 14 | \ No newline at end of file |
@@ -21,39 +21,39 @@ |
||
21 | 21 | * @param CreatePostCommand $command |
22 | 22 | * @return CreatePostCommandResponse |
23 | 23 | */ |
24 | - public function createPost(CreatePostCommand $command): CreatePostCommandResponse; |
|
24 | + public function createPost(CreatePostCommand $command): CreatePostCommandResponse; |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * @param UpdatePostCommand $command |
28 | 28 | */ |
29 | - public function updatePost(UpdatePostCommand $command): void; |
|
29 | + public function updatePost(UpdatePostCommand $command): void; |
|
30 | 30 | |
31 | 31 | /** |
32 | 32 | * @param DeletePostCommand $command |
33 | 33 | */ |
34 | - public function deletePost(DeletePostCommand $command): void; |
|
34 | + public function deletePost(DeletePostCommand $command): void; |
|
35 | 35 | |
36 | 36 | /** |
37 | 37 | * @param FindAllPostsQuery $query |
38 | 38 | * @return Page<FindPostQueryResponse> |
39 | 39 | */ |
40 | - public function findAllPosts(FindAllPostsQuery $query): Page; |
|
40 | + public function findAllPosts(FindAllPostsQuery $query): Page; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * @param FindPostByIdQuery $query |
44 | 44 | * @return FindPostQueryResponse|null |
45 | 45 | */ |
46 | - public function findPostById(FindPostByIdQuery $query): ?FindPostQueryResponse; |
|
46 | + public function findPostById(FindPostByIdQuery $query): ?FindPostQueryResponse; |
|
47 | 47 | |
48 | 48 | /** |
49 | 49 | * @param CommentCreatedPostsIEvent $event |
50 | 50 | */ |
51 | - public function onCommentCreated(CommentCreatedPostsIEvent $event): void; |
|
51 | + public function onCommentCreated(CommentCreatedPostsIEvent $event): void; |
|
52 | 52 | |
53 | 53 | /** |
54 | 54 | * @param CommentsBaselinedPostsIEvent $event |
55 | 55 | */ |
56 | - public function onCommentsBaselined(CommentsBaselinedPostsIEvent $event): void; |
|
56 | + public function onCommentsBaselined(CommentsBaselinedPostsIEvent $event): void; |
|
57 | 57 | |
58 | 58 | /** |
59 | 59 | * @param BaselinePostsCommand $command |
@@ -8,9 +8,9 @@ |
||
8 | 8 | */ |
9 | 9 | interface TransactionInterface |
10 | 10 | { |
11 | - public function afterCommit($func): self; |
|
11 | + public function afterCommit($func): self; |
|
12 | 12 | |
13 | - public function afterRollback($func): self; |
|
13 | + public function afterRollback($func): self; |
|
14 | 14 | |
15 | - public function execute(): mixed; |
|
15 | + public function execute(): mixed; |
|
16 | 16 | } |
17 | 17 | \ No newline at end of file |
@@ -12,6 +12,6 @@ |
||
12 | 12 | * @param $func |
13 | 13 | * @return TransactionInterface |
14 | 14 | */ |
15 | - public function createTransaction($func): TransactionInterface; |
|
15 | + public function createTransaction($func): TransactionInterface; |
|
16 | 16 | |
17 | 17 | } |
18 | 18 | \ No newline at end of file |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @return mixed |
29 | 29 | * @throws \Exception |
30 | 30 | */ |
31 | - public function execute(): mixed |
|
31 | + public function execute(): mixed |
|
32 | 32 | { |
33 | 33 | try { |
34 | 34 | $result = $this->entityManager->wrapInTransaction($this->func); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * @param $func |
49 | 49 | * @return $this |
50 | 50 | */ |
51 | - public function afterCommit($func): self |
|
51 | + public function afterCommit($func): self |
|
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): self |
|
61 | + public function afterRollback($func): self |
|
62 | 62 | { |
63 | 63 | $this->afterRollback->add($func); |
64 | 64 | return $this; |