Test Failed
Push — ft/states ( eebc9c )
by Ben
29:42 queued 08:49
created

ArchiveScope::apply()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Thinktomorrow\Chief\States\Archivable;
6
7
use Illuminate\Database\Eloquent\Builder;
8
use Illuminate\Database\Eloquent\Model;
9
use Illuminate\Database\Eloquent\Scope;
10
use Thinktomorrow\Chief\States\PageState;
11
12
class ArchiveScope implements Scope
13
{
14
    public function apply(Builder $builder, Model $model)
15
    {
16
        $builder->where('state','<>', PageState::ARCHIVED);
17
    }
18
}
19