IsEqual   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 0
dl 0
loc 32
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getEmail() 0 4 1
A execute() 0 4 1
1
<?php
2
3
namespace Openbuildings\Swiftmailer;
4
5
/**
6
 * @author     Ivan Kerin <[email protected]>
7
 * @copyright  (c) 2015 Clippings Ltd.
8
 * @license    http://spdx.org/licenses/BSD-3-Clause
9
 */
10
class IsEqual implements MatchInterface
11
{
12
	/**
13
	 * @var string
14
	 */
15
	private $email;
16
17
	/**
18
	 * @param string $email
19
	 */
20 1
	public function __construct($email)
21
	{
22 1
		$this->email = $email;
23 1
	}
24
25
	/**
26
	 * @return string
27
	 */
28 1
	public function getEmail()
29
	{
30 1
		return $this->email;
31
	}
32
33
	/**
34
	 * @param  string  $email
35
	 * @return boolean
36
	 */
37 1
	public function execute($email)
38
	{
39 1
		return $this->email === $email;
40
	}
41
}
42