Skip to content

Commit

Permalink
Introduce local variable
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Nov 11, 2023
1 parent 697e3eb commit bb2ef6f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/framework/src/Console/Commands/ServeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ protected function useBasicOutput(): bool

protected function parseEnvironmentOption(string $name): ?string
{
if ($this->option($name) !== null) {
return match ($this->option($name)) {
$value = $this->option($name);

if ($value !== null) {
return match ($value) {
'true', '' => 'enabled',
'false' => 'disabled',
default => throw new InvalidArgumentException(sprintf('Invalid boolean value for --%s option.', $name))
Expand Down

0 comments on commit bb2ef6f

Please sign in to comment.