We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2581d4 commit f3a59a8Copy full SHA for f3a59a8
app/Parser/Parse.php
@@ -8,7 +8,7 @@
8
9
class Parse
10
{
11
- public static $lastNode = null;
+ public static $debug = false;
12
13
public static function parse(Node $node, $depth = 0, ?AbstractContext $currentContext = null)
14
@@ -75,11 +75,15 @@ protected static function getCodeSnippet(Node $node)
75
76
protected static function debug($depth, ...$messages)
77
78
- echo str_repeat(' ', $depth) . implode(' ', $messages) . PHP_EOL;
+ if (self::$debug) {
79
+ echo str_repeat(' ', $depth) . implode(' ', $messages) . PHP_EOL;
80
+ }
81
}
82
83
protected static function debugBreak()
84
- echo PHP_EOL;
85
86
+ echo PHP_EOL;
87
88
89
0 commit comments