@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | /** |
| 132 | - * @param $file |
|
| 132 | + * @param string $file |
|
| 133 | 133 | * @return string |
| 134 | 134 | * @codeCoverageIgnore |
| 135 | 135 | */ |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | /** |
| 144 | - * @param $file |
|
| 144 | + * @param string $file |
|
| 145 | 145 | * @return string |
| 146 | 146 | * @codeCoverageIgnore |
| 147 | 147 | */ |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | * |
| 21 | 21 | * @param string $location The path as string |
| 22 | 22 | * @param integer $code The status code |
| 23 | - * @return mixed |
|
| 23 | + * @return boolean |
|
| 24 | 24 | * @throws InvalidArgumentException |
| 25 | 25 | */ |
| 26 | 26 | public function redirect(string $location, int $code = 301) |
@@ -76,7 +76,7 @@ |
||
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | - * @param $request |
|
| 79 | + * @param Request $request |
|
| 80 | 80 | * @param $e |
| 81 | 81 | * @return Http\Response |
| 82 | 82 | * @codeCoverageIgnore |
@@ -94,7 +94,7 @@ |
||
| 94 | 94 | /** |
| 95 | 95 | * Get response body and set headers |
| 96 | 96 | * |
| 97 | - * @return mixed |
|
| 97 | + * @return string |
|
| 98 | 98 | */ |
| 99 | 99 | public function getContent() |
| 100 | 100 | { |
@@ -302,7 +302,7 @@ |
||
| 302 | 302 | } |
| 303 | 303 | |
| 304 | 304 | /** |
| 305 | - * @param $type |
|
| 305 | + * @param string $type |
|
| 306 | 306 | * @return bool |
| 307 | 307 | */ |
| 308 | 308 | private function translateType($type) |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | /** |
| 26 | 26 | * @param $dom |
| 27 | 27 | * @param $data |
| 28 | - * @return bool|\DOMElement |
|
| 28 | + * @return \DOMNode |
|
| 29 | 29 | */ |
| 30 | 30 | protected function generateXmlElement( \DOMDocument $dom, $data ) |
| 31 | 31 | { |
@@ -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; |