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

nette / latte / 22359082277

24 Feb 2026 04:03PM UTC coverage: 93.959% (+0.05%) from 93.907%
22359082277

push

github

dg
fixed operator ! priority

5273 of 5612 relevant lines covered (93.96%)

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
class IntersectionTypeNode extends ComplexTypeNode
16
{
17
        public function __construct(
1✔
18
                /** @var array<IdentifierNode|NameNode> */
19
                public array $types,
20
                public ?Position $position = null,
21
        ) {
22
                (function (IdentifierNode|NameNode ...$args) {})(...$types);
1✔
23
        }
1✔
24

25

26
        public function print(PrintContext $context): string
1✔
27
        {
28
                return $context->implode($this->types, '&');
1✔
29
        }
30

31

32
        public function &getIterator(): \Generator
×
33
        {
34
                foreach ($this->types as &$item) {
×
35
                        yield $item;
×
36
                }
37
                Helpers::removeNulls($this->types);
×
38
        }
39
}
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