1
0
mirror of https://github.com/xPaw/PHP-Source-Query.git synced 2026-05-18 14:43:33 +02:00

Add phpstan

This commit is contained in:
Pavel Djundik
2021-04-16 10:26:03 +03:00
parent 7a7e6b0d67
commit 890d98da92
13 changed files with 84 additions and 71 deletions
+2 -2
View File
@@ -4,8 +4,8 @@
use xPaw\SourceQuery\SourceQuery;
// For the sake of this example
Header( 'Content-Type: text/plain' );
Header( 'X-Content-Type-Options: nosniff' );
header( 'Content-Type: text/plain' );
header( 'X-Content-Type-Options: nosniff' );
// Edit this ->
define( 'SQ_SERVER_ADDR', 'localhost' );
+2 -2
View File
@@ -4,8 +4,8 @@
use xPaw\SourceQuery\SourceQuery;
// For the sake of this example
Header( 'Content-Type: text/plain' );
Header( 'X-Content-Type-Options: nosniff' );
header( 'Content-Type: text/plain' );
header( 'X-Content-Type-Options: nosniff' );
// Edit this ->
define( 'SQ_SERVER_ADDR', 'localhost' );
+8 -8
View File
@@ -10,13 +10,13 @@
define( 'SQ_ENGINE', SourceQuery::SOURCE );
// Edit this <-
$Timer = MicroTime( true );
$Timer = microtime( true );
$Query = new SourceQuery( );
$Info = Array( );
$Rules = Array( );
$Players = Array( );
$Info = [];
$Rules = [];
$Players = [];
$Exception = null;
try
@@ -37,7 +37,7 @@
$Query->Disconnect( );
}
$Timer = Number_Format( MicroTime( true ) - $Timer, 4, '.', '' );
$Timer = number_format( microtime( true ) - $Timer, 4, '.', '' );
?>
<!DOCTYPE html>
<html>
@@ -103,12 +103,12 @@
</tr>
</thead>
<tbody>
<?php if( Is_Array( $Info ) ): ?>
<?php if( !empty( $Info ) ): ?>
<?php foreach( $Info as $InfoKey => $InfoValue ): ?>
<tr>
<td><?php echo htmlspecialchars( $InfoKey ); ?></td>
<td><?php
if( Is_Array( $InfoValue ) )
if( is_array( $InfoValue ) )
{
echo "<pre>";
print_r( $InfoValue );
@@ -176,7 +176,7 @@
</tr>
</thead>
<tbody>
<?php if( Is_Array( $Rules ) ): ?>
<?php if( !empty( $Rules ) ): ?>
<?php foreach( $Rules as $Rule => $Value ): ?>
<tr>
<td><?php echo htmlspecialchars( $Rule ); ?></td>