@@ -136,8 +136,7 @@ |
||
| 136 | 136 | $value) : $value; |
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | - } |
|
| 140 | - else{ |
|
| 139 | + } else{ |
|
| 141 | 140 | $query['filter'][$resource] = $columns; |
| 142 | 141 | } |
| 143 | 142 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | |
| 130 | 130 | if (!empty($this->filters)) { |
| 131 | 131 | foreach ($this->filters as $resource => $columns) { |
| 132 | - if(is_array($columns)){ |
|
| 132 | + if (is_array($columns)) { |
|
| 133 | 133 | foreach ($columns as $column => $operands) { |
| 134 | 134 | foreach ($operands as $operand => $value) { |
| 135 | 135 | $query['filter'][$resource][$column][$operand] = is_array($value) ? implode(',', |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | } |
| 140 | - else{ |
|
| 140 | + else { |
|
| 141 | 141 | $query['filter'][$resource] = $columns; |
| 142 | 142 | } |
| 143 | 143 | } |
@@ -106,7 +106,7 @@ |
||
| 106 | 106 | */ |
| 107 | 107 | private function getObjectFromMap($type, $id, array $resourceMap) |
| 108 | 108 | { |
| 109 | - return !empty($resourceMap[$type . "-" . $id])?$resourceMap[$type . "-" . $id]:null; |
|
| 109 | + return !empty($resourceMap[$type . "-" . $id]) ? $resourceMap[$type . "-" . $id] : null; |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | 112 | /** |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | $id = empty($error["id"]) === false ? $error["id"] : ""; |
| 53 | 53 | $meta = isset($error["meta"]) && is_array($error["meta"]) ? $error["meta"] : []; |
| 54 | 54 | $links = Links::createFromArray(isset($error["links"]) && is_array($error["links"]) ? $error["links"] : []); |
| 55 | - $status = (int) empty($error["status"]) === false ? $error["status"] : ""; |
|
| 55 | + $status = (int)empty($error["status"]) === false ? $error["status"] : ""; |
|
| 56 | 56 | $code = empty($error["code"]) === false ? $error["code"] : ""; |
| 57 | 57 | $title = empty($error["title"]) === false ? $error["title"] : ""; |
| 58 | 58 | $detail = empty($error["detail"]) === false ? $error["detail"] : ""; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | $this->options = $options; |
| 28 | 28 | |
| 29 | - $this->client = (!empty($http_client))? $http_client: new \GuzzleHttp\Client($this->getOptions()); |
|
| 29 | + $this->client = (!empty($http_client)) ? $http_client : new \GuzzleHttp\Client($this->getOptions()); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | { |
| 39 | 39 | $endpoint = /** @scrutinizer ignore-call */ Psr7\uri_for($endpoint); |
| 40 | 40 | |
| 41 | - if ($endpoint->isAbsolute($endpoint)){ |
|
| 41 | + if ($endpoint->isAbsolute($endpoint)) { |
|
| 42 | 42 | throw new \Exception("Endpoint must be a relative path"); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | 'base_uri' => $this->base_uri, |
| 56 | 56 | 'http_errors' => true, |
| 57 | 57 | 'headers' => ['Accept' => 'application/json'] |
| 58 | - ],$this->options); |
|
| 58 | + ], $this->options); |
|
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |