password()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 1
c 0
b 0
f 0
nc 2
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Helick\Mail;
4
5
/**
6
 * Get the mail host.
7
 *
8
 * @return string
9
 */
10
function host(): string
11
{
12
    return defined('MAIL_HOST') ? MAIL_HOST : '';
0 ignored issues
show
Bug introduced by
The constant Helick\Mail\MAIL_HOST was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
13
}
14
15
/**
16
 * Get the mail port.
17
 *
18
 * @return int
19
 */
20
function port(): int
21
{
22
    return defined('MAIL_PORT') ? MAIL_PORT : 587;
0 ignored issues
show
Bug introduced by
The constant Helick\Mail\MAIL_PORT was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
23
}
24
25
/**
26
 * Get the mail user.
27
 *
28
 * @return string
29
 */
30
function user(): string
31
{
32
    return defined('MAIL_USER') ? MAIL_USER : '';
0 ignored issues
show
Bug introduced by
The constant Helick\Mail\MAIL_USER was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
33
}
34
35
/**
36
 * Get the mail password.
37
 *
38
 * @return string
39
 */
40
function password(): string
41
{
42
    return defined('MAIL_PASSWORD') ? MAIL_PASSWORD : '';
0 ignored issues
show
Bug introduced by
The constant Helick\Mail\MAIL_PASSWORD was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
43
}
44
45
/**
46
 * Get the mail "From Name" header.
47
 *
48
 * @return string
49
 */
50
function from_name(): string
51
{
52
    return defined('MAIL_FROM_NAME')
53
        ? MAIL_FROM_NAME
0 ignored issues
show
Bug introduced by
The constant Helick\Mail\MAIL_FROM_NAME was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
54
        : get_bloginfo('blogname', 'raw');
0 ignored issues
show
Bug introduced by
The function get_bloginfo was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

54
        : /** @scrutinizer ignore-call */ get_bloginfo('blogname', 'raw');
Loading history...
55
}
56
57
/**
58
 * Get the mail "From Address" header.
59
 *
60
 * @return string
61
 */
62
function from_address(): string
63
{
64
    return defined('MAIL_FROM_ADDRESS')
65
        ? MAIL_FROM_ADDRESS
0 ignored issues
show
Bug introduced by
The constant Helick\Mail\MAIL_FROM_ADDRESS was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
66
        : get_bloginfo('admin_email', 'raw');
0 ignored issues
show
Bug introduced by
The function get_bloginfo was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

66
        : /** @scrutinizer ignore-call */ get_bloginfo('admin_email', 'raw');
Loading history...
67
}
68