-
-
Notifications
You must be signed in to change notification settings - Fork 343
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PHP 8.0] Move more logic to MatchFactory (#2802)
Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
6712529
commit 4bc378b
Showing
3 changed files
with
125 additions
and
70 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
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
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,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Php80\ValueObject; | ||
|
||
use PhpParser\Node\Expr\Match_; | ||
|
||
final class MatchResult | ||
{ | ||
public function __construct( | ||
private readonly Match_ $match, | ||
private readonly bool $shouldRemoveNextStmt | ||
) { | ||
} | ||
|
||
public function getMatch(): Match_ | ||
{ | ||
return $this->match; | ||
} | ||
|
||
public function shouldRemoveNextStmt(): bool | ||
{ | ||
return $this->shouldRemoveNextStmt; | ||
} | ||
} |