Token   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 37
rs 10
ccs 2
cts 2
cp 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A newFactory() 0 3 1
1
<?php
2
3
namespace Bmatovu\AirtelMoney\Models;
4
5
use Bmatovu\AirtelMoney\Auth\Models\TokenInterface;
6
use Bmatovu\AirtelMoney\Database\Factories\TokenFactory;
7
use Bmatovu\AirtelMoney\Traits\TokenUtils;
8
use Illuminate\Database\Eloquent\Factories\Factory;
9
use Illuminate\Database\Eloquent\Factories\HasFactory;
10
use Illuminate\Database\Eloquent\Model as BaseModel;
11
12
class Token extends BaseModel implements TokenInterface
13
{
14
    /**
15
     * @use HasFactory<\Bmatovu\AirtelMoney\Database\Factories\TokenFactory>
16
     */
17
    use HasFactory, TokenUtils;
0 ignored issues
show
Bug introduced by
The trait Illuminate\Database\Eloquent\Factories\HasFactory requires the property $factoryClass which is not provided by Bmatovu\AirtelMoney\Models\Token.
Loading history...
introduced by
The trait Bmatovu\AirtelMoney\Traits\TokenUtils requires some properties which are not provided by Bmatovu\AirtelMoney\Models\Token: $access_token, $refresh_token, $token_type, $expires_at
Loading history...
18
19
    /**
20
     * @var string|null
21
     */
22
    protected $table = 'airtel_money_tokens';
23
24
    /**
25
     * @var list<string>
0 ignored issues
show
Bug introduced by
The type Bmatovu\AirtelMoney\Models\list 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...
26
     */
27
    protected $fillable = [
28
        'access_token',
29
        'refresh_token',
30
        'token_type',
31
        'expires_at',
32
    ];
33
34
    /**
35
     * @var array<string, string>
36
     */
37
    protected $casts = [
38
        'created_at' => 'datetime',
39
        'updated_at' => 'datetime',
40
        'expires_at' => 'datetime',
41
    ];
42
43
    /**
44
     * @return \Bmatovu\AirtelMoney\Database\Factories\TokenFactory
45
     */
46 6
    public static function newFactory(): Factory
47
    {
48 6
        return TokenFactory::new();
49
    }
50
}
51