MakeUserException::invalidEmail()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 3
ccs 0
cts 3
cp 0
rs 10
cc 1
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