Skip to content

Commit

Permalink
Revert "Refactor"
Browse files Browse the repository at this point in the history
This reverts commit 8e5c816.
  • Loading branch information
sebastianbergmann committed Feb 4, 2024
1 parent defd151 commit ddb0a71
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions src/TextUI/Configuration/Cli/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -806,34 +806,24 @@ public function fromParameters(array $parameters): Configuration
break;

case '--log-events-text':
$path = realpath($option[1]);

if (!$path) {
throw new Exception(
sprintf(
'The path "%s" specified for the --log-events-text option could not be resolved',
$option[1],
),
);
}
$path = $option[1];
$realPath = realpath($path);

$logEventsText = $path;
if (!$realPath) {
throw new Exception("The path \"{$path}\" specified for the --log-events-text option could not be resolved");
}
$logEventsText = $realPath;

break;

case '--log-events-verbose-text':
$path = realpath($option[1]);

if (!$path) {
throw new Exception(
sprintf(
'The path "%s" specified for the --log-events-verbose-text option could not be resolved',
$option[1],
),
);
}
$path = $option[1];
$realPath = realpath($path);

$logEventsVerboseText = $path;
if (!$realPath) {
throw new Exception("The path \"{$path}\" specified for the --log-events-verbose-text option could not be resolved");
}
$logEventsVerboseText = $realPath;

break;

Expand Down

0 comments on commit ddb0a71

Please sign in to comment.