Passed
Pull Request — master (#49)
by
unknown
14:38
created

PostPublic   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A apply() 0 4 1
1
<?php
2
3
namespace App\Constrain;
4
5
use Cycle\ORM\Select\ConstrainInterface;
6
use Cycle\ORM\Select\QueryBuilder;
7
8
class PostPublic implements ConstrainInterface
9
{
10
11
    public function apply(QueryBuilder $query): void
12
    {
13
        // public only
14
        $query->where(['public' => true]);
15
    }
16
}
17