Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add @param-out support #1804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
ondrejmirtes merged 20 commits into phpstan:1.9.x from staabm:param-out
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
7fc2ac8
implement `@param-out` phpdoc-tag
staabm Oct 8, 2022
c156020
implement out-type on ParameterReflectionWithPhpDocs
staabm Oct 17, 2022
10f25d0
wire Function/MethodReflection parameterOutType
staabm Oct 17, 2022
4f31c53
Delete test.php
staabm Oct 17, 2022
570c1ef
fix variadic param-out
staabm Oct 17, 2022
bb81174
separated test-cases, more wiring
clxmstaab Oct 18, 2022
cc6cff4
don report unused template when used in param-out
clxmstaab Oct 18, 2022
cd05178
fix validation of generic template
clxmstaab Oct 18, 2022
1070171
added psalm stubs and tests
clxmstaab Oct 18, 2022
9364f90
implement ParametersAcceptorWithPhpDocs in NativeFunctionReflectionPr...
clxmstaab Oct 19, 2022
75700b7
test overriding php-src class/method
staabm Oct 19, 2022
77fc29b
adjust LegacyNodeScopeResolverTest test expectations
staabm Oct 19, 2022
4e4df1a
more precise parse_str param-out
staabm Oct 19, 2022
0e7176d
define similar_text() param-out
staabm Oct 19, 2022
c6ee285
added exec() param-out
staabm Oct 19, 2022
827fcdf
added system() param-out
staabm Oct 19, 2022
9bb6c70
added passthru() param-out
staabm Oct 19, 2022
c717ff6
de-duplicate stubs
staabm Oct 20, 2022
683ff3f
fix legacy tests
staabm Oct 20, 2022
35e3325
simplify
staabm Oct 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
de-duplicate stubs
  • Loading branch information
staabm committed Oct 21, 2022
commit c717ff6eba7c831589df916c3457113647f19a55
45 changes: 24 additions & 21 deletions stubs/arrayFunctions.stub
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -17,37 +17,40 @@ function array_reduce(
) {}

/**
* @template T of mixed
* @template TKey as (int|string)
* @template T
* @template TArray as array<TKey,T>
*
* @param array<T> $one
* @param callable(T, T): int $two
* @param TArray $array
* @param callable(T,T):int $callback
* @param-out (TArray is non-empty-array ? non-empty-array<TKey,T> : array<TKey,T>) $array
*/
function uasort(
array &$one,
callable $two
): bool {}
function uasort(array &$array, callable $callback): bool
{}

/**
* @template T of mixed
* @template T
* @template TArray as array<T>
*
* @param array<T> $one
* @param callable(T, T): int $two
* @param TArray $array
* @param callable(T,T):int $callback
* @param-out (TArray is non-empty-array ? non-empty-list<T> : list<T>) $array
*/
function usort(
array &$one,
callable $two
): bool {}
function usort(array &$array, callable $callback): bool
{}

/**
* @template T of array-key
* @template TKey as (int|string)
* @template T
* @template TArray as array<TKey,T>
*
* @param array<T, mixed> $one
* @param callable(T, T): int $two
* @param TArray $array
* @param callable(TKey,TKey):int $callback
* @param-out (TArray is non-empty-array ? non-empty-array<TKey,T> : array<TKey,T>) $array
*/
function uksort(
array &$one,
callable $two
): bool {}
function uksort(array &$array, callable $callback): bool
{
}

/**
* @template T of mixed
Expand Down
38 changes: 0 additions & 38 deletions stubs/core.stub
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -136,44 +136,6 @@ function rsort(array &$array, int $flags = SORT_REGULAR): bool
{
}

/**
* @template T
* @template TArray as array<T>
*
* @param TArray $array
* @param callable(T,T):int $callback
* @param-out (TArray is non-empty-array ? non-empty-list<T> : list<T>) $array
*/
function usort(array &$array, callable $callback): bool
{
}

/**
* @template TKey as (int|string)
* @template T
* @template TArray as array<TKey,T>
*
* @param TArray $array
* @param callable(T,T):int $callback
* @param-out (TArray is non-empty-array ? non-empty-array<TKey,T> : array<TKey,T>) $array
*/
function uasort(array &$array, callable $callback): bool
{
}

/**
* @template TKey as (int|string)
* @template T
* @template TArray as array<TKey,T>
*
* @param TArray $array
* @param callable(TKey,TKey):int $callback
* @param-out (TArray is non-empty-array ? non-empty-array<TKey,T> : array<TKey,T>) $array
*/
function uksort(array &$array, callable $callback): bool
{
}

/**
* @param string $string
* @param-out null $string
Expand Down

AltStyle によって変換されたページ (->オリジナル) /