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   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 20
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 17 2
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
}