Completed
Push — master ( 8e8eee...0073f8 )
by wen
12:40
created

Scopes::apply()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Sco\Admin\View\Extensions;
4
5
use Illuminate\Database\Eloquent\Builder;
6
7
class Scopes extends Extension
8
{
9
    public function add($value)
10
    {
11
        if (!is_array($value)) {
12
            $value = func_get_args();
13
        }
14
15
        $this->push($value);
16
        return $this;
17
    }
18
19
    public function apply(Builder $query)
20
    {
21
        $this->each(function ($scope) use ($query) {
0 ignored issues
show
Unused Code introduced by
The parameter $scope is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
22
23
        });
24
    }
25
}
26