Completed
Push — master ( 8ba98d...95d31d )
by Nicolas
10:43 queued 08:56
created
src/Commands/ModelCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 
53 53
         $string = '';
54 54
         foreach ($pieces as $i => $piece) {
55
-            if ($i+1 < count($pieces)) {
56
-                $string .= strtolower($piece) . '_';
55
+            if ($i + 1 < count($pieces)) {
56
+                $string .= strtolower($piece).'_';
57 57
             } else {
58 58
                 $string .= Str::plural(strtolower($piece));
59 59
             }
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     private function handleOptionalMigrationOption()
95 95
     {
96 96
         if ($this->option('migration') === true) {
97
-            $migrationName = 'create_' . $this->createMigrationName() . '_table';
97
+            $migrationName = 'create_'.$this->createMigrationName().'_table';
98 98
             $this->call('module:make-migration', ['name' => $migrationName, 'module' => $this->argument('module')]);
99 99
         }
100 100
     }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
         $seederPath = $this->laravel['modules']->config('paths.generator.model');
129 129
 
130
-        return $path . $seederPath . '/' . $this->getModelName() . '.php';
130
+        return $path.$seederPath.'/'.$this->getModelName().'.php';
131 131
     }
132 132
 
133 133
     /**
Please login to merge, or discard this patch.
src/ModulesServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     protected function registerNamespaces()
45 45
     {
46
-        $configPath = __DIR__ . '/../config/config.php';
46
+        $configPath = __DIR__.'/../config/config.php';
47 47
 
48 48
         $this->mergeConfigFrom($configPath, 'modules');
49 49
         $this->publishes([
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     protected function registerServices()
58 58
     {
59
-        $this->app->singleton('modules', function ($app) {
59
+        $this->app->singleton('modules', function($app) {
60 60
             $path = $app['config']->get('modules.paths.modules');
61 61
 
62 62
             return new Repository($app, $path);
Please login to merge, or discard this patch.
src/Generators/ModuleGenerator.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
     public function generateFolders()
277 277
     {
278 278
         foreach ($this->getFolders() as $folder) {
279
-            $path = $this->module->getModulePath($this->getName()) . '/' . $folder;
279
+            $path = $this->module->getModulePath($this->getName()).'/'.$folder;
280 280
 
281 281
             $this->filesystem->makeDirectory($path, 0755, true);
282 282
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
      */
292 292
     public function generateGitKeep($path)
293 293
     {
294
-        $this->filesystem->put($path . '/.gitkeep', '');
294
+        $this->filesystem->put($path.'/.gitkeep', '');
295 295
     }
296 296
 
297 297
     /**
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
     public function generateFiles()
301 301
     {
302 302
         foreach ($this->getFiles() as $stub => $file) {
303
-            $path = $this->module->getModulePath($this->getName()) . $file;
303
+            $path = $this->module->getModulePath($this->getName()).$file;
304 304
 
305 305
             if (!$this->filesystem->isDirectory($dir = dirname($path))) {
306 306
                 $this->filesystem->makeDirectory($dir, 0775, true);
@@ -324,13 +324,13 @@  discard block
 block discarded – undo
324 324
         ]);
325 325
 
326 326
         $this->console->call('module:make-provider', [
327
-            'name' => $this->getName() . 'ServiceProvider',
327
+            'name' => $this->getName().'ServiceProvider',
328 328
             'module' => $this->getName(),
329 329
             '--master' => true,
330 330
         ]);
331 331
 
332 332
         $this->console->call('module:make-controller', [
333
-            'controller' => $this->getName() . 'Controller',
333
+            'controller' => $this->getName().'Controller',
334 334
             'module' => $this->getName(),
335 335
         ]);
336 336
     }
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     protected function getStubContents($stub)
346 346
     {
347 347
         return (new Stub(
348
-            '/' . $stub . '.stub',
348
+            '/'.$stub.'.stub',
349 349
             $this->getReplacement($stub)
350 350
         )
351 351
         )->render();
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
         $replaces = [];
380 380
 
381 381
         foreach ($keys as $key) {
382
-            if (method_exists($this, $method = 'get' . ucfirst(studly_case(strtolower($key))) . 'Replacement')) {
382
+            if (method_exists($this, $method = 'get'.ucfirst(studly_case(strtolower($key))).'Replacement')) {
383 383
                 $replaces[$key] = call_user_func([$this, $method]);
384 384
             } else {
385 385
                 $replaces[$key] = null;
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
      */
395 395
     private function generateModuleJsonFile()
396 396
     {
397
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
397
+        $path = $this->module->getModulePath($this->getName()).'module.json';
398 398
 
399 399
         if (!$this->filesystem->isDirectory($dir = dirname($path))) {
400 400
             $this->filesystem->makeDirectory($dir, 0775, true);
@@ -411,13 +411,13 @@  discard block
 block discarded – undo
411 411
      */
412 412
     private function cleanModuleJsonFile()
413 413
     {
414
-        $path = $this->module->getModulePath($this->getName()) . 'module.json';
414
+        $path = $this->module->getModulePath($this->getName()).'module.json';
415 415
 
416 416
         $content = $this->filesystem->get($path);
417 417
         $namespace = $this->getModuleNamespaceReplacement();
418 418
         $studlyName = $this->getStudlyNameReplacement();
419 419
 
420
-        $provider = '"' . $namespace . '\\\\' . $studlyName . '\\\\Providers\\\\' . $studlyName . 'ServiceProvider"';
420
+        $provider = '"'.$namespace.'\\\\'.$studlyName.'\\\\Providers\\\\'.$studlyName.'ServiceProvider"';
421 421
 
422 422
         $content = str_replace($provider, '', $content);
423 423
 
Please login to merge, or discard this patch.
src/Module.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     {
190 190
         $lowerName = $this->getLowerName();
191 191
 
192
-        $langPath = $this->getPath() . "/Resources/lang";
192
+        $langPath = $this->getPath()."/Resources/lang";
193 193
 
194 194
         if (is_dir($langPath)) {
195 195
             $this->loadTranslationsFrom($langPath, $lowerName);
@@ -209,8 +209,8 @@  discard block
 block discarded – undo
209 209
             $file = 'module.json';
210 210
         }
211 211
 
212
-        return array_get($this->moduleJson, $file, function () use ($file) {
213
-            return $this->moduleJson[$file] = new Json($this->getPath() . '/' . $file, $this->app['files']);
212
+        return array_get($this->moduleJson, $file, function() use ($file) {
213
+            return $this->moduleJson[$file] = new Json($this->getPath().'/'.$file, $this->app['files']);
214 214
         });
215 215
     }
216 216
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
      */
262 262
     protected function fireEvent($event)
263 263
     {
264
-        $this->app['events']->fire(sprintf('modules.%s.' . $event, $this->getLowerName()), [$this]);
264
+        $this->app['events']->fire(sprintf('modules.%s.'.$event, $this->getLowerName()), [$this]);
265 265
     }
266 266
 
267 267
     /**
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
    */
292 292
     public function getCachedServicesPath()
293 293
     {
294
-        return Str::replaceLast('services.php', $this->getSnakeName() . '_module.php', $this->app->getCachedServicesPath());
294
+        return Str::replaceLast('services.php', $this->getSnakeName().'_module.php', $this->app->getCachedServicesPath());
295 295
     }
296 296
 
297 297
     /**
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
     protected function registerFiles()
301 301
     {
302 302
         foreach ($this->get('files', []) as $file) {
303
-            include $this->path . '/' . $file;
303
+            include $this->path.'/'.$file;
304 304
         }
305 305
     }
306 306
 
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
      */
422 422
     public function getExtraPath($path)
423 423
     {
424
-        return $this->getPath() . '/' . $path;
424
+        return $this->getPath().'/'.$path;
425 425
     }
426 426
 
427 427
     /**
Please login to merge, or discard this patch.