Test Failed
Push — master ( 419434...27dc48 )
by Maximo
03:16 queued 58s
created

Users::initialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
0 ignored issues
show
Coding Style introduced by
End of line character is invalid; expected "\n" but found "\r\n"
Loading history...
2
declare(strict_types=1);
3
4
namespace Gewaer\Models;
5
6
use Gewaer\Traits\PermissionsTrait;
7
8
class Users extends \Baka\Auth\Models\Users
9
{
10
    use PermissionsTrait;
0 ignored issues
show
introduced by
The trait Gewaer\Traits\PermissionsTrait requires some properties which are not provided by Gewaer\Models\Users: $defaultCompany, $di, $roles, $app
Loading history...
11
12
    /**
13
     * Initialize method for model.
14
     */
15 5
    public function initialize()
16
    {
17 5
        parent::initialize();
18
19 5
        $this->setSource('users');
20 5
    }
21
22
    /**
23
     * Returns table name mapped in the model.
24
     *
25
     * @return string
26
     */
27 4
    public function getSource(): string
28
    {
29 4
        return 'users';
30
    }
31
32
    /**
33
     * Get the User key for redis
34
     *
35
     * @return string
36
     */
37
    public function getKey(): string
38
    {
39
        return $this->id;
40
    }
41
}
42