Skip to content

Commit

Permalink
Merge pull request #279 from lptn/more-stubs-for-helpers
Browse files Browse the repository at this point in the history
Add stubs for `validator` and `view` helpers
  • Loading branch information
lptn authored Jan 20, 2023
2 parents dedef06 + 59c044a commit a7f68f8
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions stubs/helpers.stubphp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

/**
* Return a new response from the application.
*
* @param \Illuminate\View\View|string|array|null $content
* @param int $status
* @param array $headers
* @return \Illuminate\Http\Response|\Illuminate\Contracts\Routing\ResponseFactory
* @psalm-return (func_num_args() is 0 ? \Illuminate\Contracts\Routing\ResponseFactory : \Illuminate\Http\Response)
*/
* Return a new response from the application.
*
* @param \Illuminate\View\View|string|array|null $content
* @param int $status
* @param array $headers
* @return \Illuminate\Http\Response|\Illuminate\Contracts\Routing\ResponseFactory
* @psalm-return (func_num_args() is 0 ? \Illuminate\Contracts\Routing\ResponseFactory : \Illuminate\Http\Response)
*/
function response($content = '', $status = 200, array $headers = [])
{

Expand Down Expand Up @@ -215,6 +215,25 @@ function tap($value, $callback = null)

}

/**
* Create a new Validator instance.
*
* @param array $data
* @param array $rules
* @param array $messages
* @param array $customAttributes
* @return (func_num_args() is 0 ? \Illuminate\Contracts\Validation\Factory : \Illuminate\Contracts\Validation\Validator)
*/
function validator(array $data = [], array $rules = [], array $messages = [], array $customAttributes = []) {}

/**
* @param string|null $view
* @param \Illuminate\Contracts\Support\Arrayable<array-key, mixed>|array<string, mixed> $data
* @param array<string, mixed> $mergeData
* @return ($view is null ? \Illuminate\Contracts\View\Factory : \Illuminate\View\View)
*/
function view($view = null, $data = [], $mergeData = []) {}

/**
* Translate the given message.
*
Expand Down

0 comments on commit a7f68f8

Please sign in to comment.