@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | |
41 | 41 | public function buildBootstrapArray() |
42 | 42 | { |
43 | - $bootstrap = []; |
|
43 | + $bootstrap = [ ]; |
|
44 | 44 | foreach (\Module::all() as $module) { |
45 | 45 | foreach ($this->moduleEntityDirectories as $key => $directory) { |
46 | 46 | $directory = ucfirst($directory); |
@@ -57,26 +57,26 @@ discard block |
||
57 | 57 | try { |
58 | 58 | $command = new $class(); |
59 | 59 | if ($command instanceof Command) { |
60 | - $bootstrap[$key][] = $class; |
|
60 | + $bootstrap[ $key ][ ] = $class; |
|
61 | 61 | } |
62 | 62 | } catch (\Exception $e) { |
63 | 63 | break; |
64 | 64 | } |
65 | 65 | break; |
66 | 66 | case 'routes': |
67 | - $bootstrap[$key][] = [$directoryPath.'/'.$fileName, $namespace]; |
|
67 | + $bootstrap[ $key ][ ] = [ $directoryPath.'/'.$fileName, $namespace ]; |
|
68 | 68 | break; |
69 | 69 | case 'configs': |
70 | - $bootstrap[$key][] = [$directoryPath.'/'.$fileName, strtolower($module->getName())]; |
|
70 | + $bootstrap[ $key ][ ] = [ $directoryPath.'/'.$fileName, strtolower($module->getName()) ]; |
|
71 | 71 | break; |
72 | 72 | case 'factories': |
73 | - $bootstrap[$key][] = $directoryPath; |
|
73 | + $bootstrap[ $key ][ ] = $directoryPath; |
|
74 | 74 | break; |
75 | 75 | case 'migrations': |
76 | - $bootstrap[$key][] = $directoryPath; |
|
76 | + $bootstrap[ $key ][ ] = $directoryPath; |
|
77 | 77 | break; |
78 | 78 | case 'seeders': |
79 | - $bootstrap[$key][] = $class; |
|
79 | + $bootstrap[ $key ][ ] = $class; |
|
80 | 80 | break; |
81 | 81 | default: |
82 | 82 | break; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | private function hasPhpExtension(string $fileName): bool |
94 | 94 | { |
95 | - return strlen($fileName) > 4 && '.php' === ($fileName[-4].$fileName[-3].$fileName[-2].$fileName[-1]); |
|
95 | + return strlen($fileName) > 4 && '.php' === ($fileName[-4 ].$fileName[-3 ].$fileName[-2 ].$fileName[-1 ]); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | private function loadBootstrapFromCache() |
@@ -110,32 +110,32 @@ discard block |
||
110 | 110 | |
111 | 111 | public function getCommands(): array |
112 | 112 | { |
113 | - return $this->loadBootstrapFromCache()['commands'] ?? []; |
|
113 | + return $this->loadBootstrapFromCache()[ 'commands' ] ?? [ ]; |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | public function getRoutes(): array |
117 | 117 | { |
118 | - return $this->loadBootstrapFromCache()['routes'] ?? []; |
|
118 | + return $this->loadBootstrapFromCache()[ 'routes' ] ?? [ ]; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | public function getConfigs(): array |
122 | 122 | { |
123 | - return $this->loadBootstrapFromCache()['configs'] ?? []; |
|
123 | + return $this->loadBootstrapFromCache()[ 'configs' ] ?? [ ]; |
|
124 | 124 | } |
125 | 125 | |
126 | 126 | public function getFactories(): array |
127 | 127 | { |
128 | - return $this->loadBootstrapFromCache()['factories'] ?? []; |
|
128 | + return $this->loadBootstrapFromCache()[ 'factories' ] ?? [ ]; |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | public function getMigrations(): array |
132 | 132 | { |
133 | - return $this->loadBootstrapFromCache()['migrations'] ?? []; |
|
133 | + return $this->loadBootstrapFromCache()[ 'migrations' ] ?? [ ]; |
|
134 | 134 | } |
135 | 135 | |
136 | 136 | public function getSeeders(): array |
137 | 137 | { |
138 | - return $this->loadBootstrapFromCache()['seeders'] ?? []; |
|
138 | + return $this->loadBootstrapFromCache()[ 'seeders' ] ?? [ ]; |
|
139 | 139 | } |
140 | 140 | |
141 | 141 | public function getCachePath(): string |