EventSourcingListener::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace SaasReady\Listeners;
4
5
use Illuminate\Bus\Queueable;
0 ignored issues
show
Bug introduced by
The type Illuminate\Bus\Queueable was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Illuminate\Contracts\Queue\ShouldQueue;
0 ignored issues
show
Bug introduced by
The type Illuminate\Contracts\Queue\ShouldQueue was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
use Illuminate\Foundation\Bus\Dispatchable;
0 ignored issues
show
Bug introduced by
The type Illuminate\Foundation\Bus\Dispatchable was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
8
use Illuminate\Queue\InteractsWithQueue;
0 ignored issues
show
Bug introduced by
The type Illuminate\Queue\InteractsWithQueue was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
use Illuminate\Queue\SerializesModels;
0 ignored issues
show
Bug introduced by
The type Illuminate\Queue\SerializesModels was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
10
use SaasReady\Contracts\EventSourcingContract;
11
use SaasReady\Models\Event;
12
13
/**
14
 * @method static static dispatch(EventSourcingContract $event)
15
 * @method static static dispatchSync(EventSourcingContract $event)
16
 */
17
class EventSourcingListener implements ShouldQueue
18
{
19
    use Dispatchable;
20
    use Queueable;
21
    use SerializesModels;
22
    use InteractsWithQueue;
23
24
    public function __construct(public EventSourcingContract $event)
25
    {
26
    }
27
28
    public function handle(): void
29
    {
30
        Event::createFromContract($this->event);
31
    }
32
}
33