UserNotInTeamException   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 34
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setTeam() 0 8 1
A getTeam() 0 4 1
1
<?php
2
3
namespace Mpociot\Teamwork\Exceptions;
4
5
use RuntimeException;
6
7
class UserNotInTeamException extends RuntimeException
8
{
9
    /**
10
     * Name of the affected team.
11
     *
12
     * @var string
13
     */
14
    protected $team;
15
16
    /**
17
     * Set the affected team.
18
     *
19
     * @param  string   $team
20
     * @return $this
21
     */
22
    public function setTeam($team)
23
    {
24
        $this->team = $team;
25
26
        $this->message = "The user is not in the team {$team}";
27
28
        return $this;
29
    }
30
31
    /**
32
     * Get the affected team.
33
     *
34
     * @return string
35
     */
36
    public function getTeam()
37
    {
38
        return $this->team;
39
    }
40
}
41