Completed
Push — master ( f3d222...548fd9 )
by Agaletskiy
01:48
created

OmsGeneralErrorException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 10
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A becauseOfError() 0 7 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Lamoda\OmsClient\Exception;
6
7
final class OmsGeneralErrorException extends \RuntimeException implements OmsClientExceptionInterface
8
{
9
    public static function becauseOfError(\Throwable $exception): self
10
    {
11
        return new static(sprintf(
12
            'Request to OMS finished with error "%s"',
13
            $exception->getMessage()
14
        ), 0, $exception);
15
    }
16
}