Completed
Pull Request — master (#6)
by
unknown
01:33
created
vendor/composer/autoload_static.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -6,24 +6,24 @@
 block discarded – undo
6 6
 
7 7
 class ComposerStaticInitb90bf1d271f3139658812a290f5c564b
8 8
 {
9
-    public static $prefixLengthsPsr4 = array (
9
+    public static $prefixLengthsPsr4 = array(
10 10
         'A' => 
11
-        array (
11
+        array(
12 12
             'Anetwork\\Respond\\' => 17,
13 13
         ),
14 14
     );
15 15
 
16
-    public static $prefixDirsPsr4 = array (
16
+    public static $prefixDirsPsr4 = array(
17 17
         'Anetwork\\Respond\\' => 
18
-        array (
19
-            0 => __DIR__ . '/../..' . '/src',
20
-            1 => __DIR__ . '/../..' . '/tests',
18
+        array(
19
+            0 => __DIR__.'/../..'.'/src',
20
+            1 => __DIR__.'/../..'.'/tests',
21 21
         ),
22 22
     );
23 23
 
24 24
     public static function getInitializer(ClassLoader $loader)
25 25
     {
26
-        return \Closure::bind(function () use ($loader) {
26
+        return \Closure::bind(function() use ($loader) {
27 27
             $loader->prefixLengthsPsr4 = ComposerStaticInitb90bf1d271f3139658812a290f5c564b::$prefixLengthsPsr4;
28 28
             $loader->prefixDirsPsr4 = ComposerStaticInitb90bf1d271f3139658812a290f5c564b::$prefixDirsPsr4;
29 29
 
Please login to merge, or discard this patch.
vendor/composer/autoload_psr4.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
 $baseDir = dirname($vendorDir);
7 7
 
8 8
 return array(
9
-    'Anetwork\\Respond\\' => array($baseDir . '/src', $baseDir . '/tests'),
9
+    'Anetwork\\Respond\\' => array($baseDir.'/src', $baseDir.'/tests'),
10 10
 );
Please login to merge, or discard this patch.
vendor/composer/ClassLoader.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -123,20 +123,20 @@  discard block
 block discarded – undo
123 123
             return;
124 124
         }
125 125
 
126
-        $first = $prefix[0];
127
-        if (!isset($this->prefixesPsr0[$first][$prefix])) {
128
-            $this->prefixesPsr0[$first][$prefix] = (array) $paths;
126
+        $first = $prefix[ 0 ];
127
+        if (!isset($this->prefixesPsr0[ $first ][ $prefix ])) {
128
+            $this->prefixesPsr0[ $first ][ $prefix ] = (array) $paths;
129 129
 
130 130
             return;
131 131
         }
132 132
         if ($prepend) {
133
-            $this->prefixesPsr0[$first][$prefix] = array_merge(
133
+            $this->prefixesPsr0[ $first ][ $prefix ] = array_merge(
134 134
                 (array) $paths,
135
-                $this->prefixesPsr0[$first][$prefix]
135
+                $this->prefixesPsr0[ $first ][ $prefix ]
136 136
             );
137 137
         } else {
138
-            $this->prefixesPsr0[$first][$prefix] = array_merge(
139
-                $this->prefixesPsr0[$first][$prefix],
138
+            $this->prefixesPsr0[ $first ][ $prefix ] = array_merge(
139
+                $this->prefixesPsr0[ $first ][ $prefix ],
140 140
                 (array) $paths
141 141
             );
142 142
         }
@@ -167,24 +167,24 @@  discard block
 block discarded – undo
167 167
                     (array) $paths
168 168
                 );
169 169
             }
170
-        } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
170
+        } elseif (!isset($this->prefixDirsPsr4[ $prefix ])) {
171 171
             // Register directories for a new namespace.
172 172
             $length = strlen($prefix);
173
-            if ('\\' !== $prefix[$length - 1]) {
173
+            if ('\\' !== $prefix[ $length - 1 ]) {
174 174
                 throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
175 175
             }
176
-            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
177
-            $this->prefixDirsPsr4[$prefix] = (array) $paths;
176
+            $this->prefixLengthsPsr4[ $prefix[ 0 ] ][ $prefix ] = $length;
177
+            $this->prefixDirsPsr4[ $prefix ] = (array) $paths;
178 178
         } elseif ($prepend) {
179 179
             // Prepend directories for an already registered namespace.
180
-            $this->prefixDirsPsr4[$prefix] = array_merge(
180
+            $this->prefixDirsPsr4[ $prefix ] = array_merge(
181 181
                 (array) $paths,
182
-                $this->prefixDirsPsr4[$prefix]
182
+                $this->prefixDirsPsr4[ $prefix ]
183 183
             );
184 184
         } else {
185 185
             // Append directories for an already registered namespace.
186
-            $this->prefixDirsPsr4[$prefix] = array_merge(
187
-                $this->prefixDirsPsr4[$prefix],
186
+            $this->prefixDirsPsr4[ $prefix ] = array_merge(
187
+                $this->prefixDirsPsr4[ $prefix ],
188 188
                 (array) $paths
189 189
             );
190 190
         }
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         if (!$prefix) {
203 203
             $this->fallbackDirsPsr0 = (array) $paths;
204 204
         } else {
205
-            $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
205
+            $this->prefixesPsr0[ $prefix[ 0 ] ][ $prefix ] = (array) $paths;
206 206
         }
207 207
     }
208 208
 
@@ -221,11 +221,11 @@  discard block
 block discarded – undo
221 221
             $this->fallbackDirsPsr4 = (array) $paths;
222 222
         } else {
223 223
             $length = strlen($prefix);
224
-            if ('\\' !== $prefix[$length - 1]) {
224
+            if ('\\' !== $prefix[ $length - 1 ]) {
225 225
                 throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
226 226
             }
227
-            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
228
-            $this->prefixDirsPsr4[$prefix] = (array) $paths;
227
+            $this->prefixLengthsPsr4[ $prefix[ 0 ] ][ $prefix ] = $length;
228
+            $this->prefixDirsPsr4[ $prefix ] = (array) $paths;
229 229
         }
230 230
     }
231 231
 
@@ -314,15 +314,15 @@  discard block
 block discarded – undo
314 314
     public function findFile($class)
315 315
     {
316 316
         // work around for PHP 5.3.0 - 5.3.2 https://bugs.php.net/50731
317
-        if ('\\' == $class[0]) {
317
+        if ('\\' == $class[ 0 ]) {
318 318
             $class = substr($class, 1);
319 319
         }
320 320
 
321 321
         // class map lookup
322
-        if (isset($this->classMap[$class])) {
323
-            return $this->classMap[$class];
322
+        if (isset($this->classMap[ $class ])) {
323
+            return $this->classMap[ $class ];
324 324
         }
325
-        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
325
+        if ($this->classMapAuthoritative || isset($this->missingClasses[ $class ])) {
326 326
             return false;
327 327
         }
328 328
 
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 
336 336
         if (false === $file) {
337 337
             // Remember that this class does not exist.
338
-            $this->missingClasses[$class] = true;
338
+            $this->missingClasses[ $class ] = true;
339 339
         }
340 340
 
341 341
         return $file;
@@ -344,14 +344,14 @@  discard block
 block discarded – undo
344 344
     private function findFileWithExtension($class, $ext)
345 345
     {
346 346
         // PSR-4 lookup
347
-        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
347
+        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR).$ext;
348 348
 
349
-        $first = $class[0];
350
-        if (isset($this->prefixLengthsPsr4[$first])) {
351
-            foreach ($this->prefixLengthsPsr4[$first] as $prefix => $length) {
349
+        $first = $class[ 0 ];
350
+        if (isset($this->prefixLengthsPsr4[ $first ])) {
351
+            foreach ($this->prefixLengthsPsr4[ $first ] as $prefix => $length) {
352 352
                 if (0 === strpos($class, $prefix)) {
353
-                    foreach ($this->prefixDirsPsr4[$prefix] as $dir) {
354
-                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
353
+                    foreach ($this->prefixDirsPsr4[ $prefix ] as $dir) {
354
+                        if (file_exists($file = $dir.DIRECTORY_SEPARATOR.substr($logicalPathPsr4, $length))) {
355 355
                             return $file;
356 356
                         }
357 357
                     }
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 
362 362
         // PSR-4 fallback dirs
363 363
         foreach ($this->fallbackDirsPsr4 as $dir) {
364
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
364
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr4)) {
365 365
                 return $file;
366 366
             }
367 367
         }
@@ -373,14 +373,14 @@  discard block
 block discarded – undo
373 373
                 . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
374 374
         } else {
375 375
             // PEAR-like class name
376
-            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
376
+            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR).$ext;
377 377
         }
378 378
 
379
-        if (isset($this->prefixesPsr0[$first])) {
380
-            foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
379
+        if (isset($this->prefixesPsr0[ $first ])) {
380
+            foreach ($this->prefixesPsr0[ $first ] as $prefix => $dirs) {
381 381
                 if (0 === strpos($class, $prefix)) {
382 382
                     foreach ($dirs as $dir) {
383
-                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
383
+                        if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
384 384
                             return $file;
385 385
                         }
386 386
                     }
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
 
391 391
         // PSR-0 fallback dirs
392 392
         foreach ($this->fallbackDirsPsr0 as $dir) {
393
-            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
393
+            if (file_exists($file = $dir.DIRECTORY_SEPARATOR.$logicalPathPsr0)) {
394 394
                 return $file;
395 395
             }
396 396
         }
Please login to merge, or discard this patch.
vendor/composer/autoload_real.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
     public static function loadClassLoader($class)
10 10
     {
11 11
         if ('Composer\Autoload\ClassLoader' === $class) {
12
-            require __DIR__ . '/ClassLoader.php';
12
+            require __DIR__.'/ClassLoader.php';
13 13
         }
14 14
     }
15 15
 
@@ -25,21 +25,21 @@  discard block
 block discarded – undo
25 25
 
26 26
         $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION');
27 27
         if ($useStaticLoader) {
28
-            require_once __DIR__ . '/autoload_static.php';
28
+            require_once __DIR__.'/autoload_static.php';
29 29
 
30 30
             call_user_func(\Composer\Autoload\ComposerStaticInitb90bf1d271f3139658812a290f5c564b::getInitializer($loader));
31 31
         } else {
32
-            $map = require __DIR__ . '/autoload_namespaces.php';
32
+            $map = require __DIR__.'/autoload_namespaces.php';
33 33
             foreach ($map as $namespace => $path) {
34 34
                 $loader->set($namespace, $path);
35 35
             }
36 36
 
37
-            $map = require __DIR__ . '/autoload_psr4.php';
37
+            $map = require __DIR__.'/autoload_psr4.php';
38 38
             foreach ($map as $namespace => $path) {
39 39
                 $loader->setPsr4($namespace, $path);
40 40
             }
41 41
 
42
-            $classMap = require __DIR__ . '/autoload_classmap.php';
42
+            $classMap = require __DIR__.'/autoload_classmap.php';
43 43
             if ($classMap) {
44 44
                 $loader->addClassMap($classMap);
45 45
             }
Please login to merge, or discard this patch.
vendor/autoload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,6 +2,6 @@
 block discarded – undo
2 2
 
3 3
 // autoload.php @generated by Composer
4 4
 
5
-require_once __DIR__ . '/composer' . '/autoload_real.php';
5
+require_once __DIR__.'/composer'.'/autoload_real.php';
6 6
 
7 7
 return ComposerAutoloaderInitb90bf1d271f3139658812a290f5c564b::getLoader();
Please login to merge, or discard this patch.
src/RespondServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 		$lang = \App::getLocale();
18 18
 
19 19
 		$this->publishes([
20
-			__DIR__.'/../errors/lang/' . $lang . '.php' => config_path( $lang . '.php' ),
20
+			__DIR__.'/../errors/lang/'.$lang.'.php' => config_path($lang.'.php'),
21 21
 		]);
22 22
 
23 23
 	}
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 	private function registerMessages()
39 39
 	{
40 40
 
41
-		$this->app->bind( 'Anetwork\Respond\Messages', function() {
41
+		$this->app->bind('Anetwork\Respond\Messages', function() {
42 42
 
43 43
 			return new Messages();
44 44
 
Please login to merge, or discard this patch.
src/Main.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	 * Haeders
33 33
 	 * @var array
34 34
 	 */
35
-	protected $headers = [];
35
+	protected $headers = [ ];
36 36
 
37 37
 	/**
38 38
 	 * @var string
@@ -53,10 +53,10 @@  discard block
 block discarded – undo
53 53
 
54 54
 		$this->lang = \App::getLocale();
55 55
 
56
-		if(! file_exists(config_path($this->lang . '.php'))){
57
-            $this->config = include __DIR__ . '/../errors/lang/' . $this->lang . '.php';
56
+		if (!file_exists(config_path($this->lang.'.php'))) {
57
+            $this->config = include __DIR__.'/../errors/lang/'.$this->lang.'.php';
58 58
         } else {
59
-            $this->config = include config_path($this->lang . '.php');
59
+            $this->config = include config_path($this->lang.'.php');
60 60
         }
61 61
 
62 62
 	}
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	 * @uses
84 84
 	 * @see
85 85
 	 */
86
-	public function setStatusCode( $statusCode ) {
86
+	public function setStatusCode($statusCode) {
87 87
 
88 88
 		$this->statusCode = $statusCode;
89 89
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 	 * @uses
114 114
 	 * @see
115 115
 	 */
116
-	public function setStatusText( $statusText ) {
116
+	public function setStatusText($statusText) {
117 117
 
118 118
 		$this->statusText = $statusText;
119 119
 
@@ -130,15 +130,15 @@  discard block
 block discarded – undo
130 130
 	 * @uses
131 131
 	 * @see
132 132
 	 */
133
-	public function respond( $data ) {
133
+	public function respond($data) {
134 134
 
135
-		$result = array_filter( $this->getHeaders() );
135
+		$result = array_filter($this->getHeaders());
136 136
 
137
-		if ( empty( $result ) )
138
-			return response()->json( $data, $this->getStatusCode() );
137
+		if (empty($result))
138
+			return response()->json($data, $this->getStatusCode());
139 139
 
140
-		return response()->json( $data, $this->getStatusCode() )
141
-						->withHeaders( $this->getHeaders() );
140
+		return response()->json($data, $this->getStatusCode())
141
+						->withHeaders($this->getHeaders());
142 142
 
143 143
 	}
144 144
 
@@ -151,16 +151,16 @@  discard block
 block discarded – undo
151 151
 	 * @uses
152 152
 	 * @see
153 153
 	 */
154
-	public function respondWithMessage( $message = null ) {
154
+	public function respondWithMessage($message = null) {
155 155
 
156 156
 		$res[ 'status' ] = $this->getStatusText();
157 157
 
158 158
 		//if it's about failure
159
-		if ( $this->getErrorCode() ) {
159
+		if ($this->getErrorCode()) {
160 160
 
161 161
 			$res[ 'error' ] = $this->getErrorCode();
162 162
 
163
-			if ( is_null( $message ) )
163
+			if (is_null($message))
164 164
 		     $res[ 'message' ] = $this->getErrorMessage();
165 165
 		    else
166 166
 		     $res[ 'message' ] = $message;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
 		}
173 173
 
174
-		return $this->respond( $res );
174
+		return $this->respond($res);
175 175
 
176 176
 	}
177 177
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 	 * @param $errorCode integer
183 183
 	 * @return $this
184 184
 	 */
185
-	public function setErrorCode( $errorCode ) {
185
+	public function setErrorCode($errorCode) {
186 186
 
187 187
 		$this->error = $this->config[ $errorCode ];
188 188
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 	 */
213 213
 	public function getErrorMessage() {
214 214
 
215
-		return $this->error['message'];
215
+		return $this->error[ 'message' ];
216 216
 
217 217
 	}
218 218
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
 	 * @since Sep 13, 2016
235 235
 	 * @return array
236 236
 	 */
237
-	public function setHeaders( $headers = [] ) {
237
+	public function setHeaders($headers = [ ]) {
238 238
 
239 239
 		$this->headers = $headers;
240 240
 
@@ -251,12 +251,12 @@  discard block
 block discarded – undo
251 251
 	 * @uses
252 252
 	 * @see
253 253
 	 */
254
-	 public function respondWithResult( $data = NULL ) {
254
+	 public function respondWithResult($data = NULL) {
255 255
 
256 256
 		$res[ 'status' ] = $this->getStatusText();
257 257
 
258 258
 		//if it's about laravel validation error
259
-		if ( $this->getErrorCode() && $this->getStatusCode() == 420 ) {
259
+		if ($this->getErrorCode() && $this->getStatusCode() == 420) {
260 260
 
261 261
 			$res[ 'error' ] = $this->getErrorCode();
262 262
 			$res[ 'message' ] = $data;
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 
268 268
 		}
269 269
 
270
-		return $this->respond( $res );
270
+		return $this->respond($res);
271 271
 
272 272
 	}
273 273
 
Please login to merge, or discard this patch.
src/Messages.php 1 patch
Spacing   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@  discard block
 block discarded – undo
13 13
 	 * @uses
14 14
 	 * @see
15 15
 	 */
16
-	public function succeed( $data ) {
16
+	public function succeed($data) {
17 17
 
18
-		return $this->setStatusCode( 200 )
19
-					->setStatusText( 'success' )
20
-					->respondWithResult( $data );
18
+		return $this->setStatusCode(200)
19
+					->setStatusText('success')
20
+					->respondWithResult($data);
21 21
 
22 22
 	}
23 23
 
@@ -29,14 +29,14 @@  discard block
 block discarded – undo
29 29
 	 * @uses
30 30
 	 * @see
31 31
 	 */
32
-	public function deleteSucceeded( $message = null ) {
32
+	public function deleteSucceeded($message = null) {
33 33
 
34
-		if ( is_null( $message ) )
34
+		if (is_null($message))
35 35
 			$message = $this->config[ 'success' ][ 'delete' ];
36 36
 
37
-		return $this->setStatusCode( 200 )
38
-					->setStatusText( 'success' )
39
-					->respondWithMessage( $message );
37
+		return $this->setStatusCode(200)
38
+					->setStatusText('success')
39
+					->respondWithMessage($message);
40 40
 
41 41
 	}
42 42
 
@@ -48,14 +48,14 @@  discard block
 block discarded – undo
48 48
 	 * @uses
49 49
 	 * @see
50 50
 	 */
51
-	public function updateSucceeded( $message = null ) {
51
+	public function updateSucceeded($message = null) {
52 52
 
53
-		if ( is_null( $message ) )
53
+		if (is_null($message))
54 54
 			$message = $this->config[ 'success' ][ 'update' ];
55 55
 
56
-		return $this->setStatusCode( 200 )
57
-					->setStatusText( 'success' )
58
-					->respondWithMessage( $message );
56
+		return $this->setStatusCode(200)
57
+					->setStatusText('success')
58
+					->respondWithMessage($message);
59 59
 
60 60
 	}
61 61
 
@@ -67,14 +67,14 @@  discard block
 block discarded – undo
67 67
 	 * @uses
68 68
 	 * @see
69 69
 	 */
70
-	public function insertSucceeded( $message = null ) {
70
+	public function insertSucceeded($message = null) {
71 71
 
72
-		if ( is_null( $message ) )
72
+		if (is_null($message))
73 73
 			$message = $this->config[ 'success' ][ 'insert' ];
74 74
 
75
-		return $this->setStatusCode( 200 )
76
-					->setStatusText( 'success' )
77
-					->respondWithMessage( $message );
75
+		return $this->setStatusCode(200)
76
+					->setStatusText('success')
77
+					->respondWithMessage($message);
78 78
 
79 79
 	}
80 80
 
@@ -86,15 +86,15 @@  discard block
 block discarded – undo
86 86
 	 * @uses
87 87
 	 * @see
88 88
 	 */
89
-	public function deleteFaild( $message = null ) {
89
+	public function deleteFaild($message = null) {
90 90
 
91
-		if ( is_null( $message ) )
91
+		if (is_null($message))
92 92
 			$message = $this->config[ 'fail' ][ 'delete' ];
93 93
 
94
-		return $this->setStatusCode( 447 )
95
-					->setStatusText( 'fail' )
96
-					->setErrorCode( 5447 )
97
-					->respondWithMessage( $message );
94
+		return $this->setStatusCode(447)
95
+					->setStatusText('fail')
96
+					->setErrorCode(5447)
97
+					->respondWithMessage($message);
98 98
 
99 99
 	}
100 100
 
@@ -106,15 +106,15 @@  discard block
 block discarded – undo
106 106
 	 * @uses
107 107
 	 * @see
108 108
 	 */
109
-	public function updateFaild( $message = null ) {
109
+	public function updateFaild($message = null) {
110 110
 
111
-		if ( is_null( $message ) )
111
+		if (is_null($message))
112 112
 			$message = $this->config[ 'fail' ][ 'update' ];
113 113
 
114
-		return $this->setStatusCode( 449 )
115
-					->setStatusText( 'fail' )
116
-					->setErrorCode( 5449 )
117
-					->respondWithMessage( $message );
114
+		return $this->setStatusCode(449)
115
+					->setStatusText('fail')
116
+					->setErrorCode(5449)
117
+					->respondWithMessage($message);
118 118
 
119 119
 	}
120 120
 
@@ -126,15 +126,15 @@  discard block
 block discarded – undo
126 126
 	 * @uses
127 127
 	 * @see
128 128
 	 */
129
-	public function insertFaild( $message = null ) {
129
+	public function insertFaild($message = null) {
130 130
 
131
-		if ( is_null( $message ) )
131
+		if (is_null($message))
132 132
 			$message = $this->config[ 'fail' ][ 'insert' ];
133 133
 
134
-		return $this->setStatusCode( 448 )
135
-					->setStatusText( 'fail' )
136
-					->setErrorCode( 5448 )
137
-					->respondWithMessage( $message );
134
+		return $this->setStatusCode(448)
135
+					->setStatusText('fail')
136
+					->setErrorCode(5448)
137
+					->respondWithMessage($message);
138 138
 
139 139
 	}
140 140
 
@@ -148,9 +148,9 @@  discard block
 block discarded – undo
148 148
 	 */
149 149
 	public function connectionRefused() {
150 150
 
151
-		return $this->setStatusCode( 445 )
152
-					->setStatusText( 'fail' )
153
-					->setErrorCode( 5445 )
151
+		return $this->setStatusCode(445)
152
+					->setStatusText('fail')
153
+					->setErrorCode(5445)
154 154
 					->respondWithMessage();
155 155
 
156 156
 	}
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
 	 */
166 166
 	public function notFound() {
167 167
 
168
-		return $this->setStatusCode( 404 )
169
-					->setStatusText( 'fail' )
170
-					->setErrorCode( 5404 )
168
+		return $this->setStatusCode(404)
169
+					->setStatusText('fail')
170
+					->setErrorCode(5404)
171 171
 					->respondWithMessage();
172 172
 
173 173
 	}
@@ -182,9 +182,9 @@  discard block
 block discarded – undo
182 182
 	 */
183 183
 	public function wrongParameters() {
184 184
 
185
-		return $this->setStatusCode( 406 )
186
-					->setStatusText( 'fail' )
187
-					->setErrorCode( 5406 )
185
+		return $this->setStatusCode(406)
186
+					->setStatusText('fail')
187
+					->setErrorCode(5406)
188 188
 					->respondWithMessage();
189 189
 
190 190
 	}
@@ -199,9 +199,9 @@  discard block
 block discarded – undo
199 199
 	 */
200 200
 	public function methodNotAllowed() {
201 201
 
202
-		return $this->setStatusCode( 405 )
203
-					->setStatusText( 'fail' )
204
-					->setErrorCode( 5405 )
202
+		return $this->setStatusCode(405)
203
+					->setStatusText('fail')
204
+					->setErrorCode(5405)
205 205
 					->respondWithMessage();
206 206
 
207 207
 	}
@@ -214,12 +214,12 @@  discard block
 block discarded – undo
214 214
 	 * @uses
215 215
 	 * @see
216 216
 	 */
217
-	public function validationErrors( $message = null ) {
217
+	public function validationErrors($message = null) {
218 218
 
219
-		return $this->setStatusCode( 420 )
220
-					->setStatusText( 'fail' )
221
-					->setErrorCode( 5420 )
222
-					->respondWithResult( $message );
219
+		return $this->setStatusCode(420)
220
+					->setStatusText('fail')
221
+					->setErrorCode(5420)
222
+					->respondWithResult($message);
223 223
 
224 224
 	}
225 225
 
@@ -233,9 +233,9 @@  discard block
 block discarded – undo
233 233
 	 */
234 234
 	public function requestFieldNotFound() {
235 235
 
236
-		return $this->setStatusCode( 446 )
237
-					->setStatusText( 'fail' )
238
-					->setErrorCode( 1001 )
236
+		return $this->setStatusCode(446)
237
+					->setStatusText('fail')
238
+					->setErrorCode(1001)
239 239
 					->respondWithMessage();
240 240
 
241 241
 	}
@@ -248,8 +248,8 @@  discard block
 block discarded – undo
248 248
 	 */
249 249
 	public function requestFieldDuplicated() {
250 250
 
251
-	  return $this->setStatusCode( 400 )
252
-					->setStatusText( 'fail' )
251
+	  return $this->setStatusCode(400)
252
+					->setStatusText('fail')
253 253
 					->SetErrorCode(1004)
254 254
 					->respondWithMessage();
255 255
 
@@ -262,11 +262,11 @@  discard block
 block discarded – undo
262 262
 	 * @param $code integer
263 263
 	 * @return mixed
264 264
 	 */
265
-	public function error( $code ) {
265
+	public function error($code) {
266 266
 
267
-	  return $this->setStatusCode( 400 )
268
-					->setStatusText( 'fail' )
269
-					->setErrorCode( $code )
267
+	  return $this->setStatusCode(400)
268
+					->setStatusText('fail')
269
+					->setErrorCode($code)
270 270
 					->respondWithMessage();
271 271
 
272 272
 	}
Please login to merge, or discard this patch.