GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — laravel-8 ( 5f420c )
by Toby
15:16
created

FileStatus   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 8
c 2
b 0
f 0
dl 0
loc 30
ccs 6
cts 6
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A serializeDate() 0 3 1
A getCreatedByAttribute() 0 3 1
A file() 0 3 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
4
namespace BristolSU\Module\UploadFile\Models;
5
6
7
use BristolSU\ControlDB\Contracts\Repositories\User as UserRepository;
8
use BristolSU\Support\Revision\HasRevisions;
9
use Illuminate\Database\Eloquent\Model;
10
use Illuminate\Database\Eloquent\SoftDeletes;
11
12
class FileStatus extends Model
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class FileStatus
Loading history...
13
{
14
    use SoftDeletes, HasRevisions;
0 ignored issues
show
introduced by
The trait BristolSU\Support\Revision\HasRevisions requires some properties which are not provided by BristolSU\Module\UploadFile\Models\FileStatus: $revisionNullString, $revisionEnabled, $revisionFormattedFields, $keepRevisionOf, $revisionUnknownString, $revisionFormattedFieldNames, $revisionCreationsEnabled, $softDelete
Loading history...
15
    
16
    protected $table = 'uploadfile_file_statuses';
17
18
    protected $fillable = [
19
        'file_id', 'status', 'created_by'
20
    ];
21
22
    /**
23
     * Prepare a date for array / JSON serialization.
24
     *
25
     * @param  \DateTimeInterface  $date
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter type; 2 found
Loading history...
26
     * @return string
0 ignored issues
show
Coding Style introduced by
Tag @return cannot be grouped with parameter tags in a doc comment
Loading history...
27
     */
28 4
    protected function serializeDate(\DateTimeInterface $date)   
29
    {
30 4
        return $date->format('Y-m-d H:i:s');
31
    }
32
33
    
34 1
    public function file()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function file()
Loading history...
35
    {
36 1
        return $this->belongsTo(File::class);
37
    }
38
39 5
    public function getCreatedByAttribute($createdById)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function getCreatedByAttribute()
Loading history...
40
    {
41 5
        return app()->make(UserRepository::class)->getById($createdById);
42
    }
43
    
44
}
45