@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | { |
| 73 | 73 | static::checkDocumentId($id); |
| 74 | 74 | if (is_object($data)) { |
| 75 | - $data = (array) $data; |
|
| 75 | + $data = (array)$data; |
|
| 76 | 76 | } elseif (is_string($data)) { |
| 77 | 77 | $data = json_decode($data, true); |
| 78 | 78 | } |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | $toinsert = []; |
| 96 | 96 | foreach ($documents as $document) { |
| 97 | 97 | if (is_object($document)) { |
| 98 | - $document = (array) $document; |
|
| 98 | + $document = (array)$document; |
|
| 99 | 99 | } elseif (is_string($document)) { |
| 100 | 100 | $document = json_decode($document, true); |
| 101 | 101 | } |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | { |
| 190 | 190 | static::checkDocumentId($id); |
| 191 | 191 | if (is_object($data)) { |
| 192 | - $data = (array) $data; |
|
| 192 | + $data = (array)$data; |
|
| 193 | 193 | } elseif (is_string($data)) { |
| 194 | 194 | $data = json_decode($data, true); |
| 195 | 195 | } |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | $toreplace = []; |
| 212 | 212 | foreach ($documents as $document) { |
| 213 | 213 | if (is_object($document)) { |
| 214 | - $document = (array) $document; |
|
| 214 | + $document = (array)$document; |
|
| 215 | 215 | } elseif (is_string($document)) { |
| 216 | 216 | $document = json_decode($document, true); |
| 217 | 217 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | public function setBody($params = null) |
| 14 | 14 | { |
| 15 | 15 | if (isset($this->index)) { |
| 16 | - $binds =[]; |
|
| 16 | + $binds = []; |
|
| 17 | 17 | $binds[] = "'" . static::escape($params['query']) . "'"; |
| 18 | 18 | $binds[] = "'" . $this->index . "'"; |
| 19 | 19 | if (count($params['options']) > 0) { |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | public function setBody($params = null) |
| 15 | 15 | { |
| 16 | 16 | if (isset($this->index)) { |
| 17 | - $binds =[]; |
|
| 17 | + $binds = []; |
|
| 18 | 18 | $binds[] = "'" . static::escape($params['query']) . "'"; |
| 19 | 19 | $binds[] = "'" . $this->index . "'"; |
| 20 | 20 | if (count($params['options']) > 0) { |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | curl_setopt($conn, CURLOPT_CUSTOMREQUEST, $method); |
| 57 | 57 | curl_setopt($conn, CURLOPT_HTTPHEADER, $headers); |
| 58 | 58 | |
| 59 | - if ($connection->getConnectTimeout()>0) { |
|
| 59 | + if ($connection->getConnectTimeout() > 0) { |
|
| 60 | 60 | curl_setopt($conn, CURLOPT_CONNECTTIMEOUT, $connection->getConnectTimeout()); |
| 61 | 61 | } |
| 62 | 62 | |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | curl_setopt( |
| 66 | 66 | $conn, |
| 67 | 67 | CURLOPT_USERPWD, |
| 68 | - $connection->getConfig('username').":".$connection->getConfig('password') |
|
| 68 | + $connection->getConfig('username') . ":" . $connection->getConfig('password') |
|
| 69 | 69 | ); |
| 70 | 70 | } |
| 71 | 71 | if ($connection->getConfig('proxy') !== null) { |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $status = curl_getinfo($conn, CURLINFO_HTTP_CODE); |
| 86 | 86 | if (isset($params['responseClass'])) { |
| 87 | 87 | $responseClass = $params['responseClass']; |
| 88 | - $responseClassParams = isset($params['responseClassParams'])?$params['responseClassParams']:[]; |
|
| 88 | + $responseClassParams = isset($params['responseClassParams']) ? $params['responseClassParams'] : []; |
|
| 89 | 89 | $response = new $responseClass($responseString, $status, $responseClassParams); |
| 90 | 90 | } else { |
| 91 | 91 | $response = new Response($responseString, $status); |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | 'body' => $request->getBody() |
| 100 | 100 | ]); |
| 101 | 101 | //hard error |
| 102 | - if ($errorno>0) { |
|
| 102 | + if ($errorno > 0) { |
|
| 103 | 103 | $error = curl_error($conn); |
| 104 | 104 | |
| 105 | 105 | static::$curl = null; |