Completed
Pull Request — master (#1163)
by
unknown
01:50
created
src/Providers/BootstrapServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
             $this->registerMigrations();
19 19
 
20 20
             $this->publishes([
21
-                __DIR__ . '/../../database/migrations' => database_path('migrations'),
21
+                __DIR__.'/../../database/migrations' => database_path('migrations'),
22 22
             ], 'module-migrations');
23 23
         }
24 24
     }
@@ -33,6 +33,6 @@  discard block
 block discarded – undo
33 33
 
34 34
     private function registerMigrations()
35 35
     {
36
-        $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');
36
+        $this->loadMigrationsFrom(__DIR__.'/../../database/migrations');
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
database/migrations/2020_12_29_025357_create_modules_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('modules', function (Blueprint $table) {
16
+        Schema::create('modules', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->string('name');
19 19
             $table->string('path');
Please login to merge, or discard this patch.
src/Laravel/LaravelDatabaseRepository.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     /**
55 55
      * Determine whether the given module exist.
56 56
      *
57
-     * @param $name
57
+     * @param string $name
58 58
      *
59 59
      * @return bool
60 60
      */
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     /**
96 96
      * Get module path for a specific module.
97 97
      *
98
-     * @param $name
98
+     * @param string $name
99 99
      *
100 100
      * @return string
101 101
      */
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -108,10 +108,10 @@  discard block
 block discarded – undo
108 108
     {
109 109
         $module = $this->find($name);
110 110
         if ($module) {
111
-            return $module->getPath() . '/';
111
+            return $module->getPath().'/';
112 112
         }
113 113
 
114
-        return $this->getPath() . '/' . Str::studly($name) . '/';
114
+        return $this->getPath().'/'.Str::studly($name).'/';
115 115
     }
116 116
 
117 117
     /**
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
      */
162 162
     public function getCached()
163 163
     {
164
-        return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function () {
164
+        return $this->app['cache']->remember($this->config('cache.key'), $this->config('cache.lifetime'), function() {
165 165
             return $this->getModel()->all();
166 166
         });
167 167
     }
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
             /** @var DatabaseModule $module */
273 273
             $module = $this->findOrFail($name);
274 274
 
275
-            $json = Json::make($module->getPath() . '/' . 'module.json');
275
+            $json = Json::make($module->getPath().'/'.'module.json');
276 276
             $data = $json->getAttributes();
277 277
 
278 278
             if (!isset($data['version'])) {
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
             $allows = $this->getModel()->getFillable();
304 304
         }
305 305
 
306
-        return array_filter($attributes, function ($k) use ($allows) {
306
+        return array_filter($attributes, function($k) use ($allows) {
307 307
             return in_array($k, $allows);
308 308
         }, ARRAY_FILTER_USE_KEY);
309 309
     }
Please login to merge, or discard this patch.
src/Generators/DatabaseModuleGenerator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     public function generateFiles()
81 81
     {
82 82
         foreach ($this->getFiles() as $stub => $file) {
83
-            $path = $this->module->getModulePath($this->getName()) . $file;
83
+            $path = $this->module->getModulePath($this->getName()).$file;
84 84
 
85 85
             if (!$this->filesystem->isDirectory($dir = dirname($path))) {
86 86
                 $this->filesystem->makeDirectory($dir, 0775, true);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
         if (GenerateConfigReader::read('provider')->generate() === true) {
113 113
             Artisan::call('module:make-provider', [
114
-                'name'     => $moduleName . 'ServiceProvider',
114
+                'name'     => $moduleName.'ServiceProvider',
115 115
                 'module'   => $moduleName,
116 116
                 '--master' => true,
117 117
             ]);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
         if (GenerateConfigReader::read('controller')->generate() === true) {
124 124
             $options = $this->type == 'api' ? ['--api' => true] : [];
125 125
             Artisan::call('module:make-controller', [
126
-                    'controller' => $moduleName . 'Controller',
126
+                    'controller' => $moduleName.'Controller',
127 127
                     'module'     => $moduleName,
128 128
                 ] + $options);
129 129
         }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     private function generateModuleJsonFile()
136 136
     {
137
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
137
+        $path = $this->module->getModulePath($this->getName()).'module.json';
138 138
 
139 139
         if (!$this->filesystem->isDirectory($dir = dirname($path))) {
140 140
             $this->filesystem->makeDirectory($dir, 0775, true);
Please login to merge, or discard this patch.
src/Laravel/DatabaseModule.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      * Get a specific data from json file by given the key.
91 91
      *
92 92
      * @param string $key
93
-     * @param null   $default
93
+     * @param string   $default
94 94
      *
95 95
      * @return mixed
96 96
      */
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     }
189 189
 
190 190
     /**
191
-     * @return mixed|null
191
+     * @return string
192 192
      */
193 193
     public function getVersion()
194 194
     {
Please login to merge, or discard this patch.