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

tempestphp / tempest-framework / 14024978163

23 Mar 2025 05:55PM UTC coverage: 79.391% (-0.05%) from 79.441%
14024978163

push

github

web-flow
feat(view): cache Blade and Twig templates in internal storage (#1061)

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

912 existing lines in 110 files now uncovered.

10478 of 13198 relevant lines covered (79.39%)

91.09 hits per line

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

18.18
/src/Tempest/Console/src/Exceptions/InvalidEnumArgument.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest\Console\Exceptions;
6

7
use BackedEnum;
8
use Tempest\Console\Console;
9

10
use function array_map;
11
use function gettype;
12
use function implode;
13
use function is_string;
14

15
final class InvalidEnumArgument extends ConsoleException
16
{
17
    /**
18
     * @param class-string<BackedEnum> $argumentType
19
     */
20
    public function __construct(
1✔
21
        private string $argumentName,
22
        private string $argumentType,
23
        private mixed $value,
24
    ) {
25
    }
1✔
26

UNCOV
27
    public function render(Console $console): void
×
28
    {
29
        if (is_string($this->value) || is_numeric($this->value)) {
×
UNCOV
30
            $value = "`{$this->value}`";
×
31
        } else {
UNCOV
32
            $value = 'of type `' . gettype($this->value) . '`';
×
33
        }
34

35
        $cases = array_map(
×
36
            callback: fn (BackedEnum $case) => $case->value,
×
37
            array: $this->argumentType::cases(),
×
38
        );
×
UNCOV
39
        $console->error("Invalid argument {$value} for `{$this->argumentName}` argument, valid values are: " . implode(', ', $cases));
×
40
    }
41
}
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