Completed
Pull Request — master (#5)
by
unknown
01:45
created

MakeUserException::invalidEmail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Dyrynda\Artisan\Exceptions;
4
5
use InvalidArgumentException;
6
7
class MakeUserException extends InvalidArgumentException
8
{
9
    /**
10
     * The supplied email is invalid.
11
     *
12
     * @param  string  $email
13
     * @return \Dyrynda\Artisan\Exceptions\MakeUserException
14
     */
15
    public static function invalidEmail($email)
16
    {
17
        return new static("The email address [{$email}] is invalid");
18
    }
19
20
    /**
21
     * The supplied email already exists.
22
     *
23
     * @param  string $email
24
     * @return \Dyrynda\Artisan\Exceptions\MakeUserException
25
     */
26
    public static function emailExists($email)
27
    {
28
        return new static("A user with the email address {$email} already exists");
29
    }
30
}
31