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

markrogoyski / ipv4-subnet-calculator-php / 22473410450

27 Feb 2026 04:56AM UTC coverage: 82.311% (-15.6%) from 97.956%
22473410450

push

github

markrogoyski
Changes for version 5.0.0.

577 of 701 new or added lines in 13 files covered. (82.31%)

577 of 701 relevant lines covered (82.31%)

71.84 hits per line

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

44.44
/src/Internal/Platform.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace IPv4\Internal;
6

7
/**
8
 * Platform compatibility checks.
9
 *
10
 * @internal This class is not part of the public API
11
 */
12
final class Platform
13
{
14
    private static bool $platformChecked = false;
15

16
    /**
17
     * Ensure the platform supports 64-bit integers.
18
     *
19
     * @throws \RuntimeException If running on 32-bit PHP
20
     */
21
    public static function ensure64Bit(): void
22
    {
23
        if (self::$platformChecked) {
1,821✔
24
            return;
1,820✔
25
        }
26

27
        if (\PHP_INT_SIZE < 8) {
1✔
NEW
28
            throw new \RuntimeException(
×
NEW
29
                'IPv4 Subnet Calculator requires 64-bit PHP. ' .
×
NEW
30
                'Current PHP installation is ' . (\PHP_INT_SIZE * 8) . '-bit. ' .
×
NEW
31
                'Please use a 64-bit PHP build.'
×
NEW
32
            );
×
33
        }
34

35
        self::$platformChecked = true;
1✔
36
    }
37
}
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