Skip to content

Commit 2f27bce

Browse files
committed
Ensure consistent comparison
1 parent 64e7d4f commit 2f27bce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Connection/Responses/TaggedResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ public function data(): array
3939
*/
4040
public function successful(): bool
4141
{
42-
return $this->status()->value === 'OK';
42+
return strtoupper($this->status()->value) === 'OK';
4343
}
4444

4545
/**
4646
* Determine if the response failed.
4747
*/
4848
public function failed(): bool
4949
{
50-
return in_array($this->status()->value, ['NO', 'BAD']);
50+
return in_array(strtoupper($this->status()->value), ['NO', 'BAD']);
5151
}
5252
}

0 commit comments

Comments
 (0)