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

diego-ninja / granite / 16608963009

29 Jul 2025 10:37PM UTC coverage: 50.423%. First build
16608963009

Pull #5

github

web-flow
Merge 43d8840d7 into 6a6caca51
Pull Request #5: code: adds phpstan level max, pint with per and github actions

321 of 632 new or added lines in 77 files covered. (50.79%)

1132 of 2245 relevant lines covered (50.42%)

9.88 hits per line

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

75.0
/src/Support/StringHelper.php
1
<?php
2

3
namespace Ninja\Granite\Support;
4

5
/**
6
 * String helper utilities for cross-version PHP compatibility.
7
 */
8
class StringHelper
9
{
10
    /**
11
     * Multibyte-safe trim function.
12
     * Uses mb_trim() if available (PHP 8.4+), otherwise falls back to trim().
13
     *
14
     * @param string $string The string to trim
15
     * @param string $characters Characters to trim (same as trim() parameter)
16
     * @return string The trimmed string
17
     */
18
    public static function mbTrim(string $string, string $characters = " \n\r\t\v\0"): string
15✔
19
    {
20
        if (function_exists('mb_trim')) {
15✔
21
            return mb_trim($string, $characters);
15✔
22
        }
23

NEW
24
        return trim($string, $characters);
×
25
    }
26
}
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