Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/php-static-scanner-instrumentalization.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php')
-rw-r--r--vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php
new file mode 100644
index 0000000..98bda35
--- /dev/null
+++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/If_.php
@@ -0,0 +1,39 @@
+<?php
+
+namespace PhpParser\Node\Stmt;
+
+use PhpParser\Node;
+
+class If_ extends Node\Stmt
+{
+ /** @var Node\Expr Condition expression */
+ public $cond;
+ /** @var Node[] Statements */
+ public $stmts;
+ /** @var ElseIf_[] Elseif clauses */
+ public $elseifs;
+ /** @var null|Else_ Else clause */
+ public $else;
+
+ /**
+ * Constructs an if node.
+ *
+ * @param Node\Expr $cond Condition
+ * @param array $subNodes Array of the following optional subnodes:
+ * 'stmts' => array(): Statements
+ * 'elseifs' => array(): Elseif clauses
+ * 'else' => null : Else clause
+ * @param array $attributes Additional attributes
+ */
+ public function __construct(Node\Expr $cond, array $subNodes = array(), array $attributes = array()) {
+ parent::__construct($attributes);
+ $this->cond = $cond;
+ $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
+ $this->elseifs = isset($subNodes['elseifs']) ? $subNodes['elseifs'] : array();
+ $this->else = isset($subNodes['else']) ? $subNodes['else'] : null;
+ }
+
+ public function getSubNodeNames() {
+ return array('cond', 'stmts', 'elseifs', 'else');
+ }
+}