From 3c6485c1ffa8083059737b3846adc44a3f2c43fc Mon Sep 17 00:00:00 2001 From: Alies Lapatsin Date: Fri, 24 Feb 2023 13:19:27 +0100 Subject: [PATCH] Fix view() some annotations uses Contract, some - implementation --- stubs/Foundation/helpers.stubphp | 2 +- tests/Acceptance/acceptance/FoundationHelpers.feature | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stubs/Foundation/helpers.stubphp b/stubs/Foundation/helpers.stubphp index 29216402..6a5b06e8 100644 --- a/stubs/Foundation/helpers.stubphp +++ b/stubs/Foundation/helpers.stubphp @@ -330,6 +330,6 @@ function validator(array $data = [], array $rules = [], array $messages = [], ar * @param string|null $view * @param \Illuminate\Contracts\Support\Arrayable|array $data * @param array $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 = []) {} diff --git a/tests/Acceptance/acceptance/FoundationHelpers.feature b/tests/Acceptance/acceptance/FoundationHelpers.feature index e38c172c..3a1928b1 100644 --- a/tests/Acceptance/acceptance/FoundationHelpers.feature +++ b/tests/Acceptance/acceptance/FoundationHelpers.feature @@ -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', [], []); }