Skip to content

Commit 276b252

Browse files
committed
Added constructor for RenameOperation.
Signed-off-by: Dan Ungureanu <udan1107@gmail.com>
1 parent c965a1b commit 276b252

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Components/RenameOperation.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ class RenameOperation extends Component
3434
*/
3535
public $new;
3636

37+
/**
38+
* Constructor.
39+
*
40+
* @param Expression $old Old expression.
41+
* @param Expression $new New expression containing new name.
42+
*/
43+
public function __construct($old = null, $new = null)
44+
{
45+
$this->old = $old;
46+
$this->new = $new;
47+
}
48+
3749
/**
3850
* @param Parser $parser the parser that serves as context
3951
* @param TokensList $list the list of tokens that are being parsed

0 commit comments

Comments
 (0)