@@ -60,7 +60,7 @@ public function runUp(string $filename, int $batch, OptionsData $options): void
60
60
return ;
61
61
}
62
62
63
- if ($ this ->hasAsync ($ operation , $ options )) {
63
+ if ($ this ->needAsync ($ operation , $ options )) {
64
64
OperationJob::dispatch ($ name );
65
65
66
66
$ this ->notification ->twoColumn ($ name , StatusEnum::Pending->toColor ());
@@ -69,7 +69,7 @@ public function runUp(string $filename, int $batch, OptionsData $options): void
69
69
}
70
70
71
71
$ this ->notification ->task ($ name , function () use ($ operation , $ name , $ batch ) {
72
- $ this ->hasOperation ($ operation , '__invoke ' )
72
+ $ this ->hasMethod ($ operation , '__invoke ' )
73
73
? $ this ->runOperation ($ operation , '__invoke ' )
74
74
: $ this ->runOperation ($ operation , 'up ' );
75
75
@@ -93,7 +93,7 @@ public function runDown(string $filename, OptionsData $options): void
93
93
94
94
protected function runOperation (Operation $ operation , string $ method ): void
95
95
{
96
- if ($ this ->hasOperation ($ operation , $ method )) {
96
+ if ($ this ->hasMethod ($ operation , $ method )) {
97
97
try {
98
98
$ this ->runMethod ($ operation , $ method , $ operation ->withinTransactions ());
99
99
@@ -107,14 +107,14 @@ protected function runOperation(Operation $operation, string $method): void
107
107
}
108
108
}
109
109
110
- protected function hasOperation (Operation $ operation , string $ method ): bool
110
+ protected function hasMethod (Operation $ operation , string $ method ): bool
111
111
{
112
112
return method_exists ($ operation , $ method );
113
113
}
114
114
115
- protected function hasAsync (Operation $ operation , OptionsData $ options ): bool
115
+ protected function needAsync (Operation $ operation , OptionsData $ options ): bool
116
116
{
117
- return ! $ options ->sync && $ operation ->shouldBeAsync ();
117
+ return ! $ options ->sync && $ operation ->needAsync ();
118
118
}
119
119
120
120
protected function runMethod (Operation $ operation , string $ method , bool $ transactions ): void
0 commit comments