Test Setup Failed
Push — master ( 80a7cc...26b8e4 )
by Alexey
02:49
created

UserNotFoundException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getUserId() 0 4 1
A getLogin() 0 4 1
1
<?php
2
3
namespace Skobkin\Bundle\PointToolsBundle\Exception\Api;
4
5
class UserNotFoundException extends ApiException
6
{
7
    /**
8
     * @var int
9
     */
10
    protected $userId;
11
12
    /**
13
     * @var string
14
     */
15
    protected $login;
16
17
18
    /**
19
     * {@inheritdoc}
20
     * @param int $userId
21
     */
22
    public function __construct($message = 'User not found', $code = 0, \Exception $previous = null, $userId = null, $login = null)
23
    {
24
        parent::__construct($message, $code, $previous);
25
        $this->userId = $userId;
26
        $this->login = $login;
27
    }
28
29
    public function getUserId(): int
30
    {
31
        return $this->userId;
32
    }
33
34
    public function getLogin(): string
35
    {
36
        return $this->login;
37
    }
38
}