• 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

93.33
/src/Latte/Essential/Nodes/DebugbreakNode.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\Php\ExpressionNode;
11
use Latte\Compiler\Nodes\StatementNode;
12
use Latte\Compiler\PrintContext;
13
use Latte\Compiler\Tag;
14

15

16
/**
17
 * {debugbreak [$cond]}
18
 * Triggers debugger breakpoint.
19
 */
20
class DebugbreakNode extends StatementNode
21
{
22
        public ?ExpressionNode $condition;
23

24

25
        public static function create(Tag $tag): static
1✔
26
        {
27
                $node = new static;
1✔
28
                $node->condition = $tag->parser->isEnd() ? null : $tag->parser->parseExpression();
1✔
29
                return $node;
1✔
30
        }
31

32

33
        public function print(PrintContext $context): string
1✔
34
        {
35
                if (function_exists($func = 'debugbreak') || function_exists($func = 'xdebug_break')) {
1✔
36
                        return $context->format(
1✔
37
                                ($this->condition ? 'if (%1.node) ' : '') . $func . '() %0.line;',
1✔
38
                                $this->position,
1✔
39
                                $this->condition,
1✔
40
                        );
41
                }
UNCOV
42
                return '';
×
43
        }
44

45

46
        public function &getIterator(): \Generator
1✔
47
        {
48
                if ($this->condition) {
1✔
49
                        yield $this->condition;
1✔
50
                }
51
        }
1✔
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