Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7420558
ReturnStatement.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ReturnStatement.php
View Options
<?php
/**
* This file is part of the Peast package
*
* (c) Marco Marchiò <marco.mm89@gmail.com>
*
* For the full copyright and license information refer to the LICENSE file
* distributed with this source code
*/
namespace
Peast\Syntax\Node
;
/**
* A node that represents the return statement inside functions.
* For example: return a + 1
*
* @author Marco Marchiò <marco.mm89@gmail.com>
*/
class
ReturnStatement
extends
Node
implements
Statement
{
/**
* Map of node properties
*
* @var array
*/
protected
$propertiesMap
=
array
(
"argument"
=>
true
);
/**
* Optional expression after the return keyword
*
* @var Expression
*/
protected
$argument
;
/**
* Returns the expression after the return keyword
*
* @return Expression
*/
public
function
getArgument
()
{
return
$this
->
argument
;
}
/**
* Sets the expression after the return keyword
*
* @param Expression $argument The expression to return
*
* @return $this
*/
public
function
setArgument
(
$argument
)
{
$this
->
assertType
(
$argument
,
"Expression"
,
true
);
$this
->
argument
=
$argument
;
return
$this
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 22, 05:02 (1 d, 4 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b8/c6/1b9a34682b16e6cbdd4bedadd070
Default Alt Text
ReturnStatement.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment