| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | 1 | public static function parse( SimpleXMLElement $xml ) { |
|
| 34 | 1 | $message = new GatewaysResponseMessage(); |
|
| 35 | |||
| 36 | 1 | $message->gateways = array(); |
|
| 37 | |||
| 38 | 1 | foreach ( $xml->gateways->gateway as $gateway ) { |
|
| 39 | 1 | $id = Security::filter( $gateway->id ); |
|
| 40 | 1 | $description = Security::filter( $gateway->description ); |
|
| 41 | |||
| 42 | 1 | $message->gateways[ $id ] = $description; |
|
| 43 | } |
||
| 44 | |||
| 45 | 1 | return $message; |
|
| 46 | } |
||
| 48 |