Test Failed
Push — main ( 7178bf...397c3b )
by Rafael
50:09
created

Auth::login()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Alxarafe\Lib;
4
5
class Auth
6
{
7
    protected $auth;
8
9
    public function __construct(PHPAuth $auth)
10
    {
11
        $this->auth = $auth;
12
    }
13
14
    public function login($email, $password)
15
    {
16
        return $this->auth->login($email, $password);
17
    }
18
19
    public function isLogged()
20
    {
21
        return $this->auth->isLogged();
22
    }
23
24
    public function changePassword($currentPassword, $newPassword)
25
    {
26
        $uid = $this->auth->getCurrentUID();
27
        return $this->auth->changePassword($uid, $currentPassword, $newPassword);
28
    }
29
30
    public function sendEmail($email, $subject, $body)
31
    {
32
        // Implement email sending logic here, possibly using a separate email sending class or library
33
    }
34
35
    public function logout()
36
    {
37
        return $this->auth->logout();
38
    }
39
}
40