@@ -31,6 +31,9 @@ |
||
31 | 31 | $this->storedEventModel::store($event); |
32 | 32 | } |
33 | 33 | |
34 | + /** |
|
35 | + * @param string $event |
|
36 | + */ |
|
34 | 37 | private function shouldBeStored($event): bool |
35 | 38 | { |
36 | 39 | if (! class_exists($event)) { |
@@ -3,10 +3,10 @@ |
||
3 | 3 | namespace Spatie\EventProjector\Console; |
4 | 4 | |
5 | 5 | use Illuminate\Console\Command; |
6 | -use Illuminate\Support\Collection; |
|
7 | 6 | use Illuminate\Filesystem\Filesystem; |
8 | -use Spatie\EventProjector\Projectionist; |
|
7 | +use Illuminate\Support\Collection; |
|
9 | 8 | use Spatie\EventProjector\EventHandlers\EventHandler; |
9 | +use Spatie\EventProjector\Projectionist; |
|
10 | 10 | |
11 | 11 | final class CacheEventHandlersCommand extends Command |
12 | 12 | { |
@@ -5,15 +5,15 @@ |
||
5 | 5 | use Exception; |
6 | 6 | use Illuminate\Support\Arr; |
7 | 7 | use Illuminate\Support\Collection; |
8 | -use Spatie\EventProjector\Models\StoredEvent; |
|
9 | -use Spatie\EventProjector\Projectors\Projector; |
|
10 | 8 | use Spatie\EventProjector\EventHandlers\EventHandler; |
9 | +use Spatie\EventProjector\EventHandlers\EventHandlerCollection; |
|
10 | +use Spatie\EventProjector\Events\EventHandlerFailedHandlingEvent; |
|
11 | 11 | use Spatie\EventProjector\Events\FinishedEventReplay; |
12 | 12 | use Spatie\EventProjector\Events\StartingEventReplay; |
13 | -use Spatie\EventProjector\Projectors\QueuedProjector; |
|
14 | 13 | use Spatie\EventProjector\Exceptions\InvalidEventHandler; |
15 | -use Spatie\EventProjector\EventHandlers\EventHandlerCollection; |
|
16 | -use Spatie\EventProjector\Events\EventHandlerFailedHandlingEvent; |
|
14 | +use Spatie\EventProjector\Models\StoredEvent; |
|
15 | +use Spatie\EventProjector\Projectors\Projector; |
|
16 | +use Spatie\EventProjector\Projectors\QueuedProjector; |
|
17 | 17 | |
18 | 18 | final class Projectionist |
19 | 19 | { |
@@ -3,11 +3,11 @@ |
||
3 | 3 | namespace Spatie\EventProjector\Console; |
4 | 4 | |
5 | 5 | use Exception; |
6 | -use InvalidArgumentException; |
|
7 | 6 | use Illuminate\Console\Command; |
8 | 7 | use Illuminate\Support\Collection; |
9 | -use Spatie\EventProjector\Projectionist; |
|
8 | +use InvalidArgumentException; |
|
10 | 9 | use Spatie\EventProjector\Models\StoredEvent; |
10 | +use Spatie\EventProjector\Projectionist; |
|
11 | 11 | |
12 | 12 | class ReplayCommand extends Command |
13 | 13 | { |
@@ -2,16 +2,16 @@ |
||
2 | 2 | |
3 | 3 | namespace Spatie\EventProjector\Models; |
4 | 4 | |
5 | -use Exception; |
|
6 | 5 | use Carbon\Carbon; |
7 | -use Illuminate\Support\Arr; |
|
8 | -use Illuminate\Database\Eloquent\Model; |
|
6 | +use Exception; |
|
9 | 7 | use Illuminate\Database\Eloquent\Builder; |
10 | -use Spatie\EventProjector\ShouldBeStored; |
|
8 | +use Illuminate\Database\Eloquent\Model; |
|
9 | +use Illuminate\Support\Arr; |
|
10 | +use Spatie\EventProjector\EventSerializers\EventSerializer; |
|
11 | +use Spatie\EventProjector\Exceptions\InvalidStoredEvent; |
|
11 | 12 | use Spatie\EventProjector\Facades\Projectionist; |
13 | +use Spatie\EventProjector\ShouldBeStored; |
|
12 | 14 | use Spatie\SchemalessAttributes\SchemalessAttributes; |
13 | -use Spatie\EventProjector\Exceptions\InvalidStoredEvent; |
|
14 | -use Spatie\EventProjector\EventSerializers\EventSerializer; |
|
15 | 15 | |
16 | 16 | class StoredEvent extends Model |
17 | 17 | { |
@@ -87,7 +87,7 @@ |
||
87 | 87 | /** |
88 | 88 | * @param \Spatie\EventProjector\ShouldBeStored|\Spatie\EventProjector\ShouldBeStored[] $events |
89 | 89 | * |
90 | - * @return $this |
|
90 | + * @return FakeAggregateRoot |
|
91 | 91 | */ |
92 | 92 | public static function fake($events = []): FakeAggregateRoot |
93 | 93 | { |