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

move-elevator / composer-translation-validator / 16137064113

08 Jul 2025 07:41AM UTC coverage: 78.302% (-16.2%) from 94.526%
16137064113

Pull #19

github

web-flow
Merge 5f8b3255c into 3e904fb25
Pull Request #19: refactor: improve output style

93 of 278 new or added lines in 7 files covered. (33.45%)

103 existing lines in 7 files now uncovered.

830 of 1060 relevant lines covered (78.3%)

4.18 hits per line

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

92.31
/src/Utility/PathUtility.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace MoveElevator\ComposerTranslationValidator\Utility;
6

7
class PathUtility
8
{
9
    public static function normalizeFolderPath(string $path): string
11✔
10
    {
11
        $realPath = realpath($path);
11✔
12
        if (false === $realPath) {
11✔
13
            // If realpath fails, it might be a non-existent path, return as is but normalized
14
            $normalizedPath = rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
8✔
15
            if (str_starts_with($normalizedPath, './')) {
8✔
16
                $normalizedPath = substr($normalizedPath, 2);
1✔
17
            }
18

19
            return $normalizedPath;
8✔
20
        }
21

22
        $cwd = realpath(getcwd()).DIRECTORY_SEPARATOR;
3✔
23
        $normalizedPath = rtrim($realPath, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
3✔
24

25
        if (str_starts_with($normalizedPath, $cwd)) {
3✔
26
            $relativePath = substr($normalizedPath, strlen($cwd));
3✔
27

28
            return $relativePath;
3✔
29
        }
30

UNCOV
31
        return $normalizedPath;
×
32
    }
33
}
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