• 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

0.0
/src/Latte/Essential/Nodes/VarPrintNode.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\Essential\Nodes;
9

10
use Latte\Compiler\Nodes\StatementNode;
11
use Latte\Compiler\PrintContext;
12
use Latte\Compiler\Tag;
13

14

15
/**
16
 * {varPrint [all]}
17
 * Suggests {varType} declarations for variables.
18
 */
19
class VarPrintNode extends StatementNode
20
{
21
        public bool $all;
22

23

24
        public static function create(Tag $tag): static
25
        {
UNCOV
26
                $stream = $tag->parser->stream;
×
27
                $node = new static;
×
28
                $node->all = $stream->consume()->text === 'all';
×
29
                return $node;
×
30
        }
31

32

33
        public function print(PrintContext $context): string
34
        {
UNCOV
35
                $vars = $this->all
×
36
                        ? 'get_defined_vars()'
×
37
                        : 'array_diff_key(get_defined_vars(), $this->getParameters())';
×
38
                return <<<XX
UNCOV
39
                        \$ʟ_bp = new Latte\\Essential\\Blueprint;
×
40
                        \$ʟ_bp->printBegin();
UNCOV
41
                        \$ʟ_bp->printVars($vars);
×
42
                        \$ʟ_bp->printEnd();
43
                        exit;
44
                        XX;
45
        }
46

47

UNCOV
48
        public function &getIterator(): \Generator
×
49
        {
50
                false && yield;
51
        }
52
}
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