• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mimmi20 / ua-generic-request / 20374778817

19 Dec 2025 03:38PM UTC coverage: 98.837%. First build
20374778817

Pull #510

github

mimmi20
add sec-ch-ua-wow64 Header
Pull Request #510: add sec-ch-ua-wow64 Header

20 of 24 new or added lines in 3 files covered. (83.33%)

340 of 344 relevant lines covered (98.84%)

9.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.59
/src/Header/HeaderTrait.php
1
<?php
2

3
/**
4
 * This file is part of the mimmi20/ua-generic-request package.
5
 *
6
 * Copyright (c) 2015-2025, Thomas Mueller <mimmi20@live.de>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11

12
declare(strict_types = 1);
13

14
namespace UaRequest\Header;
15

16
use BrowserDetector\Version\NullVersion;
17
use BrowserDetector\Version\VersionInterface;
18
use Override;
19
use UaData\EngineInterface;
20
use UaData\OsInterface;
21
use UaRequest\Exception\NotFoundException;
22
use UaResult\Bits\Bits;
23
use UaResult\Device\Architecture;
24
use UaResult\Device\FormFactor;
25

26
// @phpcs:disable SlevomatCodingStandard.Classes.RequireConstructorPropertyPromotion.RequiredConstructorPropertyPromotion
27
trait HeaderTrait
28
{
29
    private string $value;
30

31
    /** @throws void */
32
    public function __construct(string $value)
37✔
33
    {
34
        $this->value = $value;
37✔
35
    }
36

37
    /**
38
     * Retrieve header value
39
     *
40
     * @throws void
41
     */
42
    #[Override]
52✔
43
    public function getValue(): string
44
    {
45
        return $this->value;
52✔
46
    }
47

48
    /**
49
     * Retrieve normalized header value
50
     *
51
     * @throws void
52
     */
53
    #[Override]
37✔
54
    public function getNormalizedValue(): string
55
    {
56
        return $this->value;
37✔
57
    }
58

59
    /** @throws void */
60
    #[Override]
32✔
61
    public function hasDeviceArchitecture(): bool
62
    {
63
        return false;
32✔
64
    }
65

66
    /** @throws void */
67
    #[Override]
32✔
68
    public function getDeviceArchitecture(): Architecture
69
    {
70
        return Architecture::unknown;
32✔
71
    }
72

73
    /** @throws void */
74
    #[Override]
29✔
75
    public function hasDeviceFormFactor(): bool
76
    {
77
        return false;
29✔
78
    }
79

80
    /**
81
     * @return list<FormFactor>
82
     *
83
     * @throws void
84
     */
85
    #[Override]
29✔
86
    public function getDeviceFormFactor(): array
87
    {
88
        return [FormFactor::unknown];
29✔
89
    }
90

91
    /** @throws void */
92
    #[Override]
32✔
93
    public function hasDeviceBitness(): bool
94
    {
95
        return false;
32✔
96
    }
97

98
    /** @throws void */
99
    #[Override]
32✔
100
    public function getDeviceBitness(): Bits
101
    {
102
        return Bits::unknown;
32✔
103
    }
104

105
    /** @throws void */
106
    #[Override]
29✔
107
    public function hasDeviceIsMobile(): bool
108
    {
109
        return false;
29✔
110
    }
111

112
    /** @throws void */
113
    #[Override]
29✔
114
    public function getDeviceIsMobile(): bool | null
115
    {
116
        return null;
29✔
117
    }
118

119
    /** @throws void */
120
    #[Override]
38✔
121
    public function hasDeviceCode(): bool
122
    {
123
        return false;
38✔
124
    }
125

126
    /** @throws void */
127
    #[Override]
38✔
128
    public function getDeviceCode(): string | null
129
    {
130
        return null;
38✔
131
    }
132

133
    /** @throws void */
NEW
134
    #[Override]
×
135
    public function hasDeviceIsWow64(): bool
136
    {
NEW
137
        return false;
×
138
    }
139

140
    /** @throws void */
NEW
141
    #[Override]
×
142
    public function getDeviceIsWow64(): bool | null
143
    {
NEW
144
        return null;
×
145
    }
146

147
    /** @throws void */
148
    #[Override]
39✔
149
    public function hasClientCode(): bool
150
    {
151
        return false;
39✔
152
    }
153

154
    /** @throws void */
155
    #[Override]
39✔
156
    public function getClientCode(): string | null
157
    {
158
        return null;
39✔
159
    }
160

161
    /** @throws void */
162
    #[Override]
38✔
163
    public function hasClientVersion(): bool
164
    {
165
        return false;
38✔
166
    }
167

168
    /**
169
     * @throws void
170
     *
171
     * @phpcsSuppress SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter
172
     */
173
    #[Override]
38✔
174
    public function getClientVersion(string | null $code = null): VersionInterface
175
    {
176
        return new NullVersion();
38✔
177
    }
178

179
    /** @throws void */
180
    #[Override]
38✔
181
    public function hasPlatformCode(): bool
182
    {
183
        return false;
38✔
184
    }
185

186
    /**
187
     * @throws NotFoundException
188
     *
189
     * @phpcsSuppress SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter
190
     */
191
    #[Override]
38✔
192
    public function getPlatformCode(string | null $derivate = null): OsInterface
193
    {
194
        throw new NotFoundException();
38✔
195
    }
196

197
    /** @throws void */
198
    #[Override]
42✔
199
    public function hasPlatformVersion(): bool
200
    {
201
        return false;
42✔
202
    }
203

204
    /**
205
     * @throws void
206
     *
207
     * @phpcsSuppress SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter
208
     */
209
    #[Override]
42✔
210
    public function getPlatformVersion(string | null $code = null): VersionInterface
211
    {
212
        return new NullVersion();
42✔
213
    }
214

215
    /** @throws void */
216
    #[Override]
41✔
217
    public function hasEngineCode(): bool
218
    {
219
        return false;
41✔
220
    }
221

222
    /** @throws NotFoundException */
223
    #[Override]
41✔
224
    public function getEngineCode(): EngineInterface
225
    {
226
        throw new NotFoundException();
41✔
227
    }
228

229
    /** @throws void */
230
    #[Override]
42✔
231
    public function hasEngineVersion(): bool
232
    {
233
        return false;
42✔
234
    }
235

236
    /**
237
     * @throws void
238
     *
239
     * @phpcsSuppress SlevomatCodingStandard.Functions.UnusedParameter.UnusedParameter
240
     */
241
    #[Override]
42✔
242
    public function getEngineVersion(string | null $code = null): VersionInterface
243
    {
244
        return new NullVersion();
42✔
245
    }
246
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc