Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
76 | 2 | private function getSoapClient() |
|
77 | { |
||
78 | 2 | if (null === $this->soapClient) { |
|
79 | 2 | $this->soapClient = new \SoapClient( |
|
80 | 2 | $this->wsdl, |
|
81 | [ |
||
82 | 2 | 'classmap' => $this->classmap, |
|
83 | 2 | 'user_agent' => 'Mozilla', // the request fails unless a (dummy) user agent is specified |
|
84 | 'exceptions' => true, |
||
85 | ] |
||
86 | ); |
||
87 | } |
||
88 | |||
89 | 1 | return $this->soapClient; |
|
90 | } |
||
91 | } |
||
92 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: