InvoiceScope   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 12
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A apply() 0 3 1
1
<?php
2
namespace NeptuneSoftware\Invoice\Scopes;
3
4
use Illuminate\Database\Eloquent\Scope;
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\Builder;
7
8
class InvoiceScope implements Scope
9
{
10
    /**
11
     * Apply the scope to a given Eloquent query builder.
12
     *
13
     * @param  \Illuminate\Database\Eloquent\Builder  $builder
14
     * @param  \Illuminate\Database\Eloquent\Model  $model
15
     * @return void
16
     */
17 5
    public function apply(Builder $builder, Model $model)
18
    {
19 5
        $builder->where('is_bill', '=', false);
20 5
    }
21
}
22