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

tempestphp / tempest-framework / 14073185847

25 Mar 2025 06:56PM UTC coverage: 79.311% (-0.04%) from 79.353%
14073185847

push

github

web-flow
feat(database): store default sqlite database in internal storage (#1075)

1 of 1 new or added line in 1 file covered. (100.0%)

12 existing lines in 2 files now uncovered.

10500 of 13239 relevant lines covered (79.31%)

91.11 hits per line

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

50.0
/src/Tempest/Router/src/functions.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest {
6
    use Tempest\Reflection\MethodReflector;
7
    use Tempest\Router\Router;
8

9
    /**
10
     * Creates a valid URI to the given controller `$action`.
11
     */
12
    function uri(array|string|MethodReflector $action, mixed ...$params): string
13
    {
14
        if ($action instanceof MethodReflector) {
14✔
15
            $action = [
2✔
16
                $action->getDeclaringClass()->getName(),
2✔
17
                $action->getName(),
2✔
18
            ];
2✔
19
        }
20

21
        $router = get(Router::class);
14✔
22

23
        return $router->toUri(
14✔
24
            $action,
14✔
25
            ...$params,
14✔
26
        );
14✔
27
    }
28

29
    /**
30
     * Checks whether the given controller action matches the current URI.
31
     */
32
    function is_current_uri(array|string|MethodReflector $action, mixed ...$params): bool
33
    {
UNCOV
34
        if ($action instanceof MethodReflector) {
×
UNCOV
35
            $action = [
×
UNCOV
36
                $action->getDeclaringClass()->getName(),
×
UNCOV
37
                $action->getName(),
×
UNCOV
38
            ];
×
39
        }
40

UNCOV
41
        $router = get(Router::class);
×
42

UNCOV
43
        return $router->isCurrentUri(
×
UNCOV
44
            $action,
×
UNCOV
45
            ...$params,
×
UNCOV
46
        );
×
47
    }
48
}
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