33namespace DragonCode \LaravelActions \Support ;
44
55use DragonCode \Contracts \LaravelActions \Actionable as ActionableContract ;
6- use DragonCode \LaravelActions \Concerns \Infoable ;
76use DragonCode \LaravelActions \Concerns \Anonymous ;
7+ use DragonCode \LaravelActions \Concerns \Infoable ;
88use Illuminate \Database \Migrations \Migrator as BaseMigrator ;
99use Illuminate \Support \Facades \DB ;
1010use Throwable ;
@@ -28,11 +28,11 @@ public function usingConnection($name, callable $callback)
2828 /**
2929 * Run "up" a migration instance.
3030 *
31- * @param string $file
32- * @param int $batch
33- * @param bool $pretend
31+ * @param string $file
32+ * @param int $batch
33+ * @param bool $pretend
3434 *
35- * @throws \ Throwable
35+ * @throws Throwable
3636 */
3737 protected function runUp ($ file , $ batch , $ pretend )
3838 {
@@ -82,11 +82,11 @@ protected function runUp($file, $batch, $pretend)
8282 /**
8383 * Run "down" a migration instance.
8484 *
85- * @param string $file
86- * @param object $migration
87- * @param bool $pretend
85+ * @param string $file
86+ * @param object $migration
87+ * @param bool $pretend
8888 *
89- * @throws \ Throwable
89+ * @throws Throwable
9090 */
9191 protected function runDown ($ file , $ migration , $ pretend )
9292 {
@@ -112,10 +112,10 @@ protected function runDown($file, $migration, $pretend)
112112 /**
113113 * Starts the execution of code, starting database transactions, if necessary.
114114 *
115- * @param object $migration
116- * @param string $method
115+ * @param object $migration
116+ * @param string $method
117117 *
118- * @throws \ Throwable
118+ * @throws Throwable
119119 */
120120 protected function runMigration ($ migration , $ method )
121121 {
@@ -135,7 +135,7 @@ protected function runMigration($migration, $method)
135135 /**
136136 * Whether it is necessary to record information about the execution in the database.
137137 *
138- * @param \DragonCode\Contracts\LaravelActions\Actionable|object $migration
138+ * @param \DragonCode\Contracts\LaravelActions\Actionable|object $migration
139139 *
140140 * @return bool
141141 */
@@ -147,7 +147,7 @@ protected function allowLogging(ActionableContract $migration): bool
147147 /**
148148 * Whether the action needs to be executed in the current environment.
149149 *
150- * @param \DragonCode\Contracts\LaravelActions\Actionable|object $migration
150+ * @param \DragonCode\Contracts\LaravelActions\Actionable|object $migration
151151 *
152152 * @return bool
153153 */
@@ -167,17 +167,13 @@ protected function allowEnvironment(ActionableContract $migration): bool
167167 return false ;
168168 }
169169
170- if (! empty ($ except ) && in_array ($ environment , $ except )) {
171- return false ;
172- }
173-
174- return true ;
170+ return ! (! empty ($ except ) && in_array ($ environment , $ except ));
175171 }
176172
177173 /**
178174 * Whether it is necessary to call database transactions at runtime.
179175 *
180- * @param \DragonCode\LaravelActions\Support\Actionable|object $migration
176+ * @param \DragonCode\LaravelActions\Support\Actionable|object $migration
181177 *
182178 * @return bool
183179 */
@@ -189,7 +185,7 @@ protected function enabledTransactions(ActionableContract $migration): bool
189185 /**
190186 * The number of attempts to execute a request within a transaction before throwing an error.
191187 *
192- * @param \DragonCode\LaravelActions\Support\Actionable|object $migration
188+ * @param \DragonCode\LaravelActions\Support\Actionable|object $migration
193189 *
194190 * @return int
195191 */
@@ -201,10 +197,11 @@ protected function transactionAttempts(ActionableContract $migration): int
201197 }
202198
203199 /**
204- * @param \DragonCode\Contracts\LaravelActions\Actionable|object $migration
205- * @param callable $handle
200+ * @param \DragonCode\Contracts\LaravelActions\Actionable|object $migration
201+ * @param callable $handle
202+ *
203+ * @throws Throwable
206204 *
207- * @throws \Throwable
208205 * @return void
209206 */
210207 protected function runMigrationHandle (ActionableContract $ migration , callable $ handle )
@@ -221,7 +218,7 @@ protected function runMigrationHandle(ActionableContract $migration, callable $h
221218 }
222219
223220 /**
224- * @param \DragonCode\Contracts\LaravelActions\Actionable|object $migration
221+ * @param \DragonCode\Contracts\LaravelActions\Actionable|object $migration
225222 *
226223 * @return void
227224 */
@@ -231,7 +228,7 @@ protected function runSuccess(ActionableContract $migration): void
231228 }
232229
233230 /**
234- * @param \DragonCode\Contracts\LaravelActions\Actionable|object $migration
231+ * @param \DragonCode\Contracts\LaravelActions\Actionable|object $migration
235232 *
236233 * @return void
237234 */
0 commit comments