Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
34 | public function parseDirectusUsers($data) |
||
35 | { |
||
36 | $data = ArrayUtils::omit($data, ['id', 'user', 'access_token', 'last_login', 'last_access', 'last_page']); |
||
37 | if (ArrayUtils::has($data, 'password')) { |
||
38 | // @TODO: use Auth hash password |
||
39 | $data['password'] = password_hash($data['password'], PASSWORD_DEFAULT, ['cost' => 12]); |
||
40 | } |
||
41 | |||
42 | return $data; |
||
43 | } |
||
44 | } |