MakeUserException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

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