Passed
Push — feature/permissions-management ( 41e93d )
by
unknown
11:22 queued 04:04
created

RoleRepository::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
1
<?php
2
3
namespace A17\Twill\Repositories;
4
5
use A17\Twill\Models\Role;
6
use A17\Twill\Repositories\Behaviors\HandleRolePermissions;
7
8
class RoleRepository extends ModuleRepository
9
{
10
    use HandleRolePermissions;
0 ignored issues
show
introduced by
The trait A17\Twill\Repositories\B...s\HandleRolePermissions requires some properties which are not provided by A17\Twill\Repositories\RoleRepository: $name, $users, $in_everyone_group
Loading history...
11
12
    public function __construct(Role $model)
13
    {
14
        $this->model = $model;
0 ignored issues
show
Documentation Bug introduced by
It seems like $model of type A17\Twill\Models\Role is incompatible with the declared type A17\Twill\Models\Model of property $model.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
15
    }
16
17
    public function filter($query, array $scopes = [])
18
    {
19
        $this->searchIn($query, $scopes, 'search', ['name']);
20
21
        return parent::filter($query, $scopes);
22
    }
23
}
24