ApiAuthAccessEvent::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
4
namespace ArcherZdip\LaravelApiAuth\Models;
5
6
7
use Illuminate\Database\Eloquent\Model;
0 ignored issues
show
Bug introduced by
The type Illuminate\Database\Eloquent\Model 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
9
class ApiAuthAccessEvent extends Model
10
{
11
    /**
12
     * The attributes that are mass assignable.
13
     *
14
     * @var array
15
     */
16
    protected $fillable = [
17
        'appid',
18
        'ip_address',
19
        'url',
20
        'params',
21
        'response_time',
22
        'type',
23
    ];
24
25
    /**
26
     * The attributes that should be hidden for arrays.
27
     *
28
     * @var array
29
     */
30
    protected $hidden = [];
31
32
    protected $casts = [
33
        'params' => 'array'
34
    ];
35
36
    /**
37
     * ApiAuthAccessEvent constructor.
38
     * @param array $attributes
39
     */
40
    public function __construct(array $attributes = [])
41
    {
42
        parent::__construct($attributes);
43
44
        $this->setTable(config('apikey.table_name.api_auth_access_events'));
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

44
        $this->setTable(/** @scrutinizer ignore-call */ config('apikey.table_name.api_auth_access_events'));
Loading history...
45
    }
46
}