These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace NFePHP\Common\Soap; |
||
4 | |||
5 | use SoapClient; |
||
6 | |||
7 | class SoapClientExtended extends SoapClient |
||
8 | { |
||
9 | /** |
||
10 | * __construct |
||
11 | * @param mixed $wsdl NULL for non-wsdl mode or URL string for wsdl mode |
||
12 | * @param array $options |
||
13 | */ |
||
14 | public function __construct($wsdl, $options) |
||
15 | { |
||
16 | parent::SoapClient($wsdl, $options); |
||
0 ignored issues
–
show
|
|||
17 | } |
||
18 | |||
19 | /** |
||
20 | * __doRequest |
||
21 | * Changes the original behavior of the class by removing prefixes, |
||
22 | * suffixes and line breaks that are not supported by some webservices |
||
23 | * due to their particular settings |
||
24 | * @param string $request |
||
25 | * @param string$location |
||
26 | * @param string $action |
||
27 | * @param int $version |
||
28 | * @param int $oneWay |
||
29 | * @return string |
||
30 | */ |
||
31 | public function __doRequest($request, $location, $action, $version, $oneWay = 0) |
||
32 | { |
||
33 | $search = [":ns1","ns1:","\n","\r"]; |
||
34 | return parent::__doRequest( |
||
35 | str_replace($search, '', $request), |
||
36 | $location, |
||
37 | $action, |
||
38 | $version, |
||
39 | $oneWay |
||
40 | ); |
||
41 | } |
||
42 | } |
||
43 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.