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

UserUpdater::performUpdate()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
rs 9.4285
cc 2
eloc 7
nc 2
nop 0
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