LogSuccessfulLogout::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 0
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace jeremykenedy\LaravelLogger\App\Listeners;
4
5
use Illuminate\Auth\Events\Logout;
0 ignored issues
show
Bug introduced by
The type Illuminate\Auth\Events\Logout 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 jeremykenedy\LaravelLogger\App\Http\Traits\ActivityLogger;
7
8
class LogSuccessfulLogout
9
{
10
    use ActivityLogger;
11
12
    /**
13
     * Create the event listener.
14
     *
15
     * @return void
16
     */
17
    public function __construct()
18
    {
19
        //
20
    }
21
22
    /**
23
     * Handle the event.
24
     *
25
     * @param Logout $event
26
     *
27
     * @return void
28
     */
29
    public function handle(Logout $event)
0 ignored issues
show
Unused Code introduced by
The parameter $event is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

29
    public function handle(/** @scrutinizer ignore-unused */ Logout $event)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
30
    {
31
        if (config('LaravelLogger.logSuccessfulLogout')) {
0 ignored issues
show
Bug introduced by
The function config was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

31
        if (/** @scrutinizer ignore-call */ config('LaravelLogger.logSuccessfulLogout')) {
Loading history...
32
            ActivityLogger::activity('Logged Out');
33
        }
34
    }
35
}
36