@@ -371,35 +371,35 @@ function decode_remote_command_output(?ApplicationDeploymentQueue $application_d
371
371
return $ i ;
372
372
})
373
373
->reduce (function ($ deploymentLogLines , $ logItem ) use ($ seenCommands ) {
374
- $ command = $ logItem[ 'command ' ] ;
375
- $ isStderr = $ logItem[ 'type ' ] === 'stderr ' ;
374
+ $ command = data_get ( $ logItem, 'command ' ) ;
375
+ $ isStderr = data_get ( $ logItem, 'type ' ) === 'stderr ' ;
376
376
$ isNewCommand = ! is_null ($ command ) && ! $ seenCommands ->first (function ($ seenCommand ) use ($ logItem ) {
377
- return $ seenCommand[ 'command ' ] === $ logItem[ 'command ' ] && $ seenCommand[ 'batch ' ] === $ logItem[ 'batch ' ] ;
377
+ return data_get ( $ seenCommand, 'command ' ) === data_get ( $ logItem, 'command ' ) && data_get ( $ seenCommand, 'batch ' ) === data_get ( $ logItem, 'batch ' ) ;
378
378
});
379
379
380
380
if ($ isNewCommand ) {
381
381
$ deploymentLogLines ->push ([
382
382
'line ' => $ command ,
383
- 'timestamp ' => $ logItem[ 'timestamp ' ] ,
383
+ 'timestamp ' => data_get ( $ logItem, 'timestamp ' ) ,
384
384
'stderr ' => $ isStderr ,
385
- 'hidden ' => $ logItem[ 'hidden ' ] ,
385
+ 'hidden ' => data_get ( $ logItem, 'hidden ' ) ,
386
386
'command ' => true ,
387
387
]);
388
388
389
389
$ seenCommands ->push ([
390
390
'command ' => $ command ,
391
- 'batch ' => $ logItem[ 'batch ' ] ,
391
+ 'batch ' => data_get ( $ logItem, 'batch ' ) ,
392
392
]);
393
393
}
394
394
395
- $ lines = explode (PHP_EOL , $ logItem[ 'output ' ] );
395
+ $ lines = explode (PHP_EOL , data_get ( $ logItem, 'output ' ) );
396
396
397
397
foreach ($ lines as $ line ) {
398
398
$ deploymentLogLines ->push ([
399
399
'line ' => $ line ,
400
- 'timestamp ' => $ logItem[ 'timestamp ' ] ,
400
+ 'timestamp ' => data_get ( $ logItem, 'timestamp ' ) ,
401
401
'stderr ' => $ isStderr ,
402
- 'hidden ' => $ logItem[ 'hidden ' ] ,
402
+ 'hidden ' => data_get ( $ logItem, 'hidden ' ) ,
403
403
]);
404
404
}
405
405
0 commit comments