@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | if( class_exists('\App')){ |
| 55 | 55 | $this->lang = \App::getLocale(); |
| 56 | - }else{ |
|
| 56 | + } else{ |
|
| 57 | 57 | $this->lang = /** @scrutinizer ignore-call */ app('translator')->getLocale(); |
| 58 | 58 | } |
| 59 | 59 | |
@@ -138,8 +138,9 @@ discard block |
||
| 138 | 138 | |
| 139 | 139 | $result = array_filter( $this->getHeaders() ); |
| 140 | 140 | |
| 141 | - if ( empty( $result ) ) |
|
| 142 | - return response()->json( $data, $this->getStatusCode() ); |
|
| 141 | + if ( empty( $result ) ) { |
|
| 142 | + return response()->json( $data, $this->getStatusCode() ); |
|
| 143 | + } |
|
| 143 | 144 | |
| 144 | 145 | return response()->json( $data, $this->getStatusCode() ) |
| 145 | 146 | ->withHeaders( $this->getHeaders() ); |
@@ -164,10 +165,11 @@ discard block |
||
| 164 | 165 | |
| 165 | 166 | $res[ 'error' ] = $this->getErrorCode(); |
| 166 | 167 | |
| 167 | - if ( is_null( $message ) ) |
|
| 168 | - $res[ 'message' ] = $this->getErrorMessage(); |
|
| 169 | - else |
|
| 170 | - $res[ 'message' ] = $message; |
|
| 168 | + if ( is_null( $message ) ) { |
|
| 169 | + $res[ 'message' ] = $this->getErrorMessage(); |
|
| 170 | + } else { |
|
| 171 | + $res[ 'message' ] = $message; |
|
| 172 | + } |
|
| 171 | 173 | |
| 172 | 174 | } else { |
| 173 | 175 | |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | |
| 17 | 17 | if( class_exists('\App')){ |
| 18 | 18 | $lang = \App::getLocale(); |
| 19 | - }else{ |
|
| 19 | + } else{ |
|
| 20 | 20 | $lang = /** @scrutinizer ignore-call */ app('translator')->getLocale(); |
| 21 | 21 | } |
| 22 | 22 | |