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

kornrunner / php-blurhash / 13845548032

13 Mar 2025 10:07PM UTC coverage: 100.0%. Remained the same
13845548032

push

github

web-flow
github: workflow: updates (#11)

136 of 136 relevant lines covered (100.0%)

4.94 hits per line

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

100.0
/src/DC.php
1
<?php
2

3
namespace kornrunner\Blurhash;
4

5
final class DC {
6

7
    public static function encode(array $value): int {
8
        $rounded_r = Color::tosRGB($value[0]);
5✔
9
        $rounded_g = Color::tosRGB($value[1]);
5✔
10
        $rounded_b = Color::tosRGB($value[2]);
5✔
11
        return ($rounded_r << 16) + ($rounded_g << 8) + $rounded_b;
5✔
12
    }
13

14
    public static function decode(int $value): array {
15
        $r = $value >> 16;
5✔
16
        $g = ($value >> 8) & 255;
5✔
17
        $b = $value & 255;
5✔
18
        return [
5✔
19
            Color::toLinear($r),
5✔
20
            Color::toLinear($g),
5✔
21
            Color::toLinear($b)
5✔
22
        ];
5✔
23
    }
24
}
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