Skip to content

Commit

Permalink
Fix optional parameter declared before required parameter implicitly (y…
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw authored Mar 26, 2024
1 parent a292af1 commit 923c309
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
11 changes: 8 additions & 3 deletions tests/framework/console/FakePhp71Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@

class FakePhp71Controller extends Controller
{
public function actionInjection($before, Request $request, $between, DummyService $dummyService, ?Post $post = null, $after)
{

public function actionInjection(
$before,
Request $request,
$between,
DummyService $dummyService,
?Post $post,
$after
) {
}

public function actionNullableInjection(?Request $request, ?Post $post)
Expand Down
11 changes: 8 additions & 3 deletions tests/framework/web/FakePhp71Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ class FakePhp71Controller extends Controller
{
public $enableCsrfValidation = false;

public function actionInjection($before, Request $request, $between, VendorImage $vendorImage, ?Post $post = null, $after)
{

public function actionInjection(
$before,
Request $request,
$between,
VendorImage $vendorImage,
?Post $post,
$after
) {
}

public function actionNullableInjection(?Request $request, ?Post $post)
Expand Down
2 changes: 1 addition & 1 deletion tests/framework/web/FakePhp7Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class FakePhp7Controller extends Controller
{
public $enableCsrfValidation = false;

public function actionAksi1(int $foo, ?float $bar = null, bool $true, bool $false)
public function actionAksi1(int $foo, ?float $bar, bool $true, bool $false)
{
}

Expand Down

0 comments on commit 923c309

Please sign in to comment.