1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 08:30:07 +01:00

clean up grim code

This commit is contained in:
Taylor Otwell
2016-09-21 09:02:15 -05:00
parent 98af5e7ed5
commit 559c9cc29e

View File

@@ -74,12 +74,7 @@
* Add the current working directory to the paths configuration.
*/
$app->command('park [path]', function ($path = null) {
$pathToPark = getcwd();
if ($path !== null) {
$pathToPark = $path;
}
Configuration::addPath($pathToPark);
Configuration::addPath($path ?: getcwd());
info(($path === null ? "This" : "The [{$path}]") . " directory has been added to Valet's paths.");
})->descriptions('Register the current working (or specified) directory with Valet');
@@ -88,12 +83,7 @@
* Remove the current working directory from the paths configuration.
*/
$app->command('forget [path]', function ($path = null) {
$pathToForget = getcwd();
if ($path !== null) {
$pathToForget = $path;
}
Configuration::removePath($pathToForget);
Configuration::removePath($path ?: getcwd());
info(($path === null ? "This" : "The [{$path}]") . " directory has been removed from Valet's paths.");
})->descriptions('Remove the current working (or specified) directory from Valet\'s list of paths');
@@ -186,7 +176,7 @@
})->descriptions('Stream all of the logs for all Laravel sites registered with Valet');
/**
* Stream Caddy access- and error-log.
* Stream Caddy access and error log.
*/
$app->command('server-log', function () {
$files = Filesystem::scandir(VALET_HOME_PATH.'/Log');