Menu

[r85]: / trunk / PhpCheckstyle / src / StatementItem.php  Maximize  Restore  History

Download this file

32 lines (24 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
* Statement Item class.
*
* This object is stored in the "_branchingStack" array to keep track of nested statements.
*
* Inspired by http://www.phpcompiler.org/doc/latest/grammar.html
*
* @package classes
* @SuppressWarnings checkUnusedVariables
*/
class StatementItem {
var $type = null; // The statement type (CLASS, FUNCTION, ...)
var $name = null; // The statement name
var $line; // The begin line of the statement in the file
// For SWITCH / CASE statements
var $switchHasDefault = false; // indicate that the switch instruction has a case "default" set.
var $caseHasBreak = false; // indicate that the current case has a break instruction
var $caseStartLine = 0; // start line of the currently processed case
// For DO / WHILE statements
var $afterDoStatement = false; // indicate that we have met a DO statement (which will be described in another StatementItem, but it will be closed when we meet the WHILE).
// For heredoc blocks
var $inHeredoc = false; // used to desactivate the encapsedVariable rule inside a heredoc block
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.