SmtpOptions::setPort()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 2
cts 2
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Acelaya\Website\Options;
5
6
use Zend\Stdlib\AbstractOptions;
7
8
class SmtpOptions extends AbstractOptions
9
{
10
    /**
11
     * @var string
12
     */
13
    protected $server = 'smtp.gmail.com';
14
    /**
15
     * @var string
16
     */
17
    protected $ssl = 'tls';
18
    /**
19
     * @var int
20
     */
21
    protected $port = 587;
22
    /**
23
     * @var string
24
     */
25
    protected $username = '';
26
    /**
27
     * @var string
28
     */
29
    protected $password = '';
30
31
    /**
32 1
     * @return string
33
     */
34 1
    public function getServer(): string
35
    {
36
        return $this->server;
37
    }
38
39
    /**
40
     * @param string $server
41 1
     * @return SmtpOptions
42
     */
43 1
    public function setServer(string $server): SmtpOptions
44 1
    {
45
        $this->server = $server;
46
        return $this;
47
    }
48
49
    /**
50 1
     * @return string
51
     */
52 1
    public function getSsl(): string
53
    {
54
        return $this->ssl;
55
    }
56
57
    /**
58
     * @param string $ssl
59 1
     * @return SmtpOptions
60
     */
61 1
    public function setSsl(string $ssl): SmtpOptions
62 1
    {
63
        $this->ssl = $ssl;
64
        return $this;
65
    }
66
67
    /**
68 1
     * @return int
69
     */
70 1
    public function getPort(): int
71
    {
72
        return $this->port;
73
    }
74
75
    /**
76
     * @param int $port
77 1
     * @return SmtpOptions
78
     */
79 1
    public function setPort(int $port): SmtpOptions
80 1
    {
81
        $this->port = $port;
82
        return $this;
83
    }
84
85
    /**
86 1
     * @return string
87
     */
88 1
    public function getUsername(): string
89
    {
90
        return $this->username;
91
    }
92
93
    /**
94
     * @param string $username
95 1
     * @return SmtpOptions
96
     */
97 1
    public function setUsername(string $username): SmtpOptions
98 1
    {
99
        $this->username = $username;
100
        return $this;
101
    }
102
103
    /**
104 1
     * @return string
105
     */
106 1
    public function getPassword(): string
107
    {
108
        return $this->password;
109
    }
110
111
    /**
112
     * @param string $password
113 1
     * @return SmtpOptions
114
     */
115 1
    public function setPassword(string $password): SmtpOptions
116 1
    {
117
        $this->password = $password;
118
        return $this;
119
    }
120
}
121