@@ -60,7 +60,7 @@ public function runUp(string $filename, int $batch, OptionsData $options): void
6060 return ;
6161 }
6262
63- if ($ this ->hasAsync ($ operation , $ options )) {
63+ if ($ this ->needAsync ($ operation , $ options )) {
6464 OperationJob::dispatch ($ name );
6565
6666 $ this ->notification ->twoColumn ($ name , StatusEnum::Pending->toColor ());
@@ -69,7 +69,7 @@ public function runUp(string $filename, int $batch, OptionsData $options): void
6969 }
7070
7171 $ this ->notification ->task ($ name , function () use ($ operation , $ name , $ batch ) {
72- $ this ->hasOperation ($ operation , '__invoke ' )
72+ $ this ->hasMethod ($ operation , '__invoke ' )
7373 ? $ this ->runOperation ($ operation , '__invoke ' )
7474 : $ this ->runOperation ($ operation , 'up ' );
7575
@@ -93,7 +93,7 @@ public function runDown(string $filename, OptionsData $options): void
9393
9494 protected function runOperation (Operation $ operation , string $ method ): void
9595 {
96- if ($ this ->hasOperation ($ operation , $ method )) {
96+ if ($ this ->hasMethod ($ operation , $ method )) {
9797 try {
9898 $ this ->runMethod ($ operation , $ method , $ operation ->withinTransactions ());
9999
@@ -107,14 +107,14 @@ protected function runOperation(Operation $operation, string $method): void
107107 }
108108 }
109109
110- protected function hasOperation (Operation $ operation , string $ method ): bool
110+ protected function hasMethod (Operation $ operation , string $ method ): bool
111111 {
112112 return method_exists ($ operation , $ method );
113113 }
114114
115- protected function hasAsync (Operation $ operation , OptionsData $ options ): bool
115+ protected function needAsync (Operation $ operation , OptionsData $ options ): bool
116116 {
117- return ! $ options ->sync && $ operation ->shouldBeAsync ();
117+ return ! $ options ->sync && $ operation ->needAsync ();
118118 }
119119
120120 protected function runMethod (Operation $ operation , string $ method , bool $ transactions ): void
0 commit comments