/
githubmirror
/
framework
Обзор
Документация
Войти
/
githubmirror
/
framework
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
13.x
src/Illuminate/Console/BufferedConsoleOutput.php
42 строки
762 B
henzeb
remove return statement on method with return type void (#50442)
10 мар 2024, 18:24
Не верифицирован
10 мар 2024, 18:24
20d2d1e
Код
Авторство
О чём код?
<?php namespace Illuminate\Console; use Symfony\Component\Console\Output\ConsoleOutput; class BufferedConsoleOutput extends ConsoleOutput { /** * The current buffer. * * @var string */ protected $buffer = ''; /** * Empties the buffer and returns its content. * * @return string */ public function fetch() { return tap($this->buffer, function () { $this->buffer = ''; }); } /** * {@inheritdoc} */ #[\Override] protected function doWrite(string $message, bool $newline): void { $this->buffer .= $message; if ($newline) { $this->buffer .= \PHP_EOL; } parent::doWrite($message, $newline); } }