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

nette / latte / 29701425453

19 Jul 2026 07:51PM UTC coverage: 94.359% (+0.1%) from 94.22%
29701425453

push

github

dg
{include parent} and {include this} work inside dynamically named blocks

The name of the enclosing block is resolved at runtime from the stack of
blocks being currently rendered, which is shared along the inheritance
chain. Previously this was a compile error, or, when the dynamic block
was nested inside a static one, the include silently bound to the outer
static block.

To be released in 3.1.

20 of 22 new or added lines in 2 files covered. (90.91%)

138 existing lines in 40 files now uncovered.

6273 of 6648 relevant lines covered (94.36%)

0.94 hits per line

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

55.56
/src/Latte/Compiler/Nodes/Php/IntersectionTypeNode.php
1
<?php declare(strict_types=1);
2

3
/**
4
 * This file is part of the Latte (https://latte.nette.org)
5
 * Copyright (c) 2008 David Grudl (https://davidgrudl.com)
6
 */
7

8
namespace Latte\Compiler\Nodes\Php;
9

10
use Latte\Compiler\Position;
11
use Latte\Compiler\PrintContext;
12
use Latte\Helpers;
13

14

15
/**
16
 * Intersection type (Type1&Type2).
17
 */
18
class IntersectionTypeNode extends ComplexTypeNode
19
{
20
        public function __construct(
1✔
21
                /** @var array<IdentifierNode|NameNode> */
22
                public array $types,
23
                public ?Position $position = null,
24
                public ?Position $end = null,
25
        ) {
26
                (function (IdentifierNode|NameNode ...$args) {})(...$types);
1✔
27
        }
1✔
28

29

30
        public function print(PrintContext $context): string
1✔
31
        {
32
                return $context->implode($this->types, '&');
1✔
33
        }
34

35

UNCOV
36
        public function &getIterator(): \Generator
×
37
        {
38
                foreach ($this->types as &$item) {
×
UNCOV
39
                        yield $item;
×
40
                }
UNCOV
41
                Helpers::removeNulls($this->types);
×
42
        }
43
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc