@@ -119,7 +119,7 @@ protected function interact(InputInterface $input, OutputInterface $output)
119
119
{
120
120
$ io = new SymfonyStyle ($ input , $ output instanceof ConsoleOutputInterface ? $ output ->getErrorOutput () : $ output );
121
121
122
- if ($ this ->receiverNames && 0 === \count ( $ input ->getArgument ('receivers ' ) )) {
122
+ if ($ this ->receiverNames && ! $ input ->getArgument ('receivers ' )) {
123
123
$ io ->block ('Which transports/receivers do you want to consume? ' , null , 'fg=white;bg=blue ' , ' ' , true );
124
124
125
125
$ io ->writeln ('Choose which receivers you want to consume messages from in order of priority. ' );
@@ -133,7 +133,7 @@ protected function interact(InputInterface $input, OutputInterface $output)
133
133
$ input ->setArgument ('receivers ' , $ io ->askQuestion ($ question ));
134
134
}
135
135
136
- if (0 === \count ( $ input ->getArgument ('receivers ' ) )) {
136
+ if (! $ input ->getArgument ('receivers ' )) {
137
137
throw new RuntimeException ('Please pass at least one receiver. ' );
138
138
}
139
139
}
@@ -164,7 +164,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
164
164
}
165
165
166
166
$ stopsWhen = [];
167
- if (null !== ( $ limit = $ input ->getOption ('limit ' ) )) {
167
+ if (null !== $ limit = $ input ->getOption ('limit ' )) {
168
168
if (!is_numeric ($ limit ) || 0 >= $ limit ) {
169
169
throw new InvalidOptionException (sprintf ('Option "limit" must be a positive integer, "%s" passed. ' , $ limit ));
170
170
}
@@ -178,7 +178,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
178
178
$ this ->eventDispatcher ->addSubscriber (new StopWorkerOnMemoryLimitListener ($ this ->convertToBytes ($ memoryLimit ), $ this ->logger ));
179
179
}
180
180
181
- if (null !== ( $ timeLimit = $ input ->getOption ('time-limit ' ) )) {
181
+ if (null !== $ timeLimit = $ input ->getOption ('time-limit ' )) {
182
182
if (!is_numeric ($ timeLimit ) || 0 >= $ timeLimit ) {
183
183
throw new InvalidOptionException (sprintf ('Option "time-limit" must be a positive integer, "%s" passed. ' , $ timeLimit ));
184
184
}
@@ -190,7 +190,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
190
190
$ stopsWhen [] = 'received a stop signal via the messenger:stop-workers command ' ;
191
191
192
192
$ io = new SymfonyStyle ($ input , $ output instanceof ConsoleOutputInterface ? $ output ->getErrorOutput () : $ output );
193
- $ io ->success (sprintf ('Consuming messages from transport%s "%s". ' , \count ($ receivers ) > 0 ? 's ' : '' , implode (', ' , $ receiverNames )));
193
+ $ io ->success (sprintf ('Consuming messages from transport%s "%s". ' , \count ($ receivers ) > 1 ? 's ' : '' , implode (', ' , $ receiverNames )));
194
194
195
195
if ($ stopsWhen ) {
196
196
$ last = array_pop ($ stopsWhen );
0 commit comments