Passed
Pull Request — master (#5)
by nguereza
02:18
created

AuthParam   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 57
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setUsername() 0 5 1
A setPassword() 0 5 1
A getUsername() 0 3 1
A getPassword() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Platine\App\Param;
6
7
use Platine\Framework\Form\Param\BaseParam;
8
9
/**
10
* @class AuthParam
11
* @package Platine\App\Param
12
*
13
*/
14
class AuthParam extends BaseParam
15
{
16
    /**
17
    * The username field
18
    * @var string
19
    */
20
    protected string $username;
21
22
    /**
23
    * The password field
24
    * @var string
25
    */
26
    protected string $password;
27
28
29
30
    /**
31
    * Return the username value
32
    * @return string
33
    */
34
    public function getUsername(): string
35
    {
36
        return $this->username;
37
    }
38
39
   /**
40
    * Return the password value
41
    * @return string
42
    */
43
    public function getPassword(): string
44
    {
45
        return $this->password;
46
    }
47
48
49
    /**
50
    * Set the username value
51
    * @param string $username
52
    * @return $this
53
    */
54
    public function setUsername(string $username): self
55
    {
56
        $this->username = $username;
57
58
        return $this;
59
    }
60
61
   /**
62
    * Set the password value
63
    * @param string $password
64
    * @return $this
65
    */
66
    public function setPassword(string $password): self
67
    {
68
        $this->password = $password;
69
70
        return $this;
71
    }
72
}
73