-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Bug fix on redirect route to to route transformation * Redirect back to back helper transformation fix 1) Argument missing fix 2) Last child can not be deleted. * rename classes * Code fixes
- Loading branch information
1 parent
6043322
commit 02c1eb7
Showing
10 changed files
with
173 additions
and
34 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
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
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
41 changes: 41 additions & 0 deletions
41
tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/fixture_with_argument.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,41 @@ | ||
<?php | ||
|
||
namespace RectorLaravel\Tests\Rector\MethodCall\RedirectBackToBackHelperRector\Fixture; | ||
|
||
use Illuminate\Support\Facades\Redirect; | ||
|
||
class FixtureWithArgument | ||
{ | ||
public function store() | ||
{ | ||
return redirect()->back(302); | ||
} | ||
|
||
public function update() | ||
{ | ||
return Redirect::back(302); | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace RectorLaravel\Tests\Rector\MethodCall\RedirectBackToBackHelperRector\Fixture; | ||
|
||
use Illuminate\Support\Facades\Redirect; | ||
|
||
class FixtureWithArgument | ||
{ | ||
public function store() | ||
{ | ||
return back(302); | ||
} | ||
|
||
public function update() | ||
{ | ||
return back(302); | ||
} | ||
} | ||
|
||
?> |
41 changes: 41 additions & 0 deletions
41
tests/Rector/MethodCall/RedirectBackToBackHelperRector/Fixture/fixture_without_with.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,41 @@ | ||
<?php | ||
|
||
namespace RectorLaravel\Tests\Rector\MethodCall\RedirectBackToBackHelperRector\Fixture; | ||
|
||
use Illuminate\Support\Facades\Redirect; | ||
|
||
class FixtureWithoutWith | ||
{ | ||
public function store() | ||
{ | ||
return redirect()->back(); | ||
} | ||
|
||
public function update() | ||
{ | ||
return Redirect::back(); | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace RectorLaravel\Tests\Rector\MethodCall\RedirectBackToBackHelperRector\Fixture; | ||
|
||
use Illuminate\Support\Facades\Redirect; | ||
|
||
class FixtureWithoutWith | ||
{ | ||
public function store() | ||
{ | ||
return back(); | ||
} | ||
|
||
public function update() | ||
{ | ||
return back(); | ||
} | ||
} | ||
|
||
?> |
41 changes: 41 additions & 0 deletions
41
...Rector/MethodCall/RedirectRouteToToRouteHelperRector/Fixture/fixture_without_with.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,41 @@ | ||
<?php | ||
|
||
namespace RectorLaravel\Tests\Rector\MethodCall\RedirectRouteToToRouteHelperRector\Fixture; | ||
|
||
use Illuminate\Support\Facades\Redirect; | ||
|
||
class FixtureWithoutWith | ||
{ | ||
public function store() | ||
{ | ||
return redirect()->route('home'); | ||
} | ||
|
||
public function update() | ||
{ | ||
return Redirect::route('home'); | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace RectorLaravel\Tests\Rector\MethodCall\RedirectRouteToToRouteHelperRector\Fixture; | ||
|
||
use Illuminate\Support\Facades\Redirect; | ||
|
||
class FixtureWithoutWith | ||
{ | ||
public function store() | ||
{ | ||
return to_route('home'); | ||
} | ||
|
||
public function update() | ||
{ | ||
return to_route('home'); | ||
} | ||
} | ||
|
||
?> |