99 Exception \ParallelProcessException ,
1010 Process \Process ,
1111 Process \ProcessInterface ,
12- Process \ProcessInterfaceArray
12+ Process \ProcessInterfaceCollection
1313};
1414use Symfony \Component \Console \{
1515 Color ,
1616 Output \OutputInterface
1717};
18- use Steevanb \PhpTypedArray \ ScalarArray \ StringArray ;
18+ use Steevanb \PhpCollection \ ScalarCollection \ StringCollection ;
1919
2020class DefaultTheme implements ThemeInterface
2121{
@@ -183,7 +183,7 @@ public function getExecutionTimeVerbosity(): int
183183 return $ this ->executionTimeVerbosity ;
184184 }
185185
186- public function resetOutput (OutputInterface $ output , ProcessInterfaceArray $ processes ): static
186+ public function resetOutput (OutputInterface $ output , ProcessInterfaceCollection $ processes ): static
187187 {
188188 for ($ reset = 0 ; $ reset < $ processes ->count (); $ reset ++) {
189189 $ output ->write ("\e[1A \e[K " );
@@ -192,7 +192,7 @@ public function resetOutput(OutputInterface $output, ProcessInterfaceArray $proc
192192 return $ this ;
193193 }
194194
195- public function outputStart (OutputInterface $ output , ProcessInterfaceArray $ processes ): static
195+ public function outputStart (OutputInterface $ output , ProcessInterfaceCollection $ processes ): static
196196 {
197197 foreach ($ processes ->toArray () as $ process ) {
198198 $ this ->outputProcessState ($ output , $ process );
@@ -203,7 +203,7 @@ public function outputStart(OutputInterface $output, ProcessInterfaceArray $proc
203203 return $ this ;
204204 }
205205
206- public function outputProcessesState (OutputInterface $ output , ProcessInterfaceArray $ processes ): static
206+ public function outputProcessesState (OutputInterface $ output , ProcessInterfaceCollection $ processes ): static
207207 {
208208 $ this ->resetOutput ($ output , $ processes );
209209
@@ -216,7 +216,7 @@ public function outputProcessesState(OutputInterface $output, ProcessInterfaceAr
216216 return $ this ;
217217 }
218218
219- public function outputSummary (OutputInterface $ output , ProcessInterfaceArray $ processes ): static
219+ public function outputSummary (OutputInterface $ output , ProcessInterfaceCollection $ processes ): static
220220 {
221221 $ this ->resetOutput ($ output , $ processes );
222222
@@ -233,7 +233,7 @@ public function outputSummary(OutputInterface $output, ProcessInterfaceArray $pr
233233
234234 protected function outputProcessSummary (OutputInterface $ output , ProcessInterface $ process ): static
235235 {
236- $ lines = new StringArray ();
236+ $ lines = new StringCollection ();
237237
238238 if ($ process ->isTerminated ()) {
239239 if ($ process ->isSuccessful ()) {
@@ -287,7 +287,7 @@ protected function outputProcessSummary(OutputInterface $output, ProcessInterfac
287287 $ this ->removeLastEmptyLines ($ lines );
288288
289289 if ($ lines ->count () > 0 ) {
290- $ output ->writeln ($ lines );
290+ $ output ->writeln ($ lines-> toArray () );
291291 }
292292
293293 return $ this ;
@@ -297,10 +297,10 @@ protected function mergeProcessOutput(
297297 OutputInterface $ output ,
298298 ?string $ prefix ,
299299 string $ processOutput ,
300- StringArray $ lines
300+ StringCollection $ lines
301301 ): static {
302302 $ lines ->merge (
303- new StringArray (
303+ new StringCollection (
304304 array_map (
305305 fn (string $ line ): string => $ prefix . ($ output ->isDecorated () ? ' ' . $ line : ' ' . $ line ),
306306 explode ("\n" , $ processOutput )
@@ -311,14 +311,13 @@ protected function mergeProcessOutput(
311311 return $ this ;
312312 }
313313
314- protected function removeLastEmptyLines (StringArray $ lines ): static
314+ protected function removeLastEmptyLines (StringCollection $ lines ): static
315315 {
316316 while (
317317 $ lines ->count () >= 1
318- && is_string ($ lines [$ lines ->count () - 1 ])
319- && trim ($ lines [$ lines ->count () - 1 ]) === ''
318+ && trim ($ lines ->get ($ lines ->count () - 1 )) === ''
320319 ) {
321- unset( $ lines[ $ lines ->count () - 1 ] );
320+ $ lines-> remove ( $ lines ->count () - 1 );
322321 }
323322
324323 return $ this ;
0 commit comments