@@ -13,8 +13,8 @@ |
||
| 13 | 13 | * @return string |
| 14 | 14 | */ |
| 15 | 15 | protected static function getFacadeAccessor() |
| 16 | - { |
|
| 17 | - return 'Vahid\Respond\Messages'; |
|
| 18 | - } |
|
| 16 | + { |
|
| 17 | + return 'Vahid\Respond\Messages'; |
|
| 18 | + } |
|
| 19 | 19 | |
| 20 | 20 | } |
@@ -7,10 +7,10 @@ discard block |
||
| 7 | 7 | class RespondServiceProvider extends ServiceProvider |
| 8 | 8 | { |
| 9 | 9 | /** |
| 10 | - * Perform post-registration booting of services. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 10 | + * Perform post-registration booting of services. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | 14 | public function boot() |
| 15 | 15 | { |
| 16 | 16 | |
@@ -24,10 +24,10 @@ discard block |
||
| 24 | 24 | |
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | - * Register any package services. |
|
| 28 | - * |
|
| 29 | - * @return void |
|
| 30 | - */ |
|
| 27 | + * Register any package services. |
|
| 28 | + * |
|
| 29 | + * @return void |
|
| 30 | + */ |
|
| 31 | 31 | public function register() |
| 32 | 32 | { |
| 33 | 33 | |
@@ -5,15 +5,15 @@ discard block |
||
| 5 | 5 | class Messages extends Main |
| 6 | 6 | { |
| 7 | 7 | |
| 8 | - /** |
|
| 9 | - * Request succeeded and contains json result |
|
| 10 | - * @param array $data |
|
| 11 | - * @return mixed |
|
| 12 | - * @since May 2, 2016 9:50:51 AM |
|
| 13 | - * @uses |
|
| 14 | - * @see |
|
| 15 | - * @author Shima Payro <[email protected]> |
|
| 16 | - */ |
|
| 8 | + /** |
|
| 9 | + * Request succeeded and contains json result |
|
| 10 | + * @param array $data |
|
| 11 | + * @return mixed |
|
| 12 | + * @since May 2, 2016 9:50:51 AM |
|
| 13 | + * @uses |
|
| 14 | + * @see |
|
| 15 | + * @author Shima Payro <[email protected]> |
|
| 16 | + */ |
|
| 17 | 17 | public function succeed( $data ) { |
| 18 | 18 | |
| 19 | 19 | return $this->setStatusCode( 200 ) |
@@ -22,15 +22,15 @@ discard block |
||
| 22 | 22 | |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | - /** |
|
| 26 | - * Delete action is succeed |
|
| 27 | - * @param String $message |
|
| 28 | - * @return mixed |
|
| 29 | - * @since May 2, 2016 9:52:05 AM |
|
| 30 | - * @uses |
|
| 31 | - * @see |
|
| 32 | - * @author Shima Payro <[email protected]> |
|
| 33 | - */ |
|
| 25 | + /** |
|
| 26 | + * Delete action is succeed |
|
| 27 | + * @param String $message |
|
| 28 | + * @return mixed |
|
| 29 | + * @since May 2, 2016 9:52:05 AM |
|
| 30 | + * @uses |
|
| 31 | + * @see |
|
| 32 | + * @author Shima Payro <[email protected]> |
|
| 33 | + */ |
|
| 34 | 34 | public function deleteSucceeded( $message = null ) { |
| 35 | 35 | |
| 36 | 36 | if ( is_null( $message ) ) |
@@ -42,15 +42,15 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | - /** |
|
| 46 | - * Update action is succeed |
|
| 47 | - * @param String $message |
|
| 48 | - * @return mixed |
|
| 49 | - * @since May 2, 2016 9:52:52 AM |
|
| 50 | - * @uses |
|
| 51 | - * @see |
|
| 52 | - * @author Shima Payro <[email protected]> |
|
| 53 | - */ |
|
| 45 | + /** |
|
| 46 | + * Update action is succeed |
|
| 47 | + * @param String $message |
|
| 48 | + * @return mixed |
|
| 49 | + * @since May 2, 2016 9:52:52 AM |
|
| 50 | + * @uses |
|
| 51 | + * @see |
|
| 52 | + * @author Shima Payro <[email protected]> |
|
| 53 | + */ |
|
| 54 | 54 | public function updateSucceeded( $message = null ) { |
| 55 | 55 | |
| 56 | 56 | if ( is_null( $message ) ) |
@@ -62,15 +62,15 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | - /** |
|
| 66 | - * Insert action is succeed |
|
| 67 | - * @param String $message |
|
| 68 | - * @return mixed |
|
| 69 | - * @since May 2, 2016 9:53:26 AM |
|
| 70 | - * @uses |
|
| 71 | - * @see |
|
| 72 | - * @author Shima Payro <[email protected]> |
|
| 73 | - */ |
|
| 65 | + /** |
|
| 66 | + * Insert action is succeed |
|
| 67 | + * @param String $message |
|
| 68 | + * @return mixed |
|
| 69 | + * @since May 2, 2016 9:53:26 AM |
|
| 70 | + * @uses |
|
| 71 | + * @see |
|
| 72 | + * @author Shima Payro <[email protected]> |
|
| 73 | + */ |
|
| 74 | 74 | public function insertSucceeded( $message = null ) { |
| 75 | 75 | |
| 76 | 76 | if ( is_null( $message ) ) |
@@ -82,15 +82,15 @@ discard block |
||
| 82 | 82 | |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - /** |
|
| 86 | - * Delete action is faild |
|
| 87 | - * @param String $message |
|
| 88 | - * @return mixed |
|
| 89 | - * @since May 2, 2016 9:53:53 AM |
|
| 90 | - * @uses |
|
| 91 | - * @see |
|
| 92 | - * @author Shima Payro <[email protected]> |
|
| 93 | - */ |
|
| 85 | + /** |
|
| 86 | + * Delete action is faild |
|
| 87 | + * @param String $message |
|
| 88 | + * @return mixed |
|
| 89 | + * @since May 2, 2016 9:53:53 AM |
|
| 90 | + * @uses |
|
| 91 | + * @see |
|
| 92 | + * @author Shima Payro <[email protected]> |
|
| 93 | + */ |
|
| 94 | 94 | public function deleteFaild( $message = null ) { |
| 95 | 95 | |
| 96 | 96 | if ( is_null( $message ) ) |
@@ -103,15 +103,15 @@ discard block |
||
| 103 | 103 | |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | - /** |
|
| 107 | - * Update action is succeed |
|
| 108 | - * @param String $message |
|
| 109 | - * @return mixed |
|
| 110 | - * @since May 2, 2016 9:54:09 AM |
|
| 111 | - * @uses |
|
| 112 | - * @see |
|
| 113 | - * @author Shima Payro <[email protected]> |
|
| 114 | - */ |
|
| 106 | + /** |
|
| 107 | + * Update action is succeed |
|
| 108 | + * @param String $message |
|
| 109 | + * @return mixed |
|
| 110 | + * @since May 2, 2016 9:54:09 AM |
|
| 111 | + * @uses |
|
| 112 | + * @see |
|
| 113 | + * @author Shima Payro <[email protected]> |
|
| 114 | + */ |
|
| 115 | 115 | public function updateFaild( $message = null ) { |
| 116 | 116 | |
| 117 | 117 | if ( is_null( $message ) ) |
@@ -124,15 +124,15 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | - /** |
|
| 128 | - * Insert action is faild |
|
| 129 | - * @param String $message |
|
| 130 | - * @return mixed |
|
| 131 | - * @since May 2, 2016 9:54:27 AM |
|
| 132 | - * @uses |
|
| 133 | - * @see |
|
| 134 | - * @author Shima Payro <[email protected]> |
|
| 135 | - */ |
|
| 127 | + /** |
|
| 128 | + * Insert action is faild |
|
| 129 | + * @param String $message |
|
| 130 | + * @return mixed |
|
| 131 | + * @since May 2, 2016 9:54:27 AM |
|
| 132 | + * @uses |
|
| 133 | + * @see |
|
| 134 | + * @author Shima Payro <[email protected]> |
|
| 135 | + */ |
|
| 136 | 136 | public function insertFaild( $message = null ) { |
| 137 | 137 | |
| 138 | 138 | if ( is_null( $message ) ) |
@@ -145,14 +145,14 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | } |
| 147 | 147 | |
| 148 | - /** |
|
| 149 | - * Database connection is refused |
|
| 150 | - * @return mixed |
|
| 151 | - * @since May 2, 2016 9:54:45 AM |
|
| 152 | - * @uses |
|
| 153 | - * @see |
|
| 154 | - * @author Shima Payro <[email protected]> |
|
| 155 | - */ |
|
| 148 | + /** |
|
| 149 | + * Database connection is refused |
|
| 150 | + * @return mixed |
|
| 151 | + * @since May 2, 2016 9:54:45 AM |
|
| 152 | + * @uses |
|
| 153 | + * @see |
|
| 154 | + * @author Shima Payro <[email protected]> |
|
| 155 | + */ |
|
| 156 | 156 | public function connectionRefused() { |
| 157 | 157 | |
| 158 | 158 | return $this->setStatusCode( 445 ) |
@@ -162,15 +162,15 @@ discard block |
||
| 162 | 162 | |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - /** |
|
| 166 | - * page requested is not found |
|
| 167 | - * @param String $message |
|
| 168 | - * @return mixed |
|
| 169 | - * @since May 2, 2016 9:55:20 AM |
|
| 170 | - * @uses |
|
| 171 | - * @see |
|
| 172 | - * @author Shima Payro <[email protected]> |
|
| 173 | - */ |
|
| 165 | + /** |
|
| 166 | + * page requested is not found |
|
| 167 | + * @param String $message |
|
| 168 | + * @return mixed |
|
| 169 | + * @since May 2, 2016 9:55:20 AM |
|
| 170 | + * @uses |
|
| 171 | + * @see |
|
| 172 | + * @author Shima Payro <[email protected]> |
|
| 173 | + */ |
|
| 174 | 174 | public function notFound() { |
| 175 | 175 | |
| 176 | 176 | return $this->setStatusCode( 404 ) |
@@ -180,15 +180,15 @@ discard block |
||
| 180 | 180 | |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | - /** |
|
| 184 | - * Wrong parameters are entered |
|
| 185 | - * @param String $message |
|
| 186 | - * @return mixed |
|
| 187 | - * @since May 2, 2016 9:55:20 AM |
|
| 188 | - * @uses |
|
| 189 | - * @see |
|
| 190 | - * @author Shima Payro <[email protected]> |
|
| 191 | - */ |
|
| 183 | + /** |
|
| 184 | + * Wrong parameters are entered |
|
| 185 | + * @param String $message |
|
| 186 | + * @return mixed |
|
| 187 | + * @since May 2, 2016 9:55:20 AM |
|
| 188 | + * @uses |
|
| 189 | + * @see |
|
| 190 | + * @author Shima Payro <[email protected]> |
|
| 191 | + */ |
|
| 192 | 192 | public function wrongParameters() { |
| 193 | 193 | |
| 194 | 194 | return $this->setStatusCode( 406 ) |
@@ -198,15 +198,15 @@ discard block |
||
| 198 | 198 | |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | - /** |
|
| 202 | - * Method is not allowed |
|
| 203 | - * @param String $message |
|
| 204 | - * @return mixed |
|
| 205 | - * @since May 2, 2016 9:55:20 AM |
|
| 206 | - * @uses |
|
| 207 | - * @see |
|
| 208 | - * @author Shima Payro <[email protected]> |
|
| 209 | - */ |
|
| 201 | + /** |
|
| 202 | + * Method is not allowed |
|
| 203 | + * @param String $message |
|
| 204 | + * @return mixed |
|
| 205 | + * @since May 2, 2016 9:55:20 AM |
|
| 206 | + * @uses |
|
| 207 | + * @see |
|
| 208 | + * @author Shima Payro <[email protected]> |
|
| 209 | + */ |
|
| 210 | 210 | public function methodNotAllowed() { |
| 211 | 211 | |
| 212 | 212 | return $this->setStatusCode( 405 ) |
@@ -216,15 +216,15 @@ discard block |
||
| 216 | 216 | |
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - /** |
|
| 220 | - * There ara validation errors |
|
| 221 | - * @param $data array |
|
| 222 | - * @return mixed |
|
| 223 | - * @since May 2, 2016 9:55:20 AM |
|
| 224 | - * @uses |
|
| 225 | - * @see |
|
| 226 | - * @author Shima Payro <[email protected]> |
|
| 227 | - */ |
|
| 219 | + /** |
|
| 220 | + * There ara validation errors |
|
| 221 | + * @param $data array |
|
| 222 | + * @return mixed |
|
| 223 | + * @since May 2, 2016 9:55:20 AM |
|
| 224 | + * @uses |
|
| 225 | + * @see |
|
| 226 | + * @author Shima Payro <[email protected]> |
|
| 227 | + */ |
|
| 228 | 228 | public function validationErrors( $message = null ) { |
| 229 | 229 | |
| 230 | 230 | return $this->setStatusCode( 420 ) |
@@ -234,15 +234,15 @@ discard block |
||
| 234 | 234 | |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | - /** |
|
| 238 | - * The request field is not found |
|
| 239 | - * @param String $message |
|
| 240 | - * @return mixed |
|
| 241 | - * @since May 2, 2016 9:55:20 AM |
|
| 242 | - * @uses |
|
| 243 | - * @see |
|
| 244 | - * @author Shima Payro <[email protected]> |
|
| 245 | - */ |
|
| 237 | + /** |
|
| 238 | + * The request field is not found |
|
| 239 | + * @param String $message |
|
| 240 | + * @return mixed |
|
| 241 | + * @since May 2, 2016 9:55:20 AM |
|
| 242 | + * @uses |
|
| 243 | + * @see |
|
| 244 | + * @author Shima Payro <[email protected]> |
|
| 245 | + */ |
|
| 246 | 246 | public function requestFieldNotFound() { |
| 247 | 247 | |
| 248 | 248 | return $this->setStatusCode( 446 ) |
@@ -54,10 +54,10 @@ discard block |
||
| 54 | 54 | $this->lang = \App::getLocale(); |
| 55 | 55 | |
| 56 | 56 | if(! file_exists(config_path($this->lang . '.php'))){ |
| 57 | - $this->config = include __DIR__ . '/../errors/lang/' . $this->lang . '.php'; |
|
| 58 | - } else { |
|
| 59 | - $this->config = include config_path($this->lang . '.php'); |
|
| 60 | - } |
|
| 57 | + $this->config = include __DIR__ . '/../errors/lang/' . $this->lang . '.php'; |
|
| 58 | + } else { |
|
| 59 | + $this->config = include config_path($this->lang . '.php'); |
|
| 60 | + } |
|
| 61 | 61 | |
| 62 | 62 | } |
| 63 | 63 | |
@@ -161,9 +161,9 @@ discard block |
||
| 161 | 161 | $res[ 'error' ] = $this->getErrorCode(); |
| 162 | 162 | |
| 163 | 163 | if ( is_null( $message ) ) |
| 164 | - $res[ 'message' ] = $this->getErrorMessage(); |
|
| 165 | - else |
|
| 166 | - $res[ 'message' ] = $message; |
|
| 164 | + $res[ 'message' ] = $this->getErrorMessage(); |
|
| 165 | + else |
|
| 166 | + $res[ 'message' ] = $message; |
|
| 167 | 167 | |
| 168 | 168 | } else { |
| 169 | 169 | |