TestUserNonComposite::organization()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
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