-
-
Notifications
You must be signed in to change notification settings - Fork 371
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodeQuality] Handle crash inside block statement with unreachable st…
…atement on OptionalParametersAfterRequiredRector (#6640)
- Loading branch information
1 parent
c20860d
commit f3242bf
Showing
3 changed files
with
32 additions
and
2 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...Method/OptionalParametersAfterRequiredRector/Fixture/skip_inside_block_statements.php.inc
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,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\CodeQuality\Rector\ClassMethod\OptionalParametersAfterRequiredRector\Fixture; | ||
|
||
class SkipInsideBlockStatements | ||
{ | ||
private function handlePlugin(Request $request) | ||
{ | ||
{ | ||
$form = $this->createForm(ArticleFormType::class, $article); | ||
return $this->render('Article/edit.html.twig', [ | ||
'media' => $media, | ||
'form' => $form->createView(), | ||
'headline' => $headline, | ||
'article' => $article | ||
]); | ||
|
||
$form = $this->createForm(HeadlineType::class, $headline); | ||
return $this->render('headline/new.html.twig', [ | ||
'headline' => $headline, | ||
'media' => $media, | ||
'form' => $form->createView(), | ||
]); | ||
} | ||
} | ||
} |
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