Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
43 | 7 | public function __construct(string $code, string $reason, string $node = null, array $detail = null) |
|
44 | { |
||
45 | 7 | $this->code = $code; |
|
46 | 7 | $this->reason = $reason; |
|
47 | 7 | $this->node = $node; |
|
48 | 7 | $this->detail = $detail; |
|
49 | |||
50 | 7 | $previous = null; |
|
51 | 7 | if (class_exists(SoapFault::class)) { |
|
52 | 7 | $code = preg_replace( |
|
53 | 7 | ['~^Receiver~', '~^Sender~', '~^DataEncodingUnknown~'], |
|
54 | 7 | ['Server', 'Client', 'Client'], |
|
55 | 7 | $this->code |
|
56 | ); |
||
57 | 7 | $previous = new SoapFault($code, $reason, $node, $detail); |
|
|
|||
58 | } |
||
59 | |||
60 | 7 | parent::__construct($reason, 0, $previous); |
|
61 | 7 | } |
|
68 |