Skip to content

Commit

Permalink
Fix view()
Browse files Browse the repository at this point in the history
some annotations uses Contract, some - implementation
  • Loading branch information
alies-dev committed Feb 24, 2023
1 parent 80471a5 commit 3c6485c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion stubs/Foundation/helpers.stubphp
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,6 @@ function validator(array $data = [], array $rules = [], array $messages = [], ar
* @param string|null $view
* @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\View\View)
* @return ($view is null ? \Illuminate\Contracts\View\Factory : (\Illuminate\View\View|\Illuminate\Contracts\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 @@ -358,27 +358,27 @@ Feature: Foundation helpers
return view();
}
function view_with_one_arg(): \Illuminate\View\View
function view_with_one_arg(): Illuminate\Contracts\View\View
{
return view('home');
}
function view_with_two_args(): \Illuminate\View\View
function view_with_two_args(): \Illuminate\Contracts\View\View
{
return view('home', []);
}
function view_with_three_args(): \Illuminate\View\View
function view_with_three_args(): \Illuminate\Contracts\View\View
{
return view('home', [], []);
}
function view_make_with_two_args(): \Illuminate\View\View
function view_make_with_two_args(): \Illuminate\Contracts\View\View
{
return view()->make('home', []);
}
function view_make_with_three_args(): \Illuminate\View\View
function view_make_with_three_args(): \Illuminate\Contracts\View\View
{
return view()->make('home', [], []);
}
Expand Down

0 comments on commit 3c6485c

Please sign in to comment.