Debian Codegraph @

vendor/mck89/peast/lib/Peast/Syntax/Node/ExpressionStatement.php

raw
1 <?php
2 /**
3 * This file is part of the Peast package
4 *
5 * (c) Marco Marchiò <[email protected]>
6 *
7 * For the full copyright and license information refer to the LICENSE file
8 * distributed with this source code
9 */
10 namespace Peast\Syntax\Node;
11
12 /**
13 * A node that represents an expression statement and wraps another expression.
14 *
15 * @author Marco Marchiò <[email protected]>
16 */
17 class ExpressionStatement extends Node implements Statement
18 {
19 /**
20 * Map of node properties
21 *
22 * @var array
23 */
24 protected $propertiesMap = array(
25 "expression" => true
26 );
27
28 /**
29 * Wrapped expression
30 *
31 * @var Expression
32 */
33 protected $expression;
34
35 /**
36 * Returns the wrapped expression
37 *
38 * @return Expression
39 */
40 public function getExpression()
41 {
42 return $this->expression;
43 }
44
45 /**
46 * Sets the wrapped expression
47 *
48 * @param Expression $expression Wrapped expression
49 *
50 * @return $this
51 */
52 public function setExpression(Expression $expression)
53 {
54 $this->expression = $expression;
55 return $this;
56 }
57 }