@@ -514,16 +514,16 @@ public function run($command, $args = array())
514
514
{
515
515
$ process = $ this ->getProcess ($ command , $ args );
516
516
517
- if (null !== $ this ->logger ) {
518
- $ this ->logger ->info (sprintf ('run command: %s "%s" ' , $ command , implode ('", " ' , $ args )));
517
+ if ($ this ->logger ) {
518
+ $ this ->logger ->info (sprintf ('run command: %s "%s" ' , $ command , implode (' ' , $ args )));
519
519
$ before = microtime (true );
520
520
}
521
521
522
522
$ process ->run ();
523
523
524
524
$ output = $ process ->getOutput ();
525
525
526
- if (null !== $ this ->logger && true === $ this ->debug ) {
526
+ if ($ this ->logger && $ this ->debug ) {
527
527
$ duration = microtime (true ) - $ before ;
528
528
$ this ->logger ->debug (sprintf ('last command (%s) duration: %sms ' , $ command , sprintf ('%.2f ' , $ duration *1000 )));
529
529
$ this ->logger ->debug (sprintf ('last command (%s) return code: %s ' , $ command , $ process ->getExitCode ()));
@@ -533,11 +533,11 @@ public function run($command, $args = array())
533
533
if (!$ process ->isSuccessful ()) {
534
534
$ error = sprintf ("error while running %s \n output: \"%s \"" , $ command , $ process ->getErrorOutput ());
535
535
536
- if (null !== $ this ->logger ) {
536
+ if ($ this ->logger ) {
537
537
$ this ->logger ->error ($ error );
538
538
}
539
539
540
- if (true === $ this ->debug ) {
540
+ if ($ this ->debug ) {
541
541
throw new RuntimeException ($ process );
542
542
}
543
543
0 commit comments