Event   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 27
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getListeners() 0 3 1
A fire() 0 3 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace Hhxsv5\LaravelS\Swoole\Task;
4
5
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...
6
7
abstract class Event extends BaseTask
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class Event
Loading history...
8
{
9
    use SerializesModels;
10
11
    /**
12
     * The listeners for this event.
13
     * @return array
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
14
     */
15
    protected $listeners = [];
16
17
    /**
18
     * Get the listener list for this event.
19
     * @return array
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
20
     */
21
    public function getListeners()
22
    {
23
        return $this->listeners;
24
    }
25
26
    /**
27
     * Trigger an event
28
     * @param Event $event
0 ignored issues
show
Coding Style introduced by
There must be exactly one blank line before the tags in a doc comment
Loading history...
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Tag value for @param tag indented incorrectly; expected 2 spaces but found 1
Loading history...
29
     * @return bool
0 ignored issues
show
Coding Style introduced by
Tag @return cannot be grouped with parameter tags in a doc comment
Loading history...
30
     */
31
    public static function fire(self $event)
32
    {
33
        return $event->task($event);
34
    }
35
}