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

mimmi20 / browser-detector / 18531733666

15 Oct 2025 02:08PM UTC coverage: 95.76% (-0.5%) from 96.217%
18531733666

push

github

web-flow
Merge pull request #1004 from mimmi20/updates

add new devices

193 of 233 new or added lines in 23 files covered. (82.83%)

3 existing lines in 1 file now uncovered.

7996 of 8350 relevant lines covered (95.76%)

13.39 hits per line

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

50.0
/src/Parser/Header/SetVersionTrait.php
1
<?php
2

3
/**
4
 * This file is part of the browser-detector package.
5
 *
6
 * Copyright (c) 2012-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 BrowserDetector\Parser\Header;
15

16
use BrowserDetector\Version\Exception\NotNumericException;
17
use BrowserDetector\Version\NullVersion;
18
use BrowserDetector\Version\VersionBuilder;
19
use BrowserDetector\Version\VersionInterface;
20

21
trait SetVersionTrait
22
{
23
    /** @throws void */
24
    private function setVersion(string $version): VersionInterface
189✔
25
    {
26
        try {
27
            return (new VersionBuilder())->set($version);
189✔
NEW
28
        } catch (NotNumericException) {
×
NEW
29
            return new NullVersion();
×
30
        }
31
    }
32
}
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