+ if ($verbose === null) {
+ $this->progress("", PHP_OUTPUT_HANDLER_FINAL);
+ }
+ return $this->status = proc_close($proc);
+ }
+
+ /**
+ * Output handler that displays some progress while soaking output
+ * @param string $string
+ * @param int $flags
+ * @return string
+ */
+ private function progress($string, $flags) {
+ static $c = 0;
+ static $s = ["\\","|","/","-"];
+
+ $this->output .= $string;
+
+ return $flags & PHP_OUTPUT_HANDLER_FINAL
+ ? " \r"
+ : sprintf(" %s\r", $s[$c++ % count($s)]);