@@ -192,7 +192,7 @@ |
||
| 192 | 192 | 'hasPosition', |
| 193 | 193 | 'hasRevisions', |
| 194 | 194 | 'hasNesting', |
| 195 | - ])->filter(function ($enabled) { |
|
| 195 | + ])->filter(function($enabled) { |
|
| 196 | 196 | return $enabled; |
| 197 | 197 | }); |
| 198 | 198 | |
@@ -295,8 +295,7 @@ discard block |
||
| 295 | 295 | if ($this->isCapsule) { |
| 296 | 296 | if ($this->isSingleton) { |
| 297 | 297 | $this->createCapsuleSingletonSeeder(); |
| 298 | - } |
|
| 299 | - else { |
|
| 298 | + } else { |
|
| 300 | 299 | $this->createCapsuleSeed(); |
| 301 | 300 | } |
| 302 | 301 | $this->createCapsuleRoutes(); |
@@ -935,8 +934,7 @@ discard block |
||
| 935 | 934 | { |
| 936 | 935 | if ($this->customDirs) { |
| 937 | 936 | $this->makeDir($path); |
| 938 | - } |
|
| 939 | - else { |
|
| 937 | + } else { |
|
| 940 | 938 | make_twill_directory($path); |
| 941 | 939 | } |
| 942 | 940 | } |
@@ -951,8 +949,7 @@ discard block |
||
| 951 | 949 | ); |
| 952 | 950 | |
| 953 | 951 | file_put_contents($path, $stub); |
| 954 | - } |
|
| 955 | - else { |
|
| 952 | + } else { |
|
| 956 | 953 | twill_put_stub($path, $stub); |
| 957 | 954 | } |
| 958 | 955 | } |
@@ -1691,8 +1691,7 @@ |
||
| 1691 | 1691 | |
| 1692 | 1692 | try { |
| 1693 | 1693 | return TwillCapsules::getCapsuleForModel($this->modelName)->getViewPrefix(); |
| 1694 | - } |
|
| 1695 | - catch (NoCapsuleFoundException $e) { |
|
| 1694 | + } catch (NoCapsuleFoundException $e) { |
|
| 1696 | 1695 | return null; |
| 1697 | 1696 | } |
| 1698 | 1697 | } |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | $routesFile |
| 16 | 16 | ): void { |
| 17 | 17 | if (file_exists($routesFile)) { |
| 18 | - $hostRoutes = function ($router) use ( |
|
| 18 | + $hostRoutes = function($router) use ( |
|
| 19 | 19 | $middlewares, |
| 20 | 20 | $namespace, |
| 21 | 21 | $routesFile |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | 'namespace' => $namespace, |
| 26 | 26 | 'middleware' => $middlewares, |
| 27 | 27 | ], |
| 28 | - function ($router) use ($routesFile) { |
|
| 28 | + function($router) use ($routesFile) { |
|
| 29 | 29 | require $routesFile; |
| 30 | 30 | } |
| 31 | 31 | ); |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function getCapsuleForModule(string $module): Capsule |
| 48 | 48 | { |
| 49 | - $capsule = $this->getRegisteredCapsules()->first(function (Capsule $capsule) use ($module) { |
|
| 49 | + $capsule = $this->getRegisteredCapsules()->first(function(Capsule $capsule) use ($module) { |
|
| 50 | 50 | return $capsule->getModule() === $module; |
| 51 | 51 | }); |
| 52 | 52 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | public function getCapsuleForModel(string $model): Capsule |
| 64 | 64 | { |
| 65 | - $capsule = $this->getRegisteredCapsules()->first(function (Capsule $capsule) use ($model) { |
|
| 65 | + $capsule = $this->getRegisteredCapsules()->first(function(Capsule $capsule) use ($model) { |
|
| 66 | 66 | return $capsule->getSingular() === $model; |
| 67 | 67 | }); |
| 68 | 68 | |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | $list |
| 93 | 93 | ->where('enabled', true) |
| 94 | - ->map(function ($capsule) use ($path) { |
|
| 94 | + ->map(function($capsule) use ($path) { |
|
| 95 | 95 | $this->registerCapsule( |
| 96 | 96 | new Capsule( |
| 97 | 97 | $capsule['name'], |
@@ -217,8 +217,7 @@ |
||
| 217 | 217 | $this->error('A capsule with this name already exists!'); |
| 218 | 218 | |
| 219 | 219 | return false; |
| 220 | - } |
|
| 221 | - catch (NoCapsuleFoundException $e) {} |
|
| 220 | + } catch (NoCapsuleFoundException $e) {} |
|
| 222 | 221 | |
| 223 | 222 | if ($this->directoryExists()) { |
| 224 | 223 | $this->error( |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | return; |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | - collect($files)->each(function ($file) { |
|
| 104 | + collect($files)->each(function($file) { |
|
| 105 | 105 | if (file_exists($file)) { |
| 106 | 106 | require_once $file; |
| 107 | 107 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | public function loadMigrations(): void |
| 117 | 117 | { |
| 118 | - $callback = function (Migrator $migrator) { |
|
| 118 | + $callback = function(Migrator $migrator) { |
|
| 119 | 119 | $migrator->path($this->getMigrationsPath()); |
| 120 | 120 | }; |
| 121 | 121 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | public function loadTranslations(): void { |
| 134 | - $callback = function (Translator $translator) { |
|
| 134 | + $callback = function(Translator $translator) { |
|
| 135 | 135 | $translator->addNamespace($this->getLanguagesPath(), 'twill:capsules:' . $this->getModule()); |
| 136 | 136 | }; |
| 137 | 137 | |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | $start = "{$delimiters[0]}{$key}{$delimiters[1]}"; |
| 38 | 38 | $end = "{$delimiters[0]}\/{$key}{$delimiters[1]}"; |
| 39 | 39 | |
| 40 | - if ((bool)$value) { |
|
| 40 | + if ((bool) $value) { |
|
| 41 | 41 | // replace delimiters only |
| 42 | 42 | $stub = preg_replace("/$start/", '', $stub); |
| 43 | 43 | $stub = preg_replace("/$end/", '', $stub); |