• 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/TailServerLogCommand.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\LogLanguage\LogLanguage;
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 TailServerLogCommand
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:server', description: 'Tails the server log')]
×
25
    public function __invoke(): void
26
    {
UNCOV
27
        $serverLogPath = $this->logConfig->serverLogPath;
×
28

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

UNCOV
32
            return;
×
33
        }
34

UNCOV
35
        if (! file_exists($serverLogPath)) {
×
36
            $this->console->error("No valid server log at <file='{$serverLogPath}'/>");
×
37

UNCOV
38
            return;
×
39
        }
40

UNCOV
41
        $this->console->header('Tailing server logs', "Reading <file='{$serverLogPath}'/>…");
×
42

UNCOV
43
        new TailReader()->tail(
×
44
            path: $serverLogPath,
×
45
            format: fn (string $text) => $this->highlighter->parse(
×
46
                $text,
×
47
                new LogLanguage(),
×
48
            ),
×
49
        );
×
50
    }
51
}
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