@@ -8,6 +8,6 @@ |
||
8 | 8 | { |
9 | 9 | public function index() |
10 | 10 | { |
11 | - return response()->json(['ok']); |
|
11 | + return response()->json([ 'ok' ]); |
|
12 | 12 | } |
13 | 13 | } |
@@ -20,6 +20,6 @@ |
||
20 | 20 | 'password' => Hash::make('letmein') |
21 | 21 | ]); |
22 | 22 | } |
23 | - User::create(['name' => 'ando', 'email' => '[email protected]', 'password' => Hash::make('letmein')]); |
|
23 | + User::create([ 'name' => 'ando', 'email' => '[email protected]', 'password' => Hash::make('letmein') ]); |
|
24 | 24 | } |
25 | 25 | } |
26 | 26 | \ No newline at end of file |
@@ -10,16 +10,16 @@ discard block |
||
10 | 10 | | and give it the controller to call when that URI is requested. |
11 | 11 | | |
12 | 12 | */ |
13 | -Route::group(['namespace' => 'V1', 'prefix' => 'v1', 'middleware' => 'api'], function () { |
|
13 | +Route::group([ 'namespace' => 'V1', 'prefix' => 'v1', 'middleware' => 'api' ], function() { |
|
14 | 14 | // Route::get('puppy', 'PuppyController@index'); |
15 | 15 | }); |
16 | 16 | |
17 | 17 | |
18 | -Route::group(['middleware' => \App\Http\Middleware\SpeakJson::class], function () { |
|
18 | +Route::group([ 'middleware' => \App\Http\Middleware\SpeakJson::class ], function() { |
|
19 | 19 | Route::post('v1/token', 'V1\TokenController@store'); |
20 | 20 | |
21 | - Route::get('/', function () { |
|
22 | - return ['name' => 'improv.ee api', 'documentation' => 'https://github.com/improv-ee/api']; |
|
21 | + Route::get('/', function() { |
|
22 | + return [ 'name' => 'improv.ee api', 'documentation' => 'https://github.com/improv-ee/api' ]; |
|
23 | 23 | }); |
24 | 24 | }); |
25 | 25 | |
@@ -35,6 +35,6 @@ discard block |
||
35 | 35 | | |
36 | 36 | */ |
37 | 37 | |
38 | -Route::group(['middleware' => ['web']], function () { |
|
38 | +Route::group([ 'middleware' => [ 'web' ] ], function() { |
|
39 | 39 | // |
40 | 40 | }); |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | $accept = $request->header('accept', '*/*'); |
30 | 30 | |
31 | - if (!in_array($accept, ['*/*', MediaTypeInterface::JSON_API_MEDIA_TYPE])) { |
|
31 | + if (!in_array($accept, [ '*/*', MediaTypeInterface::JSON_API_MEDIA_TYPE ])) { |
|
32 | 32 | return response(null, Response::HTTP_NOT_ACCEPTABLE); |
33 | 33 | } |
34 | 34 |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | { |
53 | 53 | if ($e instanceof HttpException) { |
54 | 54 | |
55 | - $message = $e->getMessage() ?: Response::$statusTexts[$e->getStatusCode()]; |
|
55 | + $message = $e->getMessage() ?: Response::$statusTexts[ $e->getStatusCode() ]; |
|
56 | 56 | |
57 | 57 | $error = new Error(null, null, $e->getStatusCode(), null, $message); |
58 | 58 | |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | return response( |
63 | 63 | $encoder->encodeError($error), |
64 | 64 | $e->getStatusCode(), |
65 | - ['Content-Type' => MediaTypeInterface::JSON_API_MEDIA_TYPE] |
|
65 | + [ 'Content-Type' => MediaTypeInterface::JSON_API_MEDIA_TYPE ] |
|
66 | 66 | ); |
67 | 67 | } |
68 | 68 |