LoginTrait   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
eloc 3
c 1
b 0
f 1
dl 0
loc 16
rs 10
ccs 0
cts 5
cp 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A populateFromUser() 0 3 1
A populateFromUserProfile() 0 3 1
1
<?php
2
3
namespace ByTIC\Hello\Models\Users\Logins\Traits;
4
5
use ByTIC\Hello\Models\Users\Traits\UserTrait;
6
use Hybrid_User_Profile;
7
8
/**
9
 * Trait LoginTrait
10
 * @package ByTIC\Hello\Models\Users\Logins\Traits
11
 *
12
 * @property int $id_user
13
 * @property string $provider_name
14
 * @property string $provider_uid
15
 *
16
 */
17
trait LoginTrait
18
{
19
    /**
20
     * @param UserTrait $user
21
     */
22
    public function populateFromUser($user)
23
    {
24
        $this->id_user = $user->id;
25
    }
26
27
    /**
28
     * @param Hybrid_User_Profile $profile
29
     */
30
    public function populateFromUserProfile($profile)
31
    {
32
        $this->provider_uid = $profile->identifier;
33
    }
34
}
35