@@ -119,7 +119,7 @@ |
||
| 119 | 119 | * |
| 120 | 120 | * @param string $threadId |
| 121 | 121 | * |
| 122 | - * @return array list($type, $entityId) |
|
| 122 | + * @return string[] list($type, $entityId) |
|
| 123 | 123 | */ |
| 124 | 124 | private function getThreadIdParts($threadId) |
| 125 | 125 | { |
@@ -90,12 +90,12 @@ discard block |
||
| 90 | 90 | $this->dispatcher->dispatch(Events::PRE_PERSIST_EVENT, Argument::type(CommentEvent::class)) |
| 91 | 91 | ->shouldBeCalledTimes(1) |
| 92 | 92 | ->will( |
| 93 | - function () use ($commentRepository, $comment, $dispatcher, $thread) { |
|
| 93 | + function() use ($commentRepository, $comment, $dispatcher, $thread) { |
|
| 94 | 94 | $thread->addComment($comment->reveal())->willReturn($thread->reveal()); |
| 95 | 95 | $commentRepository->persist($comment->reveal()) |
| 96 | 96 | ->shouldBeCalledTimes(1) |
| 97 | 97 | ->will( |
| 98 | - function () use ($dispatcher, $thread) { |
|
| 98 | + function() use ($dispatcher, $thread) { |
|
| 99 | 99 | $dispatcher->dispatch( |
| 100 | 100 | Events::POST_PERSIST_EVENT, |
| 101 | 101 | Argument::type(CommentEvent::class) |
@@ -125,12 +125,12 @@ discard block |
||
| 125 | 125 | $this->dispatcher->dispatch(Events::PRE_PERSIST_EVENT, Argument::type(CommentEvent::class)) |
| 126 | 126 | ->shouldBeCalledTimes(1) |
| 127 | 127 | ->will( |
| 128 | - function () use ($commentRepository, $comment, $dispatcher, $thread) { |
|
| 128 | + function() use ($commentRepository, $comment, $dispatcher, $thread) { |
|
| 129 | 129 | $thread->addComment($comment->reveal())->willReturn($thread->reveal()); |
| 130 | 130 | $commentRepository->persist($comment->reveal()) |
| 131 | 131 | ->shouldBeCalledTimes(1) |
| 132 | 132 | ->will( |
| 133 | - function () use ($dispatcher, $thread) { |
|
| 133 | + function() use ($dispatcher, $thread) { |
|
| 134 | 134 | $dispatcher->dispatch( |
| 135 | 135 | Events::POST_PERSIST_EVENT, |
| 136 | 136 | Argument::type(CommentEvent::class) |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $this->dispatcher->dispatch( |
| 157 | 157 | Events::PRE_UPDATE_EVENT, |
| 158 | 158 | Argument::that( |
| 159 | - function (CommentEvent $event) use ($comment) { |
|
| 159 | + function(CommentEvent $event) use ($comment) { |
|
| 160 | 160 | return $event->getComment() === $comment->reveal(); |
| 161 | 161 | } |
| 162 | 162 | ) |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | $this->dispatcher->dispatch( |
| 173 | 173 | Events::THREAD_PRE_UPDATE_EVENT, |
| 174 | 174 | Argument::that( |
| 175 | - function (ThreadEvent $event) use ($thread) { |
|
| 175 | + function(ThreadEvent $event) use ($thread) { |
|
| 176 | 176 | return $event->getThread() === $thread->reveal(); |
| 177 | 177 | } |
| 178 | 178 | ) |
@@ -203,16 +203,16 @@ discard block |
||
| 203 | 203 | $this->dispatcher->dispatch( |
| 204 | 204 | Events::PRE_DELETE_EVENT, |
| 205 | 205 | Argument::that( |
| 206 | - function (CommentEvent $event) use ($comment) { |
|
| 206 | + function(CommentEvent $event) use ($comment) { |
|
| 207 | 207 | return $event->getComment() === $comment->reveal(); |
| 208 | 208 | } |
| 209 | 209 | ) |
| 210 | 210 | )->will( |
| 211 | - function () use ($comment, $dispatcher) { |
|
| 211 | + function() use ($comment, $dispatcher) { |
|
| 212 | 212 | $dispatcher->dispatch( |
| 213 | 213 | Events::POST_DELETE_EVENT, |
| 214 | 214 | Argument::that( |
| 215 | - function (CommentEvent $event) use ($comment) { |
|
| 215 | + function(CommentEvent $event) use ($comment) { |
|
| 216 | 216 | return $event->getComment() === $comment->reveal(); |
| 217 | 217 | } |
| 218 | 218 | ) |
@@ -248,16 +248,16 @@ discard block |
||
| 248 | 248 | $this->dispatcher->dispatch( |
| 249 | 249 | Events::PRE_DELETE_EVENT, |
| 250 | 250 | Argument::that( |
| 251 | - function (CommentEvent $event) use ($comment) { |
|
| 251 | + function(CommentEvent $event) use ($comment) { |
|
| 252 | 252 | return $event->getComment() === $comment->reveal(); |
| 253 | 253 | } |
| 254 | 254 | ) |
| 255 | 255 | )->will( |
| 256 | - function () use ($comment, $dispatcher) { |
|
| 256 | + function() use ($comment, $dispatcher) { |
|
| 257 | 257 | $dispatcher->dispatch( |
| 258 | 258 | Events::POST_DELETE_EVENT, |
| 259 | 259 | Argument::that( |
| 260 | - function (CommentEvent $event) use ($comment) { |
|
| 260 | + function(CommentEvent $event) use ($comment) { |
|
| 261 | 261 | return $event->getComment() === $comment->reveal(); |
| 262 | 262 | } |
| 263 | 263 | ) |
@@ -290,16 +290,16 @@ discard block |
||
| 290 | 290 | $this->dispatcher->dispatch( |
| 291 | 291 | Events::THREAD_PRE_DELETE_EVENT, |
| 292 | 292 | Argument::that( |
| 293 | - function (ThreadEvent $event) use ($thread) { |
|
| 293 | + function(ThreadEvent $event) use ($thread) { |
|
| 294 | 294 | return $event->getThread() === $thread->reveal(); |
| 295 | 295 | } |
| 296 | 296 | ) |
| 297 | 297 | )->will( |
| 298 | - function () use ($thread, $dispatcher) { |
|
| 298 | + function() use ($thread, $dispatcher) { |
|
| 299 | 299 | $dispatcher->dispatch( |
| 300 | 300 | Events::THREAD_POST_DELETE_EVENT, |
| 301 | 301 | Argument::that( |
| 302 | - function (ThreadEvent $event) use ($thread) { |
|
| 302 | + function(ThreadEvent $event) use ($thread) { |
|
| 303 | 303 | return $event->getThread() === $thread->reveal(); |
| 304 | 304 | } |
| 305 | 305 | ) |
@@ -330,16 +330,16 @@ discard block |
||
| 330 | 330 | $this->dispatcher->dispatch( |
| 331 | 331 | Events::THREAD_PRE_DELETE_EVENT, |
| 332 | 332 | Argument::that( |
| 333 | - function (ThreadEvent $event) use ($thread) { |
|
| 333 | + function(ThreadEvent $event) use ($thread) { |
|
| 334 | 334 | return $event->getThread() === $thread->reveal(); |
| 335 | 335 | } |
| 336 | 336 | ) |
| 337 | 337 | )->will( |
| 338 | - function () use ($thread, $dispatcher) { |
|
| 338 | + function() use ($thread, $dispatcher) { |
|
| 339 | 339 | $dispatcher->dispatch( |
| 340 | 340 | Events::THREAD_POST_DELETE_EVENT, |
| 341 | 341 | Argument::that( |
| 342 | - function (ThreadEvent $event) use ($thread) { |
|
| 342 | + function(ThreadEvent $event) use ($thread) { |
|
| 343 | 343 | return $event->getThread() === $thread->reveal(); |
| 344 | 344 | } |
| 345 | 345 | ) |
@@ -365,7 +365,7 @@ discard block |
||
| 365 | 365 | $this->dispatcher->dispatch( |
| 366 | 366 | Events::PUBLISH_EVENT, |
| 367 | 367 | Argument::that( |
| 368 | - function (CommentEvent $event) use ($comment) { |
|
| 368 | + function(CommentEvent $event) use ($comment) { |
|
| 369 | 369 | return $event->getComment() === $comment->reveal(); |
| 370 | 370 | } |
| 371 | 371 | ) |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | $this->dispatcher->dispatch( |
| 384 | 384 | Events::PUBLISH_EVENT, |
| 385 | 385 | Argument::that( |
| 386 | - function (CommentEvent $event) use ($comment) { |
|
| 386 | + function(CommentEvent $event) use ($comment) { |
|
| 387 | 387 | return $event->getComment() === $comment->reveal(); |
| 388 | 388 | } |
| 389 | 389 | ) |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | $this->dispatcher->dispatch( |
| 403 | 403 | Events::UNPUBLISH_EVENT, |
| 404 | 404 | Argument::that( |
| 405 | - function (CommentEvent $event) use ($comment) { |
|
| 405 | + function(CommentEvent $event) use ($comment) { |
|
| 406 | 406 | return $event->getComment() === $comment->reveal(); |
| 407 | 407 | } |
| 408 | 408 | ) |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | $this->dispatcher->dispatch( |
| 421 | 421 | Events::UNPUBLISH_EVENT, |
| 422 | 422 | Argument::that( |
| 423 | - function (CommentEvent $event) use ($comment) { |
|
| 423 | + function(CommentEvent $event) use ($comment) { |
|
| 424 | 424 | return $event->getComment() === $comment->reveal(); |
| 425 | 425 | } |
| 426 | 426 | ) |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | '/api/threads?ids=' . implode( |
| 112 | 112 | ',', |
| 113 | 113 | array_map( |
| 114 | - function (ThreadInterface $thread) { |
|
| 114 | + function(ThreadInterface $thread) { |
|
| 115 | 115 | return $thread->getId(); |
| 116 | 116 | }, |
| 117 | 117 | [$threads[0], $threads[1]] |
@@ -157,7 +157,7 @@ |
||
| 157 | 157 | '/api/comments?ids=' . implode( |
| 158 | 158 | ',', |
| 159 | 159 | array_map( |
| 160 | - function (CommentInterface $comment) { |
|
| 160 | + function(CommentInterface $comment) { |
|
| 161 | 161 | return $comment->getId(); |
| 162 | 162 | }, |
| 163 | 163 | [$comments[0], $comments[1]] |