@@ -51,7 +51,7 @@ final class ScriptExecutor
5151 * @param string[] $scriptParts
5252 * @param ?string[] $scriptInit
5353 */
54- public function __construct (array $ scriptParts , string $ cwd , array $ scriptInit = null )
54+ public function __construct (array $ scriptParts , string $ cwd , ? array $ scriptInit = null )
5555 {
5656 $ this ->scriptParts = $ scriptParts ;
5757 $ this ->cwd = $ cwd ;
@@ -69,7 +69,7 @@ public function __destruct()
6969 * @param string[] $scriptParts
7070 * @param ?string[] $scriptInit
7171 */
72- public static function create (array $ scriptParts , string $ cwd , array $ scriptInit = null ): self
72+ public static function create (array $ scriptParts , string $ cwd , ? array $ scriptInit = null ): self
7373 {
7474 return new self ($ scriptParts , $ cwd , $ scriptInit );
7575 }
@@ -100,7 +100,7 @@ public function getResult(bool $checkCode = true): CliResult
100100 if ($ checkCode && 0 !== $ this ->result ->getCode ()) {
101101 throw new ExecutionException (
102102 $ this ->result ,
103- sprintf (
103+ \ sprintf (
104104 "Cannot execute `%s`: \n%s \nCode: %s \nExit text: %s \nError output: %s \nDetails: \n%s " ,
105105 $ command ,
106106 implode ("\n" , array_map (static function ($ line ) { return "$ {$ line }" ; }, $ tmpFileLines )),
0 commit comments