Passed
Push — master ( 9c6c89...5e1c69 )
by Artem
01:48 queued 18s
created

UnauthorizedException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace Shoman4eg\Nalog\Exception\Domain;
5
6
/**
7
 * @author Tobias Nyholm <[email protected]>
8
 */
9
final class UnauthorizedException extends ClientException
10
{
11
    public function __construct($message = '')
12
    {
13
        $decodedMessage = json_decode($message, true);
14
        parent::__construct($decodedMessage['message'] ?? '');
15
    }
16
}
17