| 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 a function declaration |
| 14 |
* For example: function test () {} |
| 15 |
* |
| 16 |
* @author Marco Marchiò <[email protected]> |
| 17 |
*/ |
| 18 |
class FunctionDeclaration extends Function_ implements Declaration |
| 19 |
{ |
| 20 |
/** |
| 21 |
* Sets the function identifier |
| 22 |
* |
| 23 |
* @param Identifier $id Function identifier |
| 24 |
* |
| 25 |
* @return $this |
| 26 |
*/ |
| 27 |
public function setId($id) |
| 28 |
{ |
| 29 |
$this->assertType($id, "Identifier"); |
| 30 |
$this->id = $id; |
| 31 |
return $this; |
| 32 |
} |
| 33 |
} |