Service::getByAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php namespace Distilleries\Expendable\Models;
2
3
class Service extends BaseModel {
4
5
    protected $fillable = ['id', 'action'];
6
7 2
    public function permissions()
8
    {
9 2
        return $this->hasMany('Distilleries\Expendable\Models\Permission');
10
    }
11
12 4
    public function getByAction($action) {
13 4
        return $this->where('action', '=', $action)->get();
14
    }
15
}