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

tempestphp / tempest-framework / 14376974931

10 Apr 2025 09:23AM UTC coverage: 81.299%. First build
14376974931

Pull #1133

github

web-flow
Merge 24eb47a0f into 30f012d4e
Pull Request #1133: fix(view): don't throw when using a `<table>` element

9 of 21 new or added lines in 4 files covered. (42.86%)

11529 of 14181 relevant lines covered (81.3%)

106.75 hits per line

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

40.91
/src/Tempest/View/src/Parser/TokenCollection.php
1
<?php
2

3
namespace Tempest\View\Parser;
4

5
use ArrayAccess;
6
use ArrayIterator;
7
use IteratorAggregate;
8
use Traversable;
9

10
/**
11
 * @implements IteratorAggregate<\Tempest\View\Parser\Token>
12
 */
13
final class TokenCollection implements IteratorAggregate, ArrayAccess
14
{
15
    public function __construct(
154✔
16
        private array $tokens = [],
17
    ) {}
154✔
18

19
    public function add(Token $token): self
140✔
20
    {
21
        $this->tokens[] = $token;
140✔
22

23
        return $this;
140✔
24
    }
25

26
    public function getIterator(): Traversable
154✔
27
    {
28
        return new ArrayIterator($this->tokens);
154✔
29
    }
30

31
    public function __debugInfo(): array
×
32
    {
33
        return [
×
34
            implode(
×
35
                ', ' . PHP_EOL,
×
36
                array_map(fn (Token $token) => $token->__debugInfo()[0], $this->tokens),
×
37
            ),
×
38
        ];
×
39
    }
40

NEW
41
    public function offsetExists(mixed $offset): bool
×
42
    {
NEW
43
        return $this->tokens[$offset] ?? false;
×
44
    }
45

46
    public function offsetGet(mixed $offset): mixed
38✔
47
    {
48
        return $this->tokens[$offset] ?? null;
38✔
49
    }
50

NEW
51
    public function offsetSet(mixed $offset, mixed $value): void
×
52
    {
NEW
53
        $this->tokens[$offset] = $value;
×
54
    }
55

NEW
56
    public function offsetUnset(mixed $offset): void
×
57
    {
NEW
58
        unset($this->tokens[$offset]);
×
59
    }
60
}
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