@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare (strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Tests\EventDispatcher\Helpers; |
| 4 | 4 | |
@@ -28,6 +28,6 @@ discard block |
||
| 28 | 28 | */ |
| 29 | 29 | public function getSubscribedEvents() |
| 30 | 30 | { |
| 31 | - return [TestEvent::class => ['whenTestEvent'],]; |
|
| 31 | + return [TestEvent::class => ['whenTestEvent'], ]; |
|
| 32 | 32 | } |
| 33 | 33 | } |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare (strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Tests\EventDispatcher\Helpers; |
| 4 | 4 | |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | public function test_pushing_event_to_queue() |
| 26 | 26 | { |
| 27 | 27 | $container = new Container(); |
| 28 | - // $container->bind(\Illuminate\Contracts\Container\Container::class, $container); |
|
| 28 | + // $container->bind(\Illuminate\Contracts\Container\Container::class, $container); |
|
| 29 | 29 | $queue = new Queue($container); |
| 30 | 30 | |
| 31 | 31 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare (strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace Tests\EventDispatcher; |
| 4 | 4 | |
@@ -1,4 +1,4 @@ |
||
| 1 | -<?php declare (strict_types=1); |
|
| 1 | +<?php declare (strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace SmoothPhp\LaravelAdapter\QueuedEventDispatcher; |
| 4 | 4 | |
@@ -49,8 +49,8 @@ discard block |
||
| 49 | 49 | public function handle() |
| 50 | 50 | { |
| 51 | 51 | if ($this->option('force') == 'true' || $this->confirm("Are you sure you want to make a new table '{$this->config->get('cqrses.eventstore_table')}'" |
| 52 | - . " on connection '{$this->config->get('cqrses.eventstore_connection')}'" |
|
| 53 | - . " Do you wish to continue?") |
|
| 52 | + . " on connection '{$this->config->get('cqrses.eventstore_connection')}'" |
|
| 53 | + . " Do you wish to continue?") |
|
| 54 | 54 | ) { |
| 55 | 55 | try { |
| 56 | 56 | return $this->buildEventStoreTable(); |
@@ -67,18 +67,18 @@ discard block |
||
| 67 | 67 | protected function buildEventStoreTable() |
| 68 | 68 | { |
| 69 | 69 | Schema::connection($this->config->get('cqrses.eventstore_connection')) |
| 70 | - ->create($this->config->get('cqrses.eventstore_table'), |
|
| 71 | - function (Blueprint $table) { |
|
| 72 | - $table->increments('id'); |
|
| 73 | - $table->string('uuid', 56); |
|
| 74 | - $table->integer('playhead')->unsigned(); |
|
| 75 | - $table->text('metadata'); |
|
| 76 | - $table->longText('payload'); |
|
| 77 | - $table->timestamp('recorded_on')->nullable()->index(); |
|
| 78 | - $table->string('type', 255)->index(); |
|
| 79 | - $table->unique(['uuid', 'playhead']); |
|
| 70 | + ->create($this->config->get('cqrses.eventstore_table'), |
|
| 71 | + function (Blueprint $table) { |
|
| 72 | + $table->increments('id'); |
|
| 73 | + $table->string('uuid', 56); |
|
| 74 | + $table->integer('playhead')->unsigned(); |
|
| 75 | + $table->text('metadata'); |
|
| 76 | + $table->longText('payload'); |
|
| 77 | + $table->timestamp('recorded_on')->nullable()->index(); |
|
| 78 | + $table->string('type', 255)->index(); |
|
| 79 | + $table->unique(['uuid', 'playhead']); |
|
| 80 | 80 | |
| 81 | - $table->index(['id','type']); |
|
| 82 | - }); |
|
| 81 | + $table->index(['id','type']); |
|
| 82 | + }); |
|
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | \ No newline at end of file |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | { |
| 69 | 69 | Schema::connection($this->config->get('cqrses.eventstore_connection')) |
| 70 | 70 | ->create($this->config->get('cqrses.eventstore_table'), |
| 71 | - function (Blueprint $table) { |
|
| 71 | + function(Blueprint $table) { |
|
| 72 | 72 | $table->increments('id'); |
| 73 | 73 | $table->string('uuid', 56); |
| 74 | 74 | $table->integer('playhead')->unsigned(); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $table->string('type', 255)->index(); |
| 79 | 79 | $table->unique(['uuid', 'playhead']); |
| 80 | 80 | |
| 81 | - $table->index(['id','type']); |
|
| 81 | + $table->index(['id', 'type']); |
|
| 82 | 82 | }); |
| 83 | 83 | } |
| 84 | 84 | } |
| 85 | 85 | \ No newline at end of file |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | $this->queue->push( |
| 45 | 45 | QueueToEventDispatcher::class, |
| 46 | 46 | [ |
| 47 | - 'uuid' => (string)$domainMessage->getId(), |
|
| 47 | + 'uuid' => (string) $domainMessage->getId(), |
|
| 48 | 48 | 'playhead' => $domainMessage->getPlayHead(), |
| 49 | 49 | 'metadata' => json_encode($this->serializer->serialize($domainMessage->getMetadata())), |
| 50 | 50 | 'payload' => json_encode($this->serializer->serialize($domainMessage->getPayload())), |