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

UserNotFoundException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 5
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
}