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

azjezz / psl / 18741470771

23 Oct 2025 07:53AM UTC coverage: 98.539% (-0.03%) from 98.572%
18741470771

Pull #546

github

web-flow
Merge c4d29a3c2 into 214bddddd
Pull Request #546: feat: add Tree component for hierarchical data structures

136 of 140 new or added lines in 23 files covered. (97.14%)

2 existing lines in 1 file now uncovered.

5935 of 6023 relevant lines covered (98.54%)

50.43 hits per line

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

66.67
/src/Psl/Tree/LeafNode.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Psl\Tree;
6

7
use Override;
8

9
/**
10
 * Immutable leaf node implementation (node with no children).
11
 *
12
 * @template T
13
 *
14
 * @implements NodeInterface<T>
15
 */
16
final readonly class LeafNode implements NodeInterface
17
{
18
    /**
19
     * @param T $value
20
     */
21
    public function __construct(
22
        private mixed $value,
23
    ) {}
66✔
24

25
    /**
26
     * @return T
27
     *
28
     * @psalm-mutation-free
29
     */
30
    #[Override]
31
    public function getValue(): mixed
32
    {
33
        return $this->value;
49✔
34
    }
35

36
    /**
37
     * @return array{value: T, ...}
38
     */
39
    #[Override]
40
    public function jsonSerialize(): array
41
    {
NEW
42
        return namespace\to_array($this);
×
43
    }
44
}
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