Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2.032 |
Changes | 5 | ||
Bugs | 0 | Features | 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 | array( |
||
82 | 2 | 'classmap' => $this->classmap, |
|
83 | 2 | 'user_agent' => 'Mozilla', // the request fails unless a (dummy) user agent is specified |
|
84 | 2 | 'exceptions' => true, |
|
85 | ) |
||
86 | 2 | ); |
|
87 | } |
||
88 | |||
89 | 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: