Passed
Pull Request — develop (#11)
by
unknown
03:46 queued 56s
created

UserHasAlreadyAnInviteInGroupException::getGroup()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Exceptions;
4
5
use Exception;
6
use App\Judite\Models\Group;
7
8
class UserHasAlreadyAnInviteInGroupException extends Exception
9
{
10
    /**
11
     * Group where User has already an Invite.
12
     *
13
     * @var \App\Judite\Models\Group
14
     */
15
    protected $group;
16
17
    /**
18
     * Create a new exception instance.
19
     *
20
     * @param \App\Judite\Models\Group $group
21
     * @param string                   $message
22
     */
23
    public function __construct(Group $group = null, $message = 'User already has an invite in group.')
24
    {
25
        parent::__construct($message);
26
        $this->group = $group;
27
    }
28
29
    /**
30
     * Get the group of this exception.
31
     *
32
     * @return \App\Judite\Models\Group
33
     */
34
    public function getGroup()
35
    {
36
        return $this->group;
37
    }
38
}
39