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

tempestphp / tempest-framework / 14049246919

24 Mar 2025 09:42PM UTC coverage: 79.353% (-0.04%) from 79.391%
14049246919

push

github

web-flow
feat(support): support array parameters in string manipulations (#1073)

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

735 existing lines in 126 files now uncovered.

10492 of 13222 relevant lines covered (79.35%)

90.78 hits per line

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

0.0
/src/Tempest/Console/src/Commands/TailDebugLogCommand.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest\Console\Commands;
6

7
use Tempest\Console\Console;
8
use Tempest\Console\ConsoleCommand;
9
use Tempest\Console\Highlight\VarExportLanguage\VarExportLanguage;
10
use Tempest\Console\Output\TailReader;
11
use Tempest\Container\Tag;
12
use Tempest\Highlight\Highlighter;
13
use Tempest\Log\LogConfig;
14

15
final readonly class TailDebugLogCommand
16
{
17
    public function __construct(
×
18
        private Console $console,
19
        private LogConfig $logConfig,
20
        #[Tag('console')]
21
        private Highlighter $highlighter,
UNCOV
22
    ) {}
×
23

UNCOV
24
    #[ConsoleCommand('tail:debug', description: 'Tails the debug log')]
×
25
    public function __invoke(): void
26
    {
UNCOV
27
        $debugLogPath = $this->logConfig->debugLogPath;
×
28

UNCOV
29
        if (! $debugLogPath) {
×
30
            $this->console->error('No debug log configured in <code>LogConfig</code>.');
×
31

UNCOV
32
            return;
×
33
        }
34

UNCOV
35
        $dir = pathinfo($debugLogPath, PATHINFO_DIRNAME);
×
36

UNCOV
37
        if (! is_dir($dir)) {
×
38
            mkdir($dir);
×
39
        }
40

UNCOV
41
        if (! file_exists($debugLogPath)) {
×
42
            touch($debugLogPath);
×
43
        }
44

UNCOV
45
        $this->console->header('Tailing debug logs', "Reading <file='{$debugLogPath}'/>…");
×
46

UNCOV
47
        new TailReader()->tail(
×
48
            path: $debugLogPath,
×
49
            format: fn (string $text) => $this->highlighter->parse(
×
50
                $text,
×
51
                new VarExportLanguage(),
×
52
            ),
×
53
        );
×
54
    }
55
}
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