function IfStatement::setConsequent
Sets the statement that is activated if the test expression is true
Parameters
Statement|FunctionDeclaration $consequent The consequent expression:
Return value
$this
File
-
vendor/
mck89/ peast/ lib/ Peast/ Syntax/ Node/ IfStatement.php, line 92
Class
- IfStatement
- A node that represents an if statement. For example: if (test) {} else {}
Namespace
Peast\Syntax\NodeCode
public function setConsequent($consequent) {
$this->assertType($consequent, array(
"Statement",
"FunctionDeclaration",
), true);
$this->consequent = $consequent;
return $this;
}