UserMailer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A send() 0 3 1
1
<?php
2
3
namespace ST;
4
5
class UserMailer {
6
7
	private $userMailer;
8
9
	function __construct(\UserMailer $userMailer) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
10
		$this->userMailer = $userMailer;
11
	}
12
13
	/**
14
	 * @param $to
15
	 * @param $from
16
	 * @param $subject
17
	 * @param $body
18
	 * @param array $options
19
	 * @throws \MWException
20
	 */
21
	function send( $to, $from, $subject, $body, $options = [] ) {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
22
		$this->userMailer->send( $to, $from, $subject, $body, $options );
23
	}
24
}
25

 

OSZAR »