Skip to content

Commit

Permalink
Fix Verbosity enum usage (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk authored Jun 28, 2024
1 parent d5d885e commit c1ced7a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/HtmlRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function render(
?Verbosity $verbosity = Verbosity::BASIC,
string $format = null,
): string {
if ($verbosity >= Verbosity::VERBOSE) {
if ($verbosity?->value >= Verbosity::VERBOSE->value) {
return (string)$this->renderer->renderVerbose($exception);
}

Expand Down
2 changes: 1 addition & 1 deletion src/JsonRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function render(
?Verbosity $verbosity = Verbosity::BASIC,
string $format = null,
): string {
if ($verbosity >= Verbosity::VERBOSE) {
if ($verbosity?->value >= Verbosity::VERBOSE->value) {
return (string)$this->renderer->renderVerbose($exception);
}

Expand Down
2 changes: 1 addition & 1 deletion src/PlainTextRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function render(
?Verbosity $verbosity = Verbosity::BASIC,
string $format = null,
): string {
if ($verbosity >= Verbosity::VERBOSE) {
if ($verbosity?->value >= Verbosity::VERBOSE->value) {
return (string)$this->renderer->renderVerbose($exception);
}

Expand Down
2 changes: 1 addition & 1 deletion src/XmlRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function render(
?Verbosity $verbosity = Verbosity::BASIC,
string $format = null,
): string {
if ($verbosity >= Verbosity::VERBOSE) {
if ($verbosity?->value >= Verbosity::VERBOSE->value) {
return (string)$this->renderer->renderVerbose($exception);
}

Expand Down

0 comments on commit c1ced7a

Please sign in to comment.