LogAuthenticated   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handle() 0 4 2
A __construct() 0 2 1
1
<?php
2
3
namespace jeremykenedy\LaravelLogger\App\Listeners;
4
5
use Illuminate\Auth\Events\Authenticated;
0 ignored issues
show
Bug introduced by
The type Illuminate\Auth\Events\Authenticated 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 LogAuthenticated
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 ANY authenticated event.
24
     *
25
     * @param Authenticated $event
26
     *
27
     * @return void
28
     */
29
    public function handle(Authenticated $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 */ Authenticated $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.logAllAuthEvents')) {
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.logAllAuthEvents')) {
Loading history...
32
            ActivityLogger::activity('Authenticated Activity');
33
        }
34
    }
35
}
36