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

nette / latte / 15809643126

22 Jun 2025 06:35PM UTC coverage: 93.67% (+0.09%) from 93.583%
15809643126

push

github

dg
added {include?} {import?} {embed?} {sandbox?}

34 of 36 new or added lines in 7 files covered. (94.44%)

164 existing lines in 43 files now uncovered.

5164 of 5513 relevant lines covered (93.67%)

0.94 hits per line

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

90.91
/src/Latte/Compiler/Nodes/Php/Expression/MethodCallableNode.php
1
<?php
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
declare(strict_types=1);
9

10
namespace Latte\Compiler\Nodes\Php\Expression;
11

12
use Latte\Compiler\Nodes\Php\ExpressionNode;
13
use Latte\Compiler\Nodes\Php\IdentifierNode;
14
use Latte\Compiler\Position;
15
use Latte\Compiler\PrintContext;
16
use const PHP_VERSION_ID;
17

18

19
class MethodCallableNode extends ExpressionNode
20
{
21
        public function __construct(
1✔
22
                public ExpressionNode $object,
23
                public IdentifierNode|ExpressionNode $name,
24
                public ?Position $position = null,
25
        ) {
26
        }
1✔
27

28

29
        public function print(PrintContext $context): string
1✔
30
        {
31
                return PHP_VERSION_ID < 80100
1✔
UNCOV
32
                        ? '[' . $this->object->print($context) . ', ' . $context->memberAsString($this->name) . ']'
×
33
                        : $context->dereferenceExpr($this->object)
1✔
34
                                . '->' . $context->objectProperty($this->name) . '(...)';
1✔
35
        }
36

37

38
        public function &getIterator(): \Generator
1✔
39
        {
40
                yield $this->object;
1✔
41
                yield $this->name;
1✔
42
        }
1✔
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