Completed
Push — master ( d778e6...6d1c30 )
by ARCANEDEV
08:16
created

PermissionsGroup   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 26
ccs 0
cts 2
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A firstHashedOrFail() 0 4 1
1
<?php namespace Arcanesoft\Auth\Models;
2
3
use \Arcanedev\LaravelAuth\Models\PermissionsGroup as BasePermissionsGroupModel;
4
5
/**
6
 * Class     PermissionsGroup
7
 *
8
 * @package  Arcanesoft\Auth\Models
9
 * @author   ARCANEDEV <[email protected]>
10
 *
11
 * @property  string  hashed_id
12
 */
13
class PermissionsGroup extends BasePermissionsGroupModel
14
{
15
    /* ------------------------------------------------------------------------------------------------
16
     |  Traits
17
     | ------------------------------------------------------------------------------------------------
18
     */
19
    use Presenters\PermissionsGroupPresenter;
20
21
    /* ------------------------------------------------------------------------------------------------
22
     |  Main Function
23
     | ------------------------------------------------------------------------------------------------
24
     */
25
    /**
26
     * Get a permission from a hashed id or fail if not found.
27
     *
28
     * @param  string  $hashedId
29
     *
30
     * @return self
31
     *
32
     * @throws \Illuminate\Database\Eloquent\ModelNotFoundException
33
     */
34
    public static function firstHashedOrFail($hashedId)
35
    {
36
        return self::withHashedId($hashedId)->firstOrFail();
37
    }
38
}
39