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
L4d2
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 * Left 4 Dead 2 protocol implementation.
21 *
22 * Based on Steam/Source protocol.
23 */
24class L4d2 extends Steam
25{
26    /**
27     * Protocol name.
28     */
29    public string $name = 'Left 4 Dead 2';
30
31    /**
32     * List of supported games.
33     *
34     * @var array<string>
35     */
36    public array $supportedGames = ['Left 4 Dead 2'];
37
38    /**
39     * Protocol identifier.
40     */
41    public string $protocol = 'A2S';
42
43    /**
44     * Left 4 Dead 2 uses standard Source engine protocol.
45     */
46    #[Override]
47    public function query_server(bool $getPlayers = true, bool $getRules = true): bool
48    {
49        // Use parent implementation
50        return parent::query_server($getPlayers, $getRules);
51    }
52}