• 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

76.47
/src/Tempest/Console/src/Output/MemoryOutputBuffer.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest\Console\Output;
6

7
use Tempest\Console\OutputBuffer;
8

9
final class MemoryOutputBuffer implements OutputBuffer
10
{
11
    private array $buffer = [];
12

13
    public function __construct() {}
247✔
14

15
    public function write(string $contents): void
188✔
16
    {
17
        $this->buffer[] = $contents;
188✔
18
    }
19

UNCOV
20
    public function getBufferWithFormatting(): array
×
21
    {
22
        return $this->buffer;
×
23
    }
24

25
    public function getBufferWithoutFormatting(): array
83✔
26
    {
27
        return array_map(
83✔
28
            fn (string $line) => preg_replace('/\x1b\[[0-9;]*m/', '', $line),
83✔
29
            $this->buffer,
83✔
30
        );
83✔
31
    }
32

33
    public function asUnformattedString(): string
81✔
34
    {
35
        return implode('', $this->getBufferWithoutFormatting());
81✔
36
    }
37

UNCOV
38
    public function asFormattedString(): string
×
39
    {
40
        return implode('', $this->buffer);
×
41
    }
42

43
    public function clear(): self
71✔
44
    {
45
        $this->buffer = [];
71✔
46

47
        return $this;
71✔
48
    }
49
}
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