AnyEmailMatcher::matches()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Defines Ingenerator\Mailhook\Matcher\AnyEmailMatcher
4
 *
5
 * @copyright  2014 inGenerator Ltd
6
 * @licence    BSD
7
 */
8
9
namespace Ingenerator\Mailhook\Matcher;
10
use Ingenerator\Mailhook\Email;
11
use Ingenerator\Mailhook\EmailMatcher;
12
13
/**
14
 * Matches any email
15
 *
16
 * @package Ingenerator\Mailhook\Matcher
17
 * @see     spec\Ingenerator\Mailhook\Matcher\AnyEmailMatcherSpec
18
 */
19
class AnyEmailMatcher implements EmailMatcher {
20
21
	/**
22
	 * Test if an email matches the conditions
23
	 *
24
	 * @param Email $email
25
	 *
26
	 * @return bool
27
	 */
28
	public function matches(Email $email)
29
	{
30
		return TRUE;
31
	}
32
33
	/**
34
	 * Describe the matcher for use in exceptions etc
35
	 *
36
	 * @return string
37
	 */
38
	public function __toString()
39
	{
40
		return 'Any Email';
41
	}
42
43
}
44