@@ -25,7 +25,8 @@ |
||
| 25 | 25 | |
| 26 | 26 | public function offsetSet($offset, $value) |
| 27 | 27 | { |
| 28 | - if ($value instanceof Post) |
|
| 29 | - parent::offsetSet($offset, $value); |
|
| 28 | + if ($value instanceof Post) { |
|
| 29 | + parent::offsetSet($offset, $value); |
|
| 30 | + } |
|
| 30 | 31 | } |
| 31 | 32 | } |
| 32 | 33 | \ No newline at end of file |
@@ -30,8 +30,9 @@ discard block |
||
| 30 | 30 | */ |
| 31 | 31 | public function offsetExists($offset) |
| 32 | 32 | { |
| 33 | - if (array_key_exists($offset, $this->items)) |
|
| 34 | - return true; |
|
| 33 | + if (array_key_exists($offset, $this->items)) { |
|
| 34 | + return true; |
|
| 35 | + } |
|
| 35 | 36 | |
| 36 | 37 | return false; |
| 37 | 38 | } |
@@ -43,8 +44,9 @@ discard block |
||
| 43 | 44 | */ |
| 44 | 45 | public function offsetGet($offset) |
| 45 | 46 | { |
| 46 | - if ($this->offsetExists($offset)) |
|
| 47 | - return $this->items[$offset]; |
|
| 47 | + if ($this->offsetExists($offset)) { |
|
| 48 | + return $this->items[$offset]; |
|
| 49 | + } |
|
| 48 | 50 | |
| 49 | 51 | return false; |
| 50 | 52 | } |
@@ -63,8 +65,9 @@ discard block |
||
| 63 | 65 | */ |
| 64 | 66 | public function offsetUnset($offset) |
| 65 | 67 | { |
| 66 | - if ($this->offsetExists($offset) && isset($this->items[$offset])) |
|
| 67 | - unset ($this->items[$offset]); |
|
| 68 | + if ($this->offsetExists($offset) && isset($this->items[$offset])) { |
|
| 69 | + unset ($this->items[$offset]); |
|
| 70 | + } |
|
| 68 | 71 | } |
| 69 | 72 | |
| 70 | 73 | /** |
@@ -25,7 +25,8 @@ |
||
| 25 | 25 | |
| 26 | 26 | public function offsetSet($offset, $value) |
| 27 | 27 | { |
| 28 | - if ($value instanceof Thread) |
|
| 29 | - parent::offsetSet($offset, $value); |
|
| 28 | + if ($value instanceof Thread) { |
|
| 29 | + parent::offsetSet($offset, $value); |
|
| 30 | + } |
|
| 30 | 31 | } |
| 31 | 32 | } |
| 32 | 33 | \ No newline at end of file |
@@ -46,11 +46,12 @@ discard block |
||
| 46 | 46 | ]; |
| 47 | 47 | |
| 48 | 48 | $response = json_decode(self::$client->getResult($params)->getBody()->getContents(), true); |
| 49 | - if ($response['request_stats']['query_status'] == "success") |
|
| 50 | - if ($raw === true) |
|
| 49 | + if ($response['request_stats']['query_status'] == "success") { |
|
| 50 | + if ($raw === true) |
|
| 51 | 51 | return $response; |
| 52 | - else |
|
| 53 | - return self::fillModel($profileType, $response['data']); |
|
| 52 | + } else { |
|
| 53 | + return self::fillModel($profileType, $response['data']); |
|
| 54 | + } |
|
| 54 | 55 | |
| 55 | 56 | return false; |
| 56 | 57 | } |
@@ -60,8 +61,9 @@ discard block |
||
| 60 | 61 | */ |
| 61 | 62 | private static function setupClient() |
| 62 | 63 | { |
| 63 | - if (static::$client === false) |
|
| 64 | - static::$client = new StarCitizensClient(); |
|
| 64 | + if (static::$client === false) { |
|
| 65 | + static::$client = new StarCitizensClient(); |
|
| 66 | + } |
|
| 65 | 67 | } |
| 66 | 68 | |
| 67 | 69 | /** |
@@ -156,8 +156,9 @@ discard block |
||
| 156 | 156 | { |
| 157 | 157 | if ($this->threads === null) { |
| 158 | 158 | $threads = Accounts::findThreads($this->handle); |
| 159 | - if ($threads instanceof Threads) |
|
| 160 | - $this->threads = $threads; |
|
| 159 | + if ($threads instanceof Threads) { |
|
| 160 | + $this->threads = $threads; |
|
| 161 | + } |
|
| 161 | 162 | } |
| 162 | 163 | |
| 163 | 164 | |
@@ -172,8 +173,9 @@ discard block |
||
| 172 | 173 | { |
| 173 | 174 | if ($this->posts === null) { |
| 174 | 175 | $posts = Accounts::findPosts($this->handle); |
| 175 | - if ($posts instanceof Posts) |
|
| 176 | - $this->posts = $posts; |
|
| 176 | + if ($posts instanceof Posts) { |
|
| 177 | + $this->posts = $posts; |
|
| 178 | + } |
|
| 177 | 179 | } |
| 178 | 180 | |
| 179 | 181 | return $this->posts; |
@@ -186,8 +188,9 @@ discard block |
||
| 186 | 188 | */ |
| 187 | 189 | public function with(...$types) { |
| 188 | 190 | foreach ($types as $type) { |
| 189 | - if (method_exists($this, strtolower($type))) |
|
| 190 | - call_user_func([$this, $type]); |
|
| 191 | + if (method_exists($this, strtolower($type))) { |
|
| 192 | + call_user_func([$this, $type]); |
|
| 193 | + } |
|
| 191 | 194 | } |
| 192 | 195 | |
| 193 | 196 | return $this; |