File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change 5
5
if (!function_exists ('is_email ' )) {
6
6
/**
7
7
* Check whether the given string is an email address or not.
8
- *
9
- * @param mixed $string
10
- * @return bool
11
8
*/
12
- function is_email ($ string )
9
+ function is_email (mixed $ string ): bool
13
10
{
14
11
return (bool ) filter_var ($ string , FILTER_VALIDATE_EMAIL );
15
12
}
@@ -21,11 +18,8 @@ function is_email($string)
21
18
*
22
19
* @see http://faqs.org/rfcs/rfc2822.html
23
20
* @see https://php.net/manual/en/function.mail.php
24
- *
25
- * @param array $addresses
26
- * @return string
27
21
*/
28
- function to_rfc2822_email (array $ addresses )
22
+ function to_rfc2822_email (array $ addresses ): string
29
23
{
30
24
// Check if we're dealing with one address, without multiarray
31
25
$ addresses = !empty ($ addresses ['address ' ]) ? [$ addresses ] : $ addresses ;
@@ -51,11 +45,8 @@ function to_rfc2822_email(array $addresses)
51
45
* Convert addresses data to SwiftMailer-suitable format.
52
46
*
53
47
* @see https://swiftmailer.org/docs/messages.html
54
- *
55
- * @param array $addresses
56
- * @return array
57
48
*/
58
- function to_swiftmailer_emails (array $ addresses )
49
+ function to_swiftmailer_emails (array $ addresses ): array
59
50
{
60
51
// Check if we're dealing with one address, without multiarray
61
52
$ addresses = !empty ($ addresses ['address ' ]) ? [$ addresses ] : $ addresses ;
You can’t perform that action at this time.
0 commit comments