Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
48 | 2 | public static function parse( SimpleXMLElement $xml ) { |
|
49 | // Message |
||
50 | 2 | $message = new DirectTransactionResponseMessage(); |
|
51 | |||
52 | // Result |
||
53 | 2 | $message->result = Security::filter( $xml['result'] ); |
|
54 | |||
55 | // Transaction |
||
56 | 2 | $message->transaction = TransactionParser::parse( $xml->transaction ); |
|
|
|||
57 | |||
58 | // Gateway info |
||
59 | 2 | if ( $xml->gatewayinfo ) { |
|
60 | 2 | $message->gateway_info = new GatewayInfo(); |
|
61 | 2 | $message->gateway_info->redirect_url = Security::filter( $xml->gatewayinfo->redirecturl ); |
|
62 | 2 | $message->gateway_info->ext_var = Security::filter( $xml->gatewayinfo->extvar ); |
|
63 | 2 | $message->gateway_info->issuer_id = Security::filter( $xml->gatewayinfo->issuerid ); |
|
64 | } |
||
65 | |||
66 | 2 | return $message; |
|
67 | } |
||
69 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..