@@ -29,8 +29,9 @@ discard block |
||
29 | 29 | */ |
30 | 30 | protected function generateXmlElement( \DOMDocument $dom, $data ) |
31 | 31 | { |
32 | - if ( empty( $data['name'] ) ) |
|
33 | - return false; |
|
32 | + if ( empty( $data['name'] ) ) { |
|
33 | + return false; |
|
34 | + } |
|
34 | 35 | |
35 | 36 | // Create the element |
36 | 37 | $element_value = ( ! empty( $data['value'] ) ) ? $data['value'] : null; |
@@ -45,12 +46,14 @@ discard block |
||
45 | 46 | |
46 | 47 | // Any other items in the data array should be child elements |
47 | 48 | foreach ( $data as $data_key => $child_data ) { |
48 | - if ( ! is_numeric( $data_key ) ) |
|
49 | - continue; |
|
49 | + if ( ! is_numeric( $data_key ) ) { |
|
50 | + continue; |
|
51 | + } |
|
50 | 52 | |
51 | 53 | $child = $this->generateXmlElement( $dom, $child_data ); |
52 | - if ( $child ) |
|
53 | - $element->appendChild( $child ); |
|
54 | + if ( $child ) { |
|
55 | + $element->appendChild( $child ); |
|
56 | + } |
|
54 | 57 | } |
55 | 58 | |
56 | 59 | return $element; |