Completed
Pull Request — master (#473)
by
unknown
01:36
created
src/Postman/CollectionWriter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,16 +30,16 @@  discard block
 block discarded – undo
30 30
         $collection = [
31 31
             'variables' => [],
32 32
             'info' => [
33
-                'name' => config('apidoc.postman.name') ?: config('app.name').' API',
33
+                'name' => config('apidoc.postman.name') ?: config('app.name') . ' API',
34 34
                 '_postman_id' => Uuid::uuid4()->toString(),
35 35
                 'description' => config('apidoc.postman.description') ?: '',
36 36
                 'schema' => 'https://schema.getpostman.com/json/collection/v2.0.0/collection.json',
37 37
             ],
38
-            'item' => $this->routeGroups->map(function ($routes, $groupName) {
38
+            'item' => $this->routeGroups->map(function($routes, $groupName) {
39 39
                 return [
40 40
                     'name' => $groupName,
41 41
                     'description' => '',
42
-                    'item' => $routes->map(function ($route) {
42
+                    'item' => $routes->map(function($route) {
43 43
                         $mode = $route['methods'][0] === 'PUT' ? 'urlencoded' : 'formdata';
44 44
 
45 45
                         return [
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                             'request' => [
48 48
                                 'url' => url($route['uri']),
49 49
                                 'method' => $route['methods'][0],
50
-                                'headers' => collect($route['headers'])->map(function ($parameter, $key) {
50
+                                'headers' => collect($route['headers'])->map(function($parameter, $key) {
51 51
                                     return [
52 52
                                         'key' => $key,
53 53
                                         'value' => $parameter,
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
                                 })->values()->toArray(),
56 56
                                 'body' => [
57 57
                                     'mode' => $mode,
58
-                                    $mode => collect($route['bodyParameters'])->map(function ($parameter, $key) {
58
+                                    $mode => collect($route['bodyParameters'])->map(function($parameter, $key) {
59 59
                                         return [
60 60
                                             'key' => $key,
61 61
                                             'value' => isset($parameter['value']) ? $parameter['value'] : '',
Please login to merge, or discard this patch.