-
-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NodeCollector] Add ArrayCallableDynamicMethod value object (#951)
Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
c784110
commit 6bfe013
Showing
3 changed files
with
42 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
packages/NodeCollector/ValueObject/ArrayCallableDynamicMethod.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\NodeCollector\ValueObject; | ||
|
||
use PhpParser\Node\Expr; | ||
|
||
final class ArrayCallableDynamicMethod | ||
{ | ||
public function __construct( | ||
private Expr $callerExpr, | ||
private string $class, | ||
private Expr $method | ||
) { | ||
} | ||
|
||
public function getClass(): string | ||
{ | ||
return $this->class; | ||
} | ||
|
||
public function getMethod(): Expr | ||
{ | ||
return $this->method; | ||
} | ||
|
||
public function getCallerExpr(): Expr | ||
{ | ||
return $this->callerExpr; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters