Passed
Push — develop ( 4f5719...3815d6 )
by Fu
15:57 queued 08:18
created
stubs/example/Providers/RouteServiceProvider.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
     protected function mapWebRoutes()
51 51
     {
52 52
         Route::middleware('web')
53
-             ->namespace($this->namespace)
54
-             ->group(__DIR__.'/../Routes/web.php');
53
+                ->namespace($this->namespace)
54
+                ->group(__DIR__.'/../Routes/web.php');
55 55
     }
56 56
 
57 57
     /**
@@ -64,9 +64,9 @@  discard block
 block discarded – undo
64 64
     protected function mapApiRoutes()
65 65
     {
66 66
         Route::prefix('api')
67
-             ->middleware('api')
68
-             ->namespace($this->namespace)
69
-             ->group(__DIR__.'/../Routes/api.php');
67
+                ->middleware('api')
68
+                ->namespace($this->namespace)
69
+                ->group(__DIR__.'/../Routes/api.php');
70 70
     }
71 71
 
72 72
     /**
Please login to merge, or discard this patch.
stubs/example/Providers/ExampleServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -71,9 +71,9 @@  discard block
 block discarded – undo
71 71
             $sourcePath => $viewPath,
72 72
         ], 'views');
73 73
 
74
-        $this->loadViewsFrom(array_merge(array_map(function ($path) {
74
+        $this->loadViewsFrom(array_merge(array_map(function($path) {
75 75
             return $path.'/modules/example';
76
-        }, \Config::get('view.paths')), [$sourcePath]), 'example');
76
+        }, \Config::get('view.paths')), [ $sourcePath ]), 'example');
77 77
     }
78 78
 
79 79
     /**
@@ -111,6 +111,6 @@  discard block
 block discarded – undo
111 111
      */
112 112
     public function provides()
113 113
     {
114
-        return [];
114
+        return [ ];
115 115
     }
116 116
 }
