Completed
Pull Request — master (#790)
by
unknown
03:19
created
src/Activators/FileActivator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -50,9 +50,9 @@  discard block
 block discarded – undo
50 50
 	 */
51 51
 	protected function getCached()
52 52
 	{
53
-		if(!$this->config->get('modules.cache.enabled')) return $this->readJson();
53
+		if (!$this->config->get('modules.cache.enabled')) return $this->readJson();
54 54
 		
55
-		return $this->cache->remember($this->cacheKey, $this->cacheLifetime, function () {
55
+		return $this->cache->remember($this->cacheKey, $this->cacheLifetime, function() {
56 56
             return $this->readJson();
57 57
         });
58 58
 	}
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 	 */
75 75
 	protected function config(string $key, $default = null)
76 76
     {
77
-        return $this->config->get('modules.activators.file.' . $key, $default);
77
+        return $this->config->get('modules.activators.file.'.$key, $default);
78 78
     }
79 79
 
80 80
 	/**
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	 */
85 85
 	protected function readJson()
86 86
 	{
87
-		if(!$this->files->exists($this->fileInstalled)) return [];
87
+		if (!$this->files->exists($this->fileInstalled)) return [];
88 88
 		return json_decode($this->files->get($this->fileInstalled), true);
89 89
 	}
90 90
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
      */
118 118
     public function isStatus(Module $module, $status)
119 119
     {
120
-    	if(!isset($this->installed[$module->getName()])) return false;
120
+    	if (!isset($this->installed[$module->getName()])) return false;
121 121
     	return $this->installed[$module->getName()] == $status;
122 122
     }
123 123
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function setActiveByName(string $name, $status)
136 136
     {
137
-    	$this->installed[$name] = (int)$status;
137
+    	$this->installed[$name] = (int) $status;
138 138
     	$this->writeJson();
139 139
     	$this->forgetCache();
140 140
     }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     public function delete(Module $module)
146 146
     {
147
-    	if(!isset($this->installed[$module->getName()])) return;
147
+    	if (!isset($this->installed[$module->getName()])) return;
148 148
     	unset($this->installed[$module->getName()]);
149 149
     	$this->writeJson();
150 150
     	$this->forgetCache();
Please login to merge, or discard this patch.
src/LaravelModulesServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function setupStubPath()
33 33
     {
34
-        Stub::setBasePath(__DIR__ . '/Commands/stubs');
34
+        Stub::setBasePath(__DIR__.'/Commands/stubs');
35 35
 
36
-        $this->app->booted(function ($app) {
36
+        $this->app->booted(function($app) {
37 37
             /** @var RepositoryInterface $moduleRepository */
38 38
             $moduleRepository = $app[RepositoryInterface::class];
39 39
             if ($moduleRepository->config('stubs.enabled') === true) {
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
      */
48 48
     protected function registerServices()
49 49
     {
50
-        $this->app->singleton(Contracts\RepositoryInterface::class, function ($app) {
50
+        $this->app->singleton(Contracts\RepositoryInterface::class, function($app) {
51 51
             $path = $app['config']->get('modules.paths.modules');
52 52
 
53 53
             return new Laravel\LaravelFileRepository($app, $path);
54 54
         });
55
-        $this->app->singleton(Contracts\ActivatorInterface::class, function ($app) {
55
+        $this->app->singleton(Contracts\ActivatorInterface::class, function($app) {
56 56
             $activator = $app['config']->get('modules.activator');
57
-            $class = $app['config']->get('modules.activators.' . $activator)['class'];
57
+            $class = $app['config']->get('modules.activators.'.$activator)['class'];
58 58
 
59 59
             return new $class($app);
60 60
         });
Please login to merge, or discard this patch.