Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 2
CRAP
0.00% covered (danger)
0.00%
0 / 1
Homefront
0.00% covered (danger)
0.00%
0 / 4
0.00% covered (danger)
0.00%
0 / 2
42
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
30
 getProtocolName
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
1<?php declare(strict_types=1);
2
3/**
4 * Clansuite Server Query
5 *
6 * SPDX-FileCopyrightText: 2003-2025 Jens A. Koch
7 * SPDX-License-Identifier: MIT
8 *
9 * For the full copyright and license information, please view
10 * the LICENSE file that was distributed with this source code.
11 */
12
13namespace Clansuite\ServerQuery\ServerProtocols;
14
15use function is_int;
16use function is_string;
17use Clansuite\Capture\Protocol\ProtocolInterface;
18use Override;
19
20/**
21 * Homefront protocol implementation.
22 *
23 * Extends Steam protocol.
24 */
25class Homefront extends Steam implements ProtocolInterface
26{
27    /**
28     * Protocol name.
29     */
30    public string $name = 'Homefront';
31
32    /**
33     * List of supported games.
34     *
35     * @var array<string>
36     */
37    public array $supportedGames = ['Homefront'];
38
39    /**
40     * Protocol identifier.
41     */
42    public string $protocol = 'source';
43
44    /**
45     * Constructor.
46     */
47    public function __construct(mixed $address = null, mixed $queryport = null)
48    {
49        $address   = $address === null ? null : (is_string($address) ? $address : null);
50        $queryport = $queryport === null ? null : (is_int($queryport) ? $queryport : null);
51        parent::__construct($address, $queryport);
52    }
53
54    /**
55     * getProtocolName method.
56     */
57    #[Override]
58    public function getProtocolName(): string
59    {
60        return $this->protocol;
61    }
62}