@@ -3,16 +3,16 @@ discard block |
||
3 | 3 | use Illuminate\Foundation\Vite; |
4 | 4 | use Illuminate\Support\Facades\Vite as ViteFacade; |
5 | 5 | |
6 | -if (! function_exists('module_path')) { |
|
6 | +if (!function_exists('module_path')) { |
|
7 | 7 | function module_path($name, $path = '') |
8 | 8 | { |
9 | 9 | $module = app('modules')->find($name); |
10 | 10 | |
11 | - return $module->getPath() . ($path ? DIRECTORY_SEPARATOR . $path : $path); |
|
11 | + return $module->getPath().($path ? DIRECTORY_SEPARATOR . $path : $path); |
|
12 | 12 | } |
13 | 13 | } |
14 | 14 | |
15 | -if (! function_exists('config_path')) { |
|
15 | +if (!function_exists('config_path')) { |
|
16 | 16 | /** |
17 | 17 | * Get the configuration path. |
18 | 18 | * |
@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | */ |
22 | 22 | function config_path($path = '') |
23 | 23 | { |
24 | - return app()->basePath() . '/config' . ($path ? DIRECTORY_SEPARATOR . $path : $path); |
|
24 | + return app()->basePath().'/config'.($path ? DIRECTORY_SEPARATOR . $path : $path); |
|
25 | 25 | } |
26 | 26 | } |
27 | 27 | |
28 | -if (! function_exists('public_path')) { |
|
28 | +if (!function_exists('public_path')) { |
|
29 | 29 | /** |
30 | 30 | * Get the path to the public folder. |
31 | 31 | * |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | */ |
35 | 35 | function public_path($path = '') |
36 | 36 | { |
37 | - return app()->make('path.public') . ($path ? DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR) : $path); |
|
37 | + return app()->make('path.public').($path ? DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR) : $path); |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
41 | -if (! function_exists('module_vite')) { |
|
41 | +if (!function_exists('module_vite')) { |
|
42 | 42 | /** |
43 | 43 | * support for vite |
44 | 44 | */ |
@@ -120,11 +120,11 @@ discard block |
||
120 | 120 | */ |
121 | 121 | public function decodeContents() |
122 | 122 | { |
123 | - $attributes = json_decode($this->getContents(), 1); |
|
123 | + $attributes = json_decode($this->getContents(), 1); |
|
124 | 124 | |
125 | 125 | // any JSON parsing errors should throw an exception |
126 | 126 | if (json_last_error() > 0) { |
127 | - throw new InvalidJsonException('Error processing file: ' . $this->getPath() . '. Error: ' . json_last_error_msg()); |
|
127 | + throw new InvalidJsonException('Error processing file: '.$this->getPath().'. Error: '.json_last_error_msg()); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | return $attributes; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | return $this->decodeContents(); |
143 | 143 | } |
144 | 144 | |
145 | - return app('cache')->store(config('modules.cache.driver'))->remember($this->getPath(), config('modules.cache.lifetime'), function () { |
|
145 | + return app('cache')->store(config('modules.cache.driver'))->remember($this->getPath(), config('modules.cache.lifetime'), function() { |
|
146 | 146 | return $this->decodeContents(); |
147 | 147 | }); |
148 | 148 | } |
@@ -103,7 +103,7 @@ |
||
103 | 103 | 'generator' => [ |
104 | 104 | 'config' => ['path' => 'Config', 'generate' => true], |
105 | 105 | 'command' => ['path' => 'Console', 'generate' => true], |
106 | - 'channels' => ['path' => 'Broadcasting','generate' => true], |
|
106 | + 'channels' => ['path' => 'Broadcasting', 'generate' => true], |
|
107 | 107 | 'migration' => ['path' => 'Database/Migrations', 'generate' => true], |
108 | 108 | 'seeder' => ['path' => 'Database/Seeders', 'generate' => true], |
109 | 109 | 'factory' => ['path' => 'Database/factories', 'generate' => true], |
@@ -61,7 +61,7 @@ |
||
61 | 61 | |
62 | 62 | $channelPath = GenerateConfigReader::read('channels'); |
63 | 63 | |
64 | - return $path . $channelPath->getPath() . '/' . $this->getFileName() . '.php'; |
|
64 | + return $path.$channelPath->getPath().'/'.$this->getFileName().'.php'; |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | { |
55 | 55 | $module = $this->laravel['modules']->findOrFail($this->getModuleName()); |
56 | 56 | return (new Stub('/observer.stub', [ |
57 | - 'NAMESPACE' => $this->getClassNamespace($module) . '\Observers', |
|
57 | + 'NAMESPACE' => $this->getClassNamespace($module).'\Observers', |
|
58 | 58 | 'NAME' => $this->getModelName(), |
59 | 59 | 'MODEL_NAMESPACE' => $this->getModelNamespace(), |
60 | 60 | 'NAME_VARIABLE' => $this->getModelVariable(), |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | $path = str_replace('/', '\\', $path); |
74 | 74 | |
75 | - return $this->laravel['modules']->config('namespace') . '\\' . $this->laravel['modules']->findOrFail($this->getModuleName()) . '\\' . $path; |
|
75 | + return $this->laravel['modules']->config('namespace').'\\'.$this->laravel['modules']->findOrFail($this->getModuleName()).'\\'.$path; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | $observerPath = GenerateConfigReader::read('observer'); |
102 | 102 | |
103 | - return $path . $observerPath->getPath() . '/' . $this->getFileName(); |
|
103 | + return $path.$observerPath->getPath().'/'.$this->getFileName(); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | /** |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | */ |
109 | 109 | private function getFileName() |
110 | 110 | { |
111 | - return Str::studly($this->argument('name')) . 'Observer.php'; |
|
111 | + return Str::studly($this->argument('name')).'Observer.php'; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 |