Passed
Push — master ( 2d6ff2...25c8f8 )
by Aleksander
12:10
created

AuthResponse::isAuth()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Nighten\ApiClient\Response\Auth;
4
5
class AuthResponse
6
{
7
    private bool $isAuth;
8
    private ?int $userId;
9
    private ?string $key;
10
11 4
    public function __construct(bool $isAuth, ?int $userId = null, ?string $key = null)
12
    {
13 4
        $this->isAuth = $isAuth;
14 4
        $this->userId = $userId;
15 4
        $this->key = $key;
16 4
    }
17
18
    /**
19
     * @return bool
20
     */
21 4
    public function isAuth(): bool
22
    {
23 4
        return $this->isAuth;
24
    }
25
26
    /**
27
     * @return int|null
28
     */
29 4
    public function getUserId(): ?int
30
    {
31 4
        return $this->userId;
32
    }
33
34
    /**
35
     * @return string|null
36
     */
37 4
    public function getKey(): ?string
38
    {
39 4
        return $this->key;
40
    }
41
}
42