Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2.0078 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | 6 | public function isTransient(Throwable $throwable): bool |
|
17 | { |
||
18 | try { |
||
19 | 6 | $this->getThrowableDiagnosticBuilderFactory() |
|
20 | 6 | ->create() |
|
21 | 6 | ->build() |
|
22 | 6 | ->diagnose($throwable); |
|
23 | 6 | } catch (DiagnosedInterface $diagnosed) { |
|
24 | 6 | return $diagnosed->isTransient(); |
|
25 | } |
||
26 | return false; |
||
27 | } |
||
29 |