1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-06 16:50:09 +01:00

Clean up NullWriter; drop legacy config check

This commit is contained in:
Matt Stauffer
2022-12-22 00:27:09 -05:00
parent a77030ab08
commit e19afe51ad
6 changed files with 15 additions and 34 deletions

View File

@@ -24,7 +24,6 @@
define('VALET_LOOPBACK', '127.0.0.1');
define('VALET_SERVER_PATH', realpath(__DIR__.'/../../server.php'));
define('VALET_LEGACY_HOME_PATH', $_SERVER['HOME'].'/.valet');
define('BREW_PREFIX', (new CommandLine())->runAsUser('printf $(brew --prefix)'));
@@ -34,9 +33,9 @@
* Set or get a global console writer.
*
* @param null|OutputInterface $writer
* @return OutputInterface Or anonymous class
* @return OutputInterface|\NullWriter|null
*/
function writer(?OutputInterface $writer = null)/*: OutputInterface*/
function writer(?OutputInterface $writer = null): OutputInterface|\NullWriter|null
{
$container = Container::getInstance();
@@ -48,7 +47,9 @@ function writer(?OutputInterface $writer = null)/*: OutputInterface*/
return $container->make('writer');
}
return Container::getInstance()->instance('writer', $writer);
Container::getInstance()->instance('writer', $writer);
return null;
}
/**