refactor: add no_useless_else lint rule

Signed-off-by: Saw-jan <saw.jan.grg3e@gmail.com>
This commit is contained in:
Saw-jan
2025-06-19 10:58:37 +05:45
parent 43865a9646
commit 625dc16417
12 changed files with 51 additions and 68 deletions

View File

@@ -589,9 +589,8 @@ class GraphContext implements Context {
if ($response->getStatusCode() === 200) {
$jsonResponseBody = $this->featureContext->getJsonDecodedResponse($response);
return $jsonResponseBody["value"];
} else {
$this->throwHttpException($response, "Could not retrieve groups list.");
}
$this->throwHttpException($response, "Could not retrieve groups list.");
}
/**
@@ -656,9 +655,8 @@ class GraphContext implements Context {
public function getArrayOfUsersResponded(ResponseInterface $response): array {
if ($response->getStatusCode() === 200) {
return $this->featureContext->getJsonDecodedResponse($response);
} else {
$this->throwHttpException($response, "Could not retrieve group members list.");
}
$this->throwHttpException($response, "Could not retrieve group members list.");
}
/**