Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
Tf2
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 query_server
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3declare(strict_types=1);
4
5/**
6 * Clansuite Server Query
7 *
8 * SPDX-FileCopyrightText: 2003-2025 Jens A. Koch
9 * SPDX-License-Identifier: MIT
10 *
11 * For the full copyright and license information, please view
12 * the LICENSE file that was distributed with this source code.
13 */
14
15namespace Clansuite\ServerQuery\ServerProtocols;
16
17use Override;
18
19/**
20 * Team Fortress 2 protocol implementation.
21 *
22 * Based on Steam/Source protocol.
23 */
24class Tf2 extends Steam
25{
26    /**
27     * Protocol name.
28     */
29    public string $name = 'Team Fortress 2';
30
31    /**
32     * List of supported games.
33     *
34     * @var array<string>
35     */
36    public array $supportedGames = ['Team Fortress 2'];
37
38    /**
39     * Protocol identifier.
40     */
41    public string $protocol = 'A2S';
42
43    /**
44     * Game series.
45     *
46     * @var array<string>
47     */
48    public array $game_series_list = ['Team Fortress'];
49
50    /**
51     * Team Fortress 2 uses standard Source engine protocol.
52     */
53    #[Override]
54    public function query_server(bool $getPlayers = true, bool $getRules = true): bool
55    {
56        // Use parent implementation but disable players due to parsing issues
57        return parent::query_server(false, $getRules);
58    }
59}