GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 6c2a86...45b6a3 )
by Samuel
03:03
created

MailerFactory::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 17
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 12
nc 2
nop 3
1
<?php declare(strict_types=1);
2
/**
3
 * @license MIT
4
 * @author Samuel Adeshina <[email protected]>
5
 *
6
 * This file is part of the EmmetBlue project, please read the license document
7
 * available in the root level of the project
8
 */
9
namespace EmmetBlue\Core\Factory;
10
11
/**
12
 * Class MailerFactory.
13
 *
14
 * @author Samuel Adeshina <[email protected]>
15
 *
16
 * @since v0.0.1 13/02/2017 13:06
17
 */
18
class MailerFactory
19
{
20
	public function __construct(array $sender, array $recipients, array $message){
21
		$mail = new PHPMailer;
22
		$mail->From = $sender["address"];
23
		$mail->FromName = $sender["name"];
24
		$mail->addReplyTo = $sender["replyTo"];
25
26
		foreach ($recipients as $key => $value) {
27
			$mail->addAddress($value["address"]);
28
		}
29
30
		$mail->Subject = $message["subject"];
31
		$mail->Body = $message["body"];
32
		$mail->AltBody = $message["alt"];
33
		$mail->isHTML($message["isHtml"]);
34
35
		return $mail->send();
0 ignored issues
show
Bug introduced by
Constructors do not have meaningful return values, anything that is returned from here is discarded. Are you sure this is correct?
Loading history...
36
	}
37
}