GameQ
GameQ copied to clipboard
Modified to show the FiveM player list
A small change to the script to get the FiveM player list and display it with
Coverage: 92.826% (+4.3%) from 88.533% when pulling c391800207525ab5346985e479a6a3634e06c677 on Erani0:FiveM-Player-List into 44e7906661ae90c68d77005f42cbbf151caea478 on Austinb:v3.
Sorry about the force push thought it was better than dozens of commits. I'm really clueless why scrutinizer always outputs an error does anyone know how to fix it so that there are no problems
Finally scrutinizer has no more errors.
Please remove any comments that are not needed (i.e. preventing test code from operating).
Also, as a bigger discussion, this library was built to only use the bare minimum of requirements due to hosting and other restrictions. That being said I know some hosts will block functions to prevent abuse and other issues. The question is should an internal call to \Protocols\Http (https://github.com/Austinb/GameQ/blob/v3/src/GameQ/Protocols/Http.php) be used instead of making direct calls to file_get_contents()? This is just a thought since this solution is a shoehorn option given that the protocol this game server is using does not return the player information in a "regular" query call.
Thoughts? CC: @bumbummen99
So the comments were already there before but it can also be removed. And yes I understand what you mean. But FiveM outputs data differently, you can query them via http then you would have to query 2 urls and evaluate or as it is now and subsequently integrate the player list as I have done now.
Please remove any comments that are not needed (i.e. preventing test code from operating).
Also, as a bigger discussion, this library was built to only use the bare minimum of requirements due to hosting and other restrictions. That being said I know some hosts will block functions to prevent abuse and other issues. The question is should an internal call to \Protocols\Http (https://github.com/Austinb/GameQ/blob/v3/src/GameQ/Protocols/Http.php) be used instead of making direct calls to
file_get_contents()? This is just a thought since this solution is a shoehorn option given that the protocol this game server is using does not return the player information in a "regular" query call.Thoughts? CC: @bumbummen99
How would that internal call look like?
You get this information from the server. http://45.131.108.130:30120/info.json
The inspection completed: 1 new issues, 6 updated code elements
Should PHP 5.6 be removed from the checks? It may already have been. @bumbummen99 can you bump this so it will check again?
The inspection completed: 1 new issues
@Austinb It failed due to the null coalesce operator (??) that was introduced with PHP7. While i agree that we should drop support for ancient versions to encurage people to update their code and environment to a secure and supported version, i would say that this should be done with a seperate change / release so that this can be clearly communicated - we could then also introduce a lot of new PHP features in regards to types that i think would come in very handy.
Edit: Also think this PR is good now :)
Query for FiveM , change.. A update coming ?