TestUserNonComposite   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 7
c 1
b 0
f 0
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A organization() 0 3 1
1
<?php
2
3
namespace MaksimM\CompositePrimaryKeys\Tests\Stubs;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class TestUserNonComposite extends Model
8
{
9
    use \MaksimM\CompositePrimaryKeys\Http\Traits\HasCompositePrimaryKey;
0 ignored issues
show
introduced by
The trait MaksimM\CompositePrimary...\HasCompositePrimaryKey requires some properties which are not provided by MaksimM\CompositePrimary...bs\TestUserNonComposite: $key, $binaryColumns
Loading history...
10
11
    protected $table = 'non_composite_users';
12
13
    protected $primaryKey = 'user_id';
14
15
    protected $fillable = [
16
        'name',
17
    ];
18
19
    public function organization()
20
    {
21
        return $this->belongsTo('TestOrganization', 'organization_id', 'organization_id');
22
    }
23
}
24