UserNotificationBuilder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 1
f 0
dl 0
loc 22
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A whereType() 0 5 1
1
<?php
2
3
namespace Sfneal\Users\Builders;
4
5
use Illuminate\Database\Eloquent\Model as EloquentModel;
6
use Sfneal\Builders\QueryBuilder;
7
use Sfneal\Users\Builders\Interfaces\WhereUserInterface;
8
use Sfneal\Users\Builders\Traits\WhereUser;
9
use Sfneal\Users\Models\UserNotification;
10
11
class UserNotificationBuilder extends QueryBuilder implements WhereUserInterface
12
{
13
    use WhereUser;
14
15
    /**
16
     * @var EloquentModel|UserNotification
17
     */
18
    protected $targetModel = UserNotification::class;
19
20
    /**
21
     * Scope Query to UserNotification's of a certain 'type'.
22
     *
23
     * @param  string  $type
24
     * @param  string  $operator
25
     * @param  string  $boolean
26
     * @return $this
27
     */
28
    public function whereType(string $type, string $operator = '=', string $boolean = 'and')
29
    {
30
        $this->where('type', $operator, $type, $boolean);
31
32
        return $this;
33
    }
34
}
35