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

nette / latte / 22836865504

09 Mar 2026 03:15AM UTC coverage: 94.972% (+0.2%) from 94.76%
22836865504

push

github

dg
github actions: code coverage job is non-blocking

5610 of 5907 relevant lines covered (94.97%)

0.95 hits per line

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

72.73
/src/Latte/Compiler/Nodes/Php/ExpressionNode.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;
9

10
use Latte\Compiler\Node;
11

12

13
/**
14
 * Base for PHP expression nodes (variables, operators, calls, literals).
15
 */
16
abstract class ExpressionNode extends Node
17
{
18
        /**
19
         * Checks whether the expression can be used as the target of an assignment.
20
         */
21
        public function isWritable(): bool
22
        {
23
                return $this instanceof Expression\ArrayAccessNode
1✔
24
                        || ($this instanceof Expression\PropertyFetchNode && !$this->nullsafe)
1✔
25
                        || $this instanceof Expression\StaticPropertyFetchNode
1✔
26
                        || $this instanceof Expression\VariableNode;
1✔
27
        }
28

29

30
        /**
31
         * Checks whether the expression represents a variable-like access (variable, property, or array element).
32
         */
33
        public function isVariable(): bool
34
        {
35
                return $this instanceof Expression\ArrayAccessNode
1✔
36
                        || $this instanceof Expression\PropertyFetchNode
1✔
37
                        || $this instanceof Expression\StaticPropertyFetchNode
1✔
38
                        || $this instanceof Expression\VariableNode;
1✔
39
        }
40

41

42
        /**
43
         * Checks whether the expression is a function or method call.
44
         */
45
        public function isCall(): bool
46
        {
47
                return $this instanceof Expression\FunctionCallNode
×
48
                        || $this instanceof Expression\MethodCallNode
×
49
                        || $this instanceof Expression\StaticMethodCallNode;
×
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