IsNull   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 4
c 1
b 0
f 1
dl 0
loc 12
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A condition() 0 3 1
A __construct() 0 3 1
1
<?php
2
/**
3
 * Created by enea dhack - 03/01/2020 18:20.
4
 */
5
6
namespace Vaened\Searcher\Constraints;
7
8
use Illuminate\Database\Eloquent\Builder;
9
use Vaened\Searcher\Constraint;
10
11
class IsNull implements Constraint
12
{
13
    private string $column;
14
15
    public function __construct(string $column)
16
    {
17
        $this->column = $column;
18
    }
19
20
    public function condition(Builder $builder): Builder
21
    {
22
        return $builder->whereNull($this->column);
23
    }
24
}
25