We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
MockTarget
StreamTarget
1 parent 4994e2b commit 839ff42Copy full SHA for 839ff42
src/Toolkit/Testing/Console/MockTarget.php
@@ -45,6 +45,14 @@ public function __construct(
45
$this->Formatter = $formatter ?? new Formatter(null, null, fn() => $this->Width);
46
}
47
48
+ /**
49
+ * @internal
50
+ */
51
+ public function __destruct()
52
+ {
53
+ $this->close();
54
+ }
55
+
56
/**
57
* @inheritDoc
58
*/
@@ -135,10 +143,7 @@ public function close(): void
135
143
$this->IsStdout = false;
136
144
$this->IsStderr = false;
137
145
$this->IsTty = false;
138
- $this->Width = null;
139
146
$this->Stream = null;
140
- unset($this->Formatter);
141
-
142
147
$this->IsValid = false;
148
149
0 commit comments