Completed
Push — master ( 02f92d...9c9507 )
by Sebastian
15:38
created

UserUpdater   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 1
cbo 3
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A performUpdate() 0 11 2
1
<?php
2
3
namespace App\Services\Auth\Back;
4
5
use App\Foundation\Models\Updaters\Updater;
6
7
class UserUpdater extends Updater
8
{
9
    /** @var \App\Services\Auth\Back\User */
10
    protected $model;
11
12
    public function performUpdate()
13
    {
14
        $this->model->email = $this->request->get('email');
15
        $this->model->first_name = $this->request->get('first_name');
16
        $this->model->last_name = $this->request->get('last_name');
17
        $this->model->locale = $this->request->get('locale', 'nl');
18
19
        if ($this->request->has('password')) {
20
            $this->model->password = $this->request->get('password');
21
        }
22
    }
23
}
24