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

nette / latte / 22368407632

24 Feb 2026 08:17PM UTC coverage: 94.825% (-0.2%) from 95.054%
22368407632

push

github

dg
phpstan

135 of 147 new or added lines in 38 files covered. (91.84%)

186 existing lines in 70 files now uncovered.

5534 of 5836 relevant lines covered (94.83%)

0.95 hits per line

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

70.0
/src/Latte/Compiler/Nodes/Php/Expression/InNode.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\Expression;
9

10
use Latte\Compiler\Nodes\Php\ExpressionNode;
11
use Latte\Compiler\Position;
12
use Latte\Compiler\PrintContext;
13

14

15
/**
16
 * Latte's `in` operator compiled to in_array() with strict mode.
17
 */
18
class InNode extends ExpressionNode
19
{
20
        public function __construct(
1✔
21
                public ExpressionNode $needle,
22
                public ExpressionNode $haystack,
23
                public ?Position $position = null,
24
        ) {
25
        }
1✔
26

27

28
        public function print(PrintContext $context): string
1✔
29
        {
30
                return 'in_array('
31
                        . $this->needle->print($context)
1✔
32
                        . ', '
1✔
33
                        . $this->haystack->print($context)
1✔
34
                        . ', true)';
1✔
35
        }
36

37

UNCOV
38
        public function &getIterator(): \Generator
×
39
        {
40
                yield $this->needle;
×
UNCOV
41
                yield $this->haystack;
×
42
        }
43
}
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