• 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

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
 */
18
class VarPrintNode extends StatementNode
19
{
20
        public bool $all;
21

22

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

31

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

46

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