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

Users   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 32
ccs 6
cts 8
cp 0.75
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 5 1
A getKey() 0 3 1
A getSource() 0 3 1
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