Completed
Pull Request — master (#2)
by Randall
04:53
created
src/Commands/Generators/ModuleMakeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
                 ->setConsole($this)
32 32
                 ->setForce($this->option('force'))
33 33
                 ->setPlain($this->option('plain'))
34
-                ->setActive(! $this->option('disabled'))
34
+                ->setActive(!$this->option('disabled'))
35 35
                 ->generate();
36 36
         }
37 37
     }
Please login to merge, or discard this patch.
src/LaravelModulesServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     {
29 29
         Stub::setBasePath(__DIR__ . '/Commands/stubs');
30 30
 
31
-        $this->app->booted(static function ($app) {
31
+        $this->app->booted(static function($app) {
32 32
             /** @var \Rawilk\LaravelModules\Contracts\Repository $moduleRepository */
33 33
             $moduleRepository = $app[Repository::class];
34 34
 
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
 
41 41
     protected function registerServices(): void
42 42
     {
43
-        $this->app->singleton(Repository::class, static function ($app) {
43
+        $this->app->singleton(Repository::class, static function($app) {
44 44
             $path = $app['config']->get('modules.paths.modules');
45 45
 
46 46
             return new LaravelFileRepository($app, $path);
47 47
         });
48 48
 
49
-        $this->app->singleton(Activator::class, static function ($app) {
49
+        $this->app->singleton(Activator::class, static function($app) {
50 50
             $activator = $app['config']->get('modules.activator');
51 51
             $class = $app['config']->get('modules.activators.' . $activator)['class'];
52 52
 
Please login to merge, or discard this patch.
src/helpers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (! function_exists('config_path')) {
3
+if (!function_exists('config_path')) {
4 4
     function config_path(string $path = ''): string
5 5
     {
6 6
         return app()->basePath() . '/config' . ($path ? "/{$path}" : $path);
7 7
     }
8 8
 }
9 9
 
10
-if (! function_exists('module_path')) {
10
+if (!function_exists('module_path')) {
11 11
     function module_path(string $name): string
12 12
     {
13 13
         /** @var \Rawilk\LaravelModules\Module $module */
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     }
18 18
 }
19 19
 
20
-if (! function_exists('public_path')) {
20
+if (!function_exists('public_path')) {
21 21
     function public_path(string $path = ''): string
22 22
     {
23 23
         return app()->make('path.public') . ($path ? DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR) : $path);
Please login to merge, or discard this patch.
src/Publishing/Publisher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,17 +70,17 @@
 block discarded – undo
70 70
 
71 71
     public function publish(): void
72 72
     {
73
-        if (! $this->console instanceof Command) {
73
+        if (!$this->console instanceof Command) {
74 74
             $message = "The 'console' property must be an instance of " . Command::class . '.';
75 75
 
76 76
             throw new RuntimeException($message);
77 77
         }
78 78
 
79
-        if (! $this->getFilesystem()->isDirectory($sourcePath = $this->getSourcePath())) {
79
+        if (!$this->getFilesystem()->isDirectory($sourcePath = $this->getSourcePath())) {
80 80
             return;
81 81
         }
82 82
 
83
-        if (! $this->getFilesystem()->isDirectory($destinationPath = $this->getDestinationPath())) {
83
+        if (!$this->getFilesystem()->isDirectory($destinationPath = $this->getDestinationPath())) {
84 84
             $this->getFilesystem()->makeDirectory($destinationPath, 0775, true);
85 85
         }
86 86
 
Please login to merge, or discard this patch.
src/Activators/DatabaseActivator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
         return $this->cache->remember(
57 57
             $this->moduleCacheKey($module->getName()),
58 58
             $this->cacheLifetime,
59
-            function () use ($module, $status) {
59
+            function() use ($module, $status) {
60 60
                 $databaseModule = $this->model::findModule($module->getName());
61 61
 
62
-                if (! $databaseModule) {
62
+                if (!$databaseModule) {
63 63
                     return $status === false;
64 64
                 }
65 65
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     public function reset(): void
72 72
     {
73 73
         $this->model::allModules()
74
-            ->each(function (ModuleModel $module) {
74
+            ->each(function(ModuleModel $module) {
75 75
                 $this->flushCache($module->getName());
76 76
             });
77 77
     }
Please login to merge, or discard this patch.
src/Activators/FileActivator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function delete(Module $module): void
47 47
     {
48
-        if (! isset($this->moduleStatuses[$module->getName()])) {
48
+        if (!isset($this->moduleStatuses[$module->getName()])) {
49 49
             return;
50 50
         }
51 51
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
     public function hasStatus(Module $module, bool $status): bool
75 75
     {
76
-        if (! isset($this->moduleStatuses[$module->getName()])) {
76
+        if (!isset($this->moduleStatuses[$module->getName()])) {
77 77
             return $status === false;
78 78
         }
79 79
 
@@ -117,18 +117,18 @@  discard block
 block discarded – undo
117 117
 
118 118
     private function getModulesStatuses(): array
119 119
     {
120
-        if (! $this->config->get('modules.cache.enabled')) {
120
+        if (!$this->config->get('modules.cache.enabled')) {
121 121
             return $this->readJson();
122 122
         }
123 123
 
124
-        return $this->cache->remember($this->cacheKey, $this->cacheLifetime, function () {
124
+        return $this->cache->remember($this->cacheKey, $this->cacheLifetime, function() {
125 125
             return $this->readJson();
126 126
         });
127 127
     }
128 128
 
129 129
     private function readJson(): array
130 130
     {
131
-        if (! $this->files->exists($this->statusesFile)) {
131
+        if (!$this->files->exists($this->statusesFile)) {
132 132
             return [];
133 133
         }
134 134
 
Please login to merge, or discard this patch.
src/Process/Updater.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             $concatenatedPackages .= "\"{$name}:{$version}\" ";
48 48
         }
49 49
 
50
-        if (! empty($concatenatedPackages)) {
50
+        if (!empty($concatenatedPackages)) {
51 51
             $this->run("composer require --dev {$concatenatedPackages}");
52 52
         }
53 53
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             $concatenatedPackages .= "\"{$name}:{$version}\" ";
64 64
         }
65 65
 
66
-        if (! empty($concatenatedPackages)) {
66
+        if (!empty($concatenatedPackages)) {
67 67
             $this->run("composer require {$concatenatedPackages}");
68 68
         }
69 69
 
Please login to merge, or discard this patch.
src/ModuleServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 
21 21
     protected function publishMigrations(): void
22 22
     {
23
-        if (! class_exists('CreateModulesTable')) {
23
+        if (!class_exists('CreateModulesTable')) {
24 24
             $this->publishes([
25 25
                 __DIR__ . '/../database/migrations/create_modules_table.php.stub' => database_path('migrations/' . date('Y_m_d_His') . '_create_modules_table.php')
26 26
             ], 'migrations');
Please login to merge, or discard this patch.
src/Collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
     public function toArray(): array
16 16
     {
17
-        return array_map(static function ($value) {
17
+        return array_map(static function($value) {
18 18
             if ($value instanceof Module) {
19 19
                 $attributes = $value->json()->getAttributes();
20 20
                 $attributes['path'] = $value->getPath();
Please login to merge, or discard this patch.