File tree Expand file tree Collapse file tree 4 files changed +31
-3
lines changed Expand file tree Collapse file tree 4 files changed +31
-3
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+ declare (strict_types=1 );
3+
4+ /**
5+ * @author Pavel Djundik
6+ *
7+ * @link https://xpaw.me
8+ * @link https://github.com/xPaw/PHP-Source-Query
9+ *
10+ * @license GNU Lesser General Public License, version 2.1
11+ *
12+ * @internal
13+ */
14+
15+ namespace xPaw \SourceQuery ;
16+
17+ /**
18+ * Base RCON interface
19+ */
20+ abstract class BaseRcon
21+ {
22+ abstract public function Close ( ) : void ;
23+ abstract public function Open ( ) : void ;
24+ abstract public function Write ( int $ Header , string $ String = '' ) : bool ;
25+ abstract public function Read ( ) : Buffer ;
26+ abstract public function Command ( string $ Command ) : string ;
27+ abstract public function Authorize ( string $ Password ) : void ;
28+ }
Original file line number Diff line number Diff line change 2121/**
2222 * Class GoldSourceRcon
2323 */
24- class GoldSourceRcon
24+ class GoldSourceRcon extends BaseRcon
2525{
2626 /**
2727 * Points to socket class
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ class SourceQuery
6666 /**
6767 * Points to rcon class
6868 */
69- private SourceRcon | GoldSourceRcon | null $ Rcon = null ;
69+ private ? BaseRcon $ Rcon = null ;
7070
7171 /**
7272 * Points to socket class
Original file line number Diff line number Diff line change 2121/**
2222 * Class SourceRcon
2323 */
24- class SourceRcon
24+ class SourceRcon extends BaseRcon
2525{
2626 /**
2727 * Points to socket class
You can’t perform that action at this time.
0 commit comments