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

orchestral / sidekick / 20588655647

30 Dec 2025 04:11AM UTC coverage: 91.943% (-0.1%) from 92.04%
20588655647

push

github

crynobone
Merge branch '1.1.x' into 1.2.x

9 of 10 new or added lines in 2 files covered. (90.0%)

194 of 211 relevant lines covered (91.94%)

6.45 hits per line

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

85.71
/src/Filesystem/functions.php
1
<?php
2

3
namespace Orchestra\Sidekick\Filesystem;
4

5
use ReflectionClass;
6

7
if (! \function_exists('Orchestra\Sidekick\Filesystem\filename_from_classname')) {
8
    /**
9
     * Resolve filename from classname.
10
     *
11
     * @api
12
     *
13
     * @param  class-string  $className
14
     */
15
    function filename_from_classname(string $className): string|false
16
    {
17
        if (! class_exists($className, false)) {
1✔
18
            return false;
1✔
19
        }
20

21
        $classFileName = (new ReflectionClass($className))->getFileName();
1✔
22

23
        if (
24
            $classFileName === false
1✔
25
            || (! is_file($classFileName) && ! str_ends_with(strtolower($classFileName), '.php'))
1✔
26
        ) {
NEW
27
            return false;
×
28
        }
29

30
        return realpath($classFileName);
1✔
31
    }
32
}
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