Skip to content

Commit

Permalink
view() helper: use \Illuminate\View\View (implementation) instead of …
Browse files Browse the repository at this point in the history
…contract

to avoid conflicts with Larastan and Laravel annotations
  • Loading branch information
alies-dev committed Feb 24, 2023
1 parent a12a138 commit 2a8c68d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions stubs/Foundation/helpers.stubphp
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ function validator(array $data = [], array $rules = [], array $messages = [], ar

/**
* @param string|null $view
* @param \Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<string, mixed> $data
* @param \Illuminate\Contracts\Support\Arrayable<string, mixed>|array<string, mixed> $data
* @param array<string, mixed> $mergeData
* @return ($view is null ? \Illuminate\Contracts\View\Factory : \Illuminate\Contracts\View\View)
* @return ($view is null ? \Illuminate\Contracts\View\Factory : \Illuminate\View\View)
*/
function view($view = null, $data = [], $mergeData = []) {}
10 changes: 5 additions & 5 deletions tests/Acceptance/acceptance/FoundationHelpers.feature
Original file line number Diff line number Diff line change
Expand Up @@ -347,27 +347,27 @@ Feature: Foundation helpers
return view();
}
function view_with_one_arg(): \Illuminate\Contracts\View\View
function view_with_one_arg(): \Illuminate\View\View
{
return view('home');
}
function view_with_two_args(): \Illuminate\Contracts\View\View
function view_with_two_args(): \Illuminate\View\View
{
return view('home', []);
}
function view_with_three_args(): \Illuminate\Contracts\View\View
function view_with_three_args(): \Illuminate\View\View
{
return view('home', [], []);
}
function view_make_with_two_args(): \Illuminate\Contracts\View\View
function view_make_with_two_args(): \Illuminate\View\View
{
return view()->make('home', []);
}
function view_make_with_three_args(): \Illuminate\Contracts\View\View
function view_make_with_three_args(): \Illuminate\View\View
{
return view()->make('home', [], []);
}
Expand Down

0 comments on commit 2a8c68d

Please sign in to comment.