| Conditions | 3 |
| Paths | 3 |
| Total Lines | 26 |
| Code Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 20 | public function jsonSerialize() |
||
| 21 | { |
||
| 22 | $remoteRepository = ''; |
||
| 23 | $localRepository = ''; |
||
| 24 | $steamAppId = ''; |
||
| 25 | |||
| 26 | if ($this->os === 'linux') { |
||
| 27 | $remoteRepository = $this->game->remote_repository_linux; |
||
| 28 | $localRepository = $this->game->local_repository_linux; |
||
| 29 | $steamAppId = $this->game->steam_app_id_linux; |
||
| 30 | } elseif ($this->os === 'windows') { |
||
| 31 | $remoteRepository = $this->game->remote_repository_windows; |
||
| 32 | $localRepository = $this->game->local_repository_windows; |
||
| 33 | $steamAppId = $this->game->steam_app_id_windows; |
||
| 34 | } |
||
| 35 | |||
| 36 | return [ |
||
| 37 | 'code' => $this->game->code, |
||
| 38 | 'start_code' => $this->game->start_code, |
||
| 39 | 'name' => $this->game->name, |
||
| 40 | 'engine' => $this->game->engine, |
||
| 41 | 'engine_version' => $this->game->engine_version, |
||
| 42 | 'remote_repository' => $remoteRepository, |
||
| 43 | 'local_repository' => $localRepository, |
||
| 44 | 'steam_app_id' => $steamAppId, |
||
| 45 | 'steam_app_set_config' => $this->game->steam_app_set_config, |
||
| 46 | ]; |
||
| 49 |