Service::updatedBy()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace App;
4
5
use Lubus\Constants\Status;
0 ignored issues
show
Bug introduced by
The type Lubus\Constants\Status 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 Sofa\Eloquence\Eloquence;
7
use Illuminate\Database\Eloquent\Model;
8
9
class Service extends Model
10
{
11
    protected $table = 'mst_services';
12
13
    protected $fillable = [
14
    		'name',
15
    		'description',
16
    		'created_by',
17
    		'updated_by'
18
    ];
19
20
    //Eloquence Search mapping
21
    use Eloquence;
22
23
    protected $searchableColumns = [
24
        'name' => 20,
25
        'description' => 10,
26
    ];
27
28
    public function createdBy()
29
    {
30
        return $this->belongsTo('App\User','created_by');
31
    }
32
33
    public function updatedBy()
34
    {
35
        return $this->belongsTo('App\User','updated_by');
36
    }
37
38
    public function Plans()
39
    {
40
        return $this->hasMany('App\Plan','service_id');
41
    }
42
}
43