Skip to content

Commit 39a8436

Browse files
committed
Nitpicks from the review
1 parent 6afe9bb commit 39a8436

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Symfony/Bridge/Monolog/Handler/ConsoleHandler.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ public function isHandling(LogRecord $record): bool
8181
return
8282
$this->updateLevel()
8383
&& parent::isHandling($record)
84-
&& (!$this->interactiveOnly || ($this->input && $this->input->isInteractive()));
84+
&& (!$this->interactiveOnly || $this->input?->isInteractive());
8585
}
8686

8787
public function getBubble(): bool
8888
{
89-
if ($this->isInteractiveOnlyEnabled()) {
89+
if ($this->interactiveOnly && $this->input?->isInteractive()) {
9090
return false;
9191
}
9292

@@ -118,6 +118,7 @@ public function setOutput(OutputInterface $output): void
118118
*/
119119
public function close(): void
120120
{
121+
$this->input = null;
121122
$this->output = null;
122123

123124
parent::close();
@@ -198,9 +199,4 @@ private function updateLevel(): bool
198199

199200
return true;
200201
}
201-
202-
private function isInteractiveOnlyEnabled(): bool
203-
{
204-
return $this->interactiveOnly && $this->input && $this->input->isInteractive();
205-
}
206202
}

0 commit comments

Comments
 (0)