UserNotFoundException   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 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 NotFoundException
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
26
        $this->userId = $userId;
27
        $this->login = $login;
28
    }
29
30
    public function getUserId(): int
31
    {
32
        return $this->userId;
33
    }
34
35
    public function getLogin(): string
36
    {
37
        return $this->login;
38
    }
39
}