Skip to content

Commit 17bf62c

Browse files
authored
Update Result.php
1 parent ad63d72 commit 17bf62c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Types/Result.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,11 @@ class Result {
5252
* @SuppressWarnings("PHPMD.StaticAccess")
5353
*/
5454
public function __construct($query, $requestMethod, Response $response, array $options = []) {
55-
$tokens = (new PHPSQLParser())->parse($query);
55+
$tokens = (new PHPSQLParser())->parse($query);
5656

5757
$responseCode = $response->getStatusCode();
5858

59-
if ($responseCode === Response::HTTP_NO_CONTENT) $content = [];
60-
else $content = Format::create($options)->decode($response->getContent());
61-
59+
$content = $responseCode === Response::HTTP_NO_CONTENT ? [] : Format::create($options)->decode($response->getContent());
6260

6361
$this->result = $this->createResult($tokens, $requestMethod, $responseCode, $content);
6462
$this->id = $this->createId($tokens);

0 commit comments

Comments
 (0)