/usr/share/php/PhpParser/Node/Stmt/Foreach_.php is in php-parser 1.0.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 33 34 35 36 37 38 39 | <?php
namespace PhpParser\Node\Stmt;
use PhpParser\Node;
/**
* @property Node\Expr $expr Expression to iterate
* @property null|Node\Expr $keyVar Variable to assign key to
* @property bool $byRef Whether to assign value by reference
* @property Node\Expr $valueVar Variable to assign value to
* @property Node[] $stmts Statements
*/
class Foreach_ extends Node\Stmt
{
/**
* Constructs a foreach node.
*
* @param Node\Expr $expr Expression to iterate
* @param Node\Expr $valueVar Variable to assign value to
* @param array $subNodes Array of the following optional subnodes:
* 'keyVar' => null : Variable to assign key to
* 'byRef' => false : Whether to assign value by reference
* 'stmts' => array(): Statements
* @param array $attributes Additional attributes
*/
public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = array(), array $attributes = array()) {
parent::__construct(
array(
'expr' => $expr,
'keyVar' => isset($subNodes['keyVar']) ? $subNodes['keyVar'] : null,
'byRef' => isset($subNodes['byRef']) ? $subNodes['byRef'] : false,
'valueVar' => $valueVar,
'stmts' => isset($subNodes['stmts']) ? $subNodes['stmts'] : array(),
),
$attributes
);
}
}
|