Completed
Pull Request — master (#8)
by Michael
02:18 queued 20s
created

MakeUserException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 22
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A emailExists() 0 3 1
A invalidEmail() 0 3 1
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