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

NexusPHP / framework / 12657354225

07 Jan 2025 06:43PM UTC coverage: 100.0%. Remained the same
12657354225

Pull #8

github

web-flow
Merge 84ab458a9 into 8baacd33d
Pull Request #8: Implement Nexus Encryption v2

35 of 35 new or added lines in 12 files covered. (100.0%)

993 of 993 relevant lines covered (100.0%)

7.95 hits per line

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

100.0
/src/Nexus/Encryption/BinaryStr.php
1
<?php
2

3
declare(strict_types=1);
4

5
/**
6
 * This file is part of the Nexus framework.
7
 *
8
 * (c) John Paul E. Balandan, CPA <paulbalandan@gmail.com>
9
 *
10
 * For the full copyright and license information, please view
11
 * the LICENSE file that was distributed with this source code.
12
 */
13

14
namespace Nexus\Encryption;
15

16
/**
17
 * Binary string operations wrapping on related `mb_*` functions.
18
 */
19
final class BinaryStr
20
{
21
    /**
22
     * Get the length of a binary string.
23
     */
24
    public static function strlen(#[\SensitiveParameter] string $string): int
25
    {
26
        return mb_strlen($string, '8bit');
2✔
27
    }
28

29
    /**
30
     * Get a substring of a binary string.
31
     */
32
    public static function substr(#[\SensitiveParameter] string $string, int $start, ?int $length = null): string
33
    {
34
        return mb_substr($string, $start, $length, '8bit');
2✔
35
    }
36
}
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

© 2025 Coveralls, Inc