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

ArchiveScope   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 2
c 0
b 0
f 0
dl 0
loc 5
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A apply() 0 3 1
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