Please login to merge, or discard this patch.
stubs/example/Http/Controllers/ExampleController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     {
18 18
         $name = Module::find('example')->name;
19 19
         $requirements = collect(Module::findRequirements('example'));
20
-        $requirements = $requirements->map(function ($item) {
20
+        $requirements = $requirements->map(function($item) {
21 21
             return $item->name;
22 22
         });
23 23
         $routes = get_routes('example');
Please login to merge, or discard this patch.
stubs/example/Http/Controllers/Api/V1/ExampleControllerI.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 {
14 14
     public function index(ResponsibilityChain $responsibilityChain, ExampleService $exampleService): Response
15 15
     {
16
-        $step1 = function () use ($exampleService) {
16
+        $step1 = function() use ($exampleService) {
17 17
             return $exampleService->index();
18 18
         };
19 19
 
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     ): Response {
28 28
         $attributes = $exampleStoreRequest->validated();
29 29
 
30
-        $step1 = function () use ($exampleService, $attributes) {
30
+        $step1 = function() use ($exampleService, $attributes) {
31 31
             return $exampleService->store($attributes);
32 32
         };
33 33
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     public function show(ResponsibilityChain $responsibilityChain, ExampleService $exampleService, int $id): Response
38 38
     {
39
-        $step1 = function () use ($exampleService, $id) {
39
+        $step1 = function() use ($exampleService, $id) {
40 40
             return $exampleService->show($id);
41 41
         };
42 42
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     ): Response {
52 52
         $attributes = $exampleUpdateRequest->validated();
53 53
 
54
-        $step1 = function () use ($exampleService, $id, $attributes) {
54
+        $step1 = function() use ($exampleService, $id, $attributes) {
55 55
             return $exampleService->update($id, $attributes);
56 56
         };
57 57
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
     public function destroy(ResponsibilityChain $responsibilityChain, ExampleService $exampleService, int $id): Response
62 62
     {
63
-        $step1 = function () use ($exampleService, $id) {
63
+        $step1 = function() use ($exampleService, $id) {
64 64
             return $exampleService->destroy($id);
65 65
         };
66 66
 
Please login to merge, or discard this patch.
stubs/example/Routes/api.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 
14 14
 Route::get('/example', 'ExampleController@index');
15 15
 
16
-Route::group(['prefix' => 'v1', 'namespace' => 'Api\V1'], function () {
17
-    Route::group(['prefix' => 'examples'], function () {
16
+Route::group([ 'prefix' => 'v1', 'namespace' => 'Api\V1' ], function() {
17
+    Route::group([ 'prefix' => 'examples' ], function() {
18 18
         Route::get('/', 'ExampleController@index');
19 19
         Route::post('/', 'ExampleController@store');
20 20
         Route::get('/{id}', 'ExampleController@show')->where('id', '\d+');
Please login to merge, or discard this patch.
example/Database/Migrations/2019_05_24_092630_create_examples_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('examples', function (Blueprint $table) {
16
+        Schema::create('examples', function(Blueprint $table) {
17 17
             $table->bigIncrements('id');
18 18
 
19 19
             $table->string('name')->unique()->comment('键名');
Please login to merge, or discard this patch.
stubs/example/Tests/ExampleTest.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     public function testStore()
32 32
     {
33 33
         $this->post("{$this->uri}", ['name' => 'demo', 'value' => 'hello world'])
34
-             ->assertStatus(StatusCodeEnum::HTTP_CREATED);
34
+                ->assertStatus(StatusCodeEnum::HTTP_CREATED);
35 35
     }
36 36
 
37 37
     public function testShow()
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 {
14 14
     use RefreshDatabase;
15 15
 
16
-    protected $connectionsToTransact = [null];
16
+    protected $connectionsToTransact = [ null ];
17 17
     protected $dropViews = false;
18 18
     protected $dropTypes = false;
19 19
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     public function testStore()
49 49
     {
50
-        $this->post("{$this->uri}", ['name' => 'demo', 'value' => 'hello world'])
50
+        $this->post("{$this->uri}", [ 'name' => 'demo', 'value' => 'hello world' ])
51 51
              ->assertStatus(StatusCodeEnum::HTTP_CREATED);
52 52
     }
53 53
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $this->seed(ExampleTableSeederTableSeeder::class);
64 64
 
65
-        $this->put("{$this->uri}/1", ['value' => 'Hello World'])->assertStatus(StatusCodeEnum::HTTP_RESET_CONTENT);
65
+        $this->put("{$this->uri}/1", [ 'value' => 'Hello World' ])->assertStatus(StatusCodeEnum::HTTP_RESET_CONTENT);
66 66
     }
67 67
 
68 68
     public function testDestroy()
Please login to merge, or discard this patch.
config/modules.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
             'readme'                 => 'readme.md',
43 43
         ],
44 44
         'replacements' => [
45
-            'routes/web'           => ['LOWER_NAME', 'STUDLY_NAME'],
46
-            'routes/api'           => ['LOWER_NAME', 'STUDLY_NAME'],
47
-            'json'                 => ['LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE'],
48
-            'scaffold/config'      => ['STUDLY_NAME'],
45
+            'routes/web'           => [ 'LOWER_NAME', 'STUDLY_NAME' ],
46
+            'routes/api'           => [ 'LOWER_NAME', 'STUDLY_NAME' ],
47
+            'json'                 => [ 'LOWER_NAME', 'STUDLY_NAME', 'MODULE_NAMESPACE' ],
48
+            'scaffold/config'      => [ 'STUDLY_NAME' ],
49 49
             'composer'             => [
50 50
                 'LOWER_NAME',
51 51
                 'STUDLY_NAME',
@@ -114,33 +114,33 @@  discard block
 block discarded – undo
114 114
         | Set the generate key to false to not generate that folder
115 115
         */
116 116
         'generator' => [
117
-            'config'        => ['path' => 'Config', 'generate' => true],
118
-            'command'       => ['path' => 'Console', 'generate' => true],
119
-            'migration'     => ['path' => 'Database/Migrations', 'generate' => true],
120
-            'seeder'        => ['path' => 'Database/Seeders', 'generate' => true],
121
-            'factory'       => ['path' => 'Database/factories', 'generate' => true],
122
-            'model'         => ['path' => 'Entities', 'generate' => true],
123
-            'controller'    => ['path' => 'Http/Controllers', 'generate' => true],
124
-            'filter'        => ['path' => 'Http/Middleware', 'generate' => true],
125
-            'request'       => ['path' => 'Http/Requests', 'generate' => true],
126
-            'provider'      => ['path' => 'Providers', 'generate' => false],
127
-            'assets'        => ['path' => 'Resources/assets', 'generate' => false],
128
-            'lang'          => ['path' => 'Resources/lang', 'generate' => true],
129
-            'views'         => ['path' => 'Resources/views', 'generate' => true],
130
-            'test'          => ['path' => 'Tests', 'generate' => true],
131
-            'repository'    => ['path' => 'Repositories', 'generate' => true],
132
-            'event'         => ['path' => 'Events', 'generate' => false],
133
-            'listener'      => ['path' => 'Listeners', 'generate' => false],
134
-            'policies'      => ['path' => 'Policies', 'generate' => false],
135
-            'rules'         => ['path' => 'Rules', 'generate' => false],
136
-            'jobs'          => ['path' => 'Jobs', 'generate' => false],
137
-            'emails'        => ['path' => 'Emails', 'generate' => false],
138
-            'notifications' => ['path' => 'Notifications', 'generate' => false],
139
-            'resource'      => ['path' => 'Transformers', 'generate' => true],
140
-            'services'      => ['path' => 'Services', 'generate' => true],
141
-            'presenters'    => ['path' => 'Presenters', 'generate' => true],
142
-            'api'           => ['path' => 'Http/Controllers/Api/V1', 'generate' => true],
143
-            'enums'         => ['path' => 'Enums', 'generate' => true],
117
+            'config'        => [ 'path' => 'Config', 'generate' => true ],
118
+            'command'       => [ 'path' => 'Console', 'generate' => true ],
119
+            'migration'     => [ 'path' => 'Database/Migrations', 'generate' => true ],
120
+            'seeder'        => [ 'path' => 'Database/Seeders', 'generate' => true ],
121
+            'factory'       => [ 'path' => 'Database/factories', 'generate' => true ],
122
+            'model'         => [ 'path' => 'Entities', 'generate' => true ],
123
+            'controller'    => [ 'path' => 'Http/Controllers', 'generate' => true ],
124
+            'filter'        => [ 'path' => 'Http/Middleware', 'generate' => true ],
125
+            'request'       => [ 'path' => 'Http/Requests', 'generate' => true ],
126
+            'provider'      => [ 'path' => 'Providers', 'generate' => false ],
127
+            'assets'        => [ 'path' => 'Resources/assets', 'generate' => false ],
128
+            'lang'          => [ 'path' => 'Resources/lang', 'generate' => true ],
129
+            'views'         => [ 'path' => 'Resources/views', 'generate' => true ],
130
+            'test'          => [ 'path' => 'Tests', 'generate' => true ],
131
+            'repository'    => [ 'path' => 'Repositories', 'generate' => true ],
132
+            'event'         => [ 'path' => 'Events', 'generate' => false ],
133
+            'listener'      => [ 'path' => 'Listeners', 'generate' => false ],
134
+            'policies'      => [ 'path' => 'Policies', 'generate' => false ],
135
+            'rules'         => [ 'path' => 'Rules', 'generate' => false ],
136
+            'jobs'          => [ 'path' => 'Jobs', 'generate' => false ],
137
+            'emails'        => [ 'path' => 'Emails', 'generate' => false ],
138
+            'notifications' => [ 'path' => 'Notifications', 'generate' => false ],
139
+            'resource'      => [ 'path' => 'Transformers', 'generate' => true ],
140
+            'services'      => [ 'path' => 'Services', 'generate' => true ],
141
+            'presenters'    => [ 'path' => 'Presenters', 'generate' => true ],
142
+            'api'           => [ 'path' => 'Http/Controllers/Api/V1', 'generate' => true ],
143
+            'enums'         => [ 'path' => 'Enums', 'generate' => true ],
144 144
         ],
145 145
     ],
146 146
     /*
Please login to merge, or discard this patch.