Skip to content

Commit

Permalink
Add declare(strict_types=1);
Browse files Browse the repository at this point in the history
  • Loading branch information
xPaw committed Sep 24, 2024
1 parent 627df8c commit 2c80ddc
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Examples/Example.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

require __DIR__ . '/../SourceQuery/bootstrap.php';

use xPaw\SourceQuery\SourceQuery;
Expand Down
2 changes: 2 additions & 0 deletions Examples/RconExample.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

require __DIR__ . '/../SourceQuery/bootstrap.php';

use xPaw\SourceQuery\SourceQuery;
Expand Down
2 changes: 2 additions & 0 deletions SourceQuery/BaseSocket.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

/**
* @author Pavel Djundik
*
Expand Down
2 changes: 2 additions & 0 deletions SourceQuery/Buffer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

/**
* @author Pavel Djundik
*
Expand Down
2 changes: 2 additions & 0 deletions SourceQuery/Exception/AuthenticationException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

/**
* @author Pavel Djundik
*
Expand Down
2 changes: 2 additions & 0 deletions SourceQuery/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

/**
* @author Pavel Djundik
*
Expand Down
2 changes: 2 additions & 0 deletions SourceQuery/Exception/InvalidPacketException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

/**
* @author Pavel Djundik
*
Expand Down
2 changes: 2 additions & 0 deletions SourceQuery/Exception/SocketException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

/**
* @author Pavel Djundik
*
Expand Down
2 changes: 2 additions & 0 deletions SourceQuery/Exception/SourceQueryException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

/**
* @author Pavel Djundik
*
Expand Down
2 changes: 2 additions & 0 deletions SourceQuery/GoldSourceRcon.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

/**
* @author Pavel Djundik
*
Expand Down
2 changes: 2 additions & 0 deletions SourceQuery/Socket.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

/**
* @author Pavel Djundik
*
Expand Down
6 changes: 4 additions & 2 deletions SourceQuery/SourceQuery.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

/**
* This class provides the public interface to the PHP-Source-Query library.
*
Expand Down Expand Up @@ -71,7 +73,7 @@ class SourceQuery
/**
* Points to rcon class
*/
private SourceRcon|GoldSourceRcon|null $Rcon;
private SourceRcon|GoldSourceRcon|null $Rcon = null;

/**
* Points to socket class
Expand Down Expand Up @@ -154,7 +156,7 @@ public function Disconnect( ) : void

$this->Socket->Close( );

if( $this->Rcon )
if( $this->Rcon !== null )
{
$this->Rcon->Close( );

Expand Down
2 changes: 2 additions & 0 deletions SourceQuery/SourceRcon.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);

/**
* @author Pavel Djundik
*
Expand Down
3 changes: 2 additions & 1 deletion Tests/Tests.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php
use PHPUnit\Framework\TestCase;
declare(strict_types=1);

use xPaw\SourceQuery\BaseSocket;
use xPaw\SourceQuery\SourceQuery;
use xPaw\SourceQuery\Buffer;
Expand Down

0 comments on commit 2c80ddc

Please sign in to comment.