diff --git a/.editorconfig b/.editorconfig index a54b59f..10d4777 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,6 +6,7 @@ root = true charset = utf-8 indent_style = tab insert_final_newline = true +trim_trailing_whitespace = true [*.yaml] indent_style = space diff --git a/Examples/Example.php b/Examples/Example.php index dcc9f0a..d358937 100644 --- a/Examples/Example.php +++ b/Examples/Example.php @@ -1,27 +1,27 @@ define( 'SQ_SERVER_ADDR', 'localhost' ); define( 'SQ_SERVER_PORT', 27015 ); define( 'SQ_TIMEOUT', 1 ); define( 'SQ_ENGINE', SourceQuery::SOURCE ); // Edit this <- - + $Query = new SourceQuery( ); - + try { $Query->Connect( SQ_SERVER_ADDR, SQ_SERVER_PORT, SQ_TIMEOUT, SQ_ENGINE ); - + print_r( $Query->GetInfo( ) ); print_r( $Query->GetPlayers( ) ); print_r( $Query->GetRules( ) ); diff --git a/Examples/RconExample.php b/Examples/RconExample.php index d75a6dd..f100251 100644 --- a/Examples/RconExample.php +++ b/Examples/RconExample.php @@ -1,29 +1,29 @@ define( 'SQ_SERVER_ADDR', 'localhost' ); define( 'SQ_SERVER_PORT', 27015 ); define( 'SQ_TIMEOUT', 1 ); define( 'SQ_ENGINE', SourceQuery::SOURCE ); // Edit this <- - + $Query = new SourceQuery( ); - + try { $Query->Connect( SQ_SERVER_ADDR, SQ_SERVER_PORT, SQ_TIMEOUT, SQ_ENGINE ); - + $Query->SetRconPassword( 'my_awesome_password' ); - + var_dump( $Query->Rcon( 'say hello' ) ); } catch( Exception $e ) diff --git a/Examples/View.php b/Examples/View.php index 4deea62..ee33f4d 100644 --- a/Examples/View.php +++ b/Examples/View.php @@ -4,28 +4,28 @@ require __DIR__ . '/../vendor/autoload.php'; use xPaw\SourceQuery\SourceQuery; - + // Edit this -> define( 'SQ_SERVER_ADDR', 'localhost' ); define( 'SQ_SERVER_PORT', 27015 ); define( 'SQ_TIMEOUT', 3 ); define( 'SQ_ENGINE', SourceQuery::SOURCE ); // Edit this <- - + $Timer = microtime( true ); - + $Query = new SourceQuery( ); - + $Info = []; $Rules = []; $Players = []; $Exception = null; - + try { $Query->Connect( SQ_SERVER_ADDR, SQ_SERVER_PORT, SQ_TIMEOUT, SQ_ENGINE ); //$Query->SetUseOldGetChallengeMethod( true ); // Use this when players/rules retrieval fails on games like Starbound - + $Info = $Query->GetInfo( ); $Players = $Query->GetPlayers( ); $Rules = $Query->GetRules( ); @@ -38,7 +38,7 @@ { $Query->Disconnect( ); } - + $Timer = number_format( microtime( true ) - $Timer, 4, '.', '' ); ?> @@ -46,28 +46,28 @@ Source Query PHP Library - +