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