• 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

78.95
/src/Tempest/Console/src/Components/Interactive/PasswordComponent.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest\Console\Components\Interactive;
6

7
use Tempest\Console\Components\Concerns\HasErrors;
8
use Tempest\Console\Components\Concerns\HasTextInputRenderer;
9
use Tempest\Console\Components\Concerns\RendersControls;
10
use Tempest\Console\Components\Renderers\TextInputRenderer;
11
use Tempest\Console\Components\TextBuffer;
12
use Tempest\Console\HasCursor;
13
use Tempest\Console\InteractiveConsoleComponent;
14
use Tempest\Console\Point;
15
use Tempest\Console\Terminal\Terminal;
16

17
final class PasswordComponent implements InteractiveConsoleComponent, HasCursor
18
{
19
    use HasErrors;
20
    use HasTextInputRenderer;
21
    use RendersControls;
22

23
    public function __construct(
1✔
24
        public string $label = 'Password',
25
    ) {
26
        $this->buffer = new TextBuffer();
1✔
27
        $this->renderer = new TextInputRenderer(maximumLines: 1);
1✔
28
    }
29

30
    public function render(Terminal $terminal): string
1✔
31
    {
32
        $password = $this->buffer->text;
1✔
33

34
        $this->buffer->setText(str_repeat('*', mb_strlen($password)));
1✔
35

36
        $render = $this->renderer->render(
1✔
37
            terminal: $terminal,
1✔
38
            state: $this->state,
1✔
39
            buffer: $this->buffer,
1✔
40
            label: $this->label,
1✔
41
            placeholder: null,
1✔
42
        );
1✔
43

44
        $this->buffer->setText($password);
1✔
45

46
        return $render;
1✔
47
    }
48

UNCOV
49
    public function getCursorPosition(Terminal $terminal): Point
×
50
    {
UNCOV
51
        return $this->renderer->getCursorPosition($terminal, $this->buffer);
×
52
    }
53

UNCOV
54
    public function cursorVisible(): bool
×
55
    {
UNCOV
56
        return true;
×
57
    }
58
}
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