RoleRepository::model()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 0
dl 0
loc 7
ccs 0
cts 7
cp 0
crap 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/*
3
 * This file is part of the Laravel Platfourm package.
4
 *
5
 * (c) Avtandil Kikabidze aka LONGMAN <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Longman\Platfourm\User\Repositories\Eloquent;
12
13
use Longman\Platfourm\Contracts\Repository\Repository;
14
use Longman\Platfourm\Contracts\Repository\RepositoryCriteria;
15
use Longman\Platfourm\Repository\Eloquent\BaseRepository;
16
use Longman\Platfourm\User\Models\Eloquent\Role;
17
18
class RoleRepository extends BaseRepository implements Repository, RepositoryCriteria
19
{
20
21
    public function model()
22
    {
23
        if (class_exists(\App\Models\Role::class)) {
24
            return \App\Models\Role::class;
25
        }
26
        return Role::class;
27
    }
28
29
}
30