Skip to content

Commit

Permalink
Add stubs marking immediately invoked callables in utils and caching
Browse files Browse the repository at this point in the history
  • Loading branch information
xificurk committed Jun 7, 2024
1 parent 8af9474 commit 1f95f1d
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extension.neon
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ parameters:
- stubs/Application/Routers/RouteList.stub
- stubs/Application/UI/Component.stub
- stubs/Application/UI/Multiplier.stub
- stubs/Caching/Cache.stub
- stubs/ComponentModel/Component.stub
- stubs/ComponentModel/Container.stub
- stubs/ComponentModel/IComponent.stub
Expand All @@ -21,6 +22,9 @@ parameters:
- stubs/Http/SessionSection.stub
- stubs/Routing/Router.stub
- stubs/Utils/ArrayHash.stub
- stubs/Utils/Arrays.stub
- stubs/Utils/Callback.stub
- stubs/Utils/Helpers.stub
- stubs/Utils/Html.stub
- stubs/Utils/Paginator.stub
- stubs/Utils/Random.stub
Expand Down
36 changes: 36 additions & 0 deletions stubs/Caching/Cache.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

namespace Nette\Caching;

class Cache
{

/**
* @param-immediately-invoked-callable $generator
*/
public function load(mixed $key, ?callable $generator = null, ?array $dependencies = null): mixed

Check failure on line 11 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, highest)

Method Nette\Caching\Cache::load() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 11 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, lowest)

Method Nette\Caching\Cache::load() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 11 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, lowest)

Method Nette\Caching\Cache::load() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 11 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, lowest)

Method Nette\Caching\Cache::load() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 11 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, highest)

Method Nette\Caching\Cache::load() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 11 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, lowest)

Method Nette\Caching\Cache::load() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 11 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, highest)

Method Nette\Caching\Cache::load() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 11 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, lowest)

Method Nette\Caching\Cache::load() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 11 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, highest)

Method Nette\Caching\Cache::load() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 11 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, lowest)

Method Nette\Caching\Cache::load() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 11 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, highest)

Method Nette\Caching\Cache::load() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 11 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, highest)

Method Nette\Caching\Cache::load() has parameter $dependencies with no value type specified in iterable type array.
{
}

/**
* @param-immediately-invoked-callable $generator
*/
public function bulkLoad(array $keys, ?callable $generator = null): array

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, highest)

Method Nette\Caching\Cache::bulkLoad() has parameter $keys with no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, highest)

Method Nette\Caching\Cache::bulkLoad() return type has no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, lowest)

Method Nette\Caching\Cache::bulkLoad() has parameter $keys with no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, lowest)

Method Nette\Caching\Cache::bulkLoad() return type has no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, lowest)

Method Nette\Caching\Cache::bulkLoad() has parameter $keys with no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, lowest)

Method Nette\Caching\Cache::bulkLoad() return type has no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, lowest)

Method Nette\Caching\Cache::bulkLoad() has parameter $keys with no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, lowest)

Method Nette\Caching\Cache::bulkLoad() return type has no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, highest)

Method Nette\Caching\Cache::bulkLoad() has parameter $keys with no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, highest)

Method Nette\Caching\Cache::bulkLoad() return type has no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, lowest)

Method Nette\Caching\Cache::bulkLoad() has parameter $keys with no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, lowest)

Method Nette\Caching\Cache::bulkLoad() return type has no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, highest)

Method Nette\Caching\Cache::bulkLoad() has parameter $keys with no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, highest)

Method Nette\Caching\Cache::bulkLoad() return type has no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, lowest)

Method Nette\Caching\Cache::bulkLoad() has parameter $keys with no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, lowest)

Method Nette\Caching\Cache::bulkLoad() return type has no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, highest)

Method Nette\Caching\Cache::bulkLoad() has parameter $keys with no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, highest)

Method Nette\Caching\Cache::bulkLoad() return type has no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, lowest)

Method Nette\Caching\Cache::bulkLoad() has parameter $keys with no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, lowest)

Method Nette\Caching\Cache::bulkLoad() return type has no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, highest)

Method Nette\Caching\Cache::bulkLoad() has parameter $keys with no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, highest)

Method Nette\Caching\Cache::bulkLoad() return type has no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, highest)

Method Nette\Caching\Cache::bulkLoad() has parameter $keys with no value type specified in iterable type array.

Check failure on line 18 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, highest)

Method Nette\Caching\Cache::bulkLoad() return type has no value type specified in iterable type array.
{
}

/**
* @param-immediately-invoked-callable $function
*/
public function call(callable $function): mixed
{
}

/**
* @param-immediately-invoked-callable $function
*/
public function wrap(callable $function, ?array $dependencies = null): \Closure

Check failure on line 32 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, highest)

Method Nette\Caching\Cache::wrap() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 32 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, lowest)

Method Nette\Caching\Cache::wrap() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 32 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, lowest)

Method Nette\Caching\Cache::wrap() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 32 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, lowest)

Method Nette\Caching\Cache::wrap() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 32 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, highest)

Method Nette\Caching\Cache::wrap() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 32 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, lowest)

Method Nette\Caching\Cache::wrap() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 32 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, highest)

Method Nette\Caching\Cache::wrap() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 32 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, lowest)

Method Nette\Caching\Cache::wrap() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 32 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, highest)

Method Nette\Caching\Cache::wrap() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 32 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, lowest)

Method Nette\Caching\Cache::wrap() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 32 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, highest)

Method Nette\Caching\Cache::wrap() has parameter $dependencies with no value type specified in iterable type array.

Check failure on line 32 in stubs/Caching/Cache.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, highest)

Method Nette\Caching\Cache::wrap() has parameter $dependencies with no value type specified in iterable type array.
{
}

}
43 changes: 43 additions & 0 deletions stubs/Utils/Arrays.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

namespace Nette\Utils;

class Arrays
{

/**
* @template K of array-key
* @template V
* @param array<K, V> $array
* @param callable(V, K, array<K, V>): bool $predicate
* @param-immediately-invoked-callable $callback
*/
public static function some(iterable $array, callable $callback): bool

Check failure on line 15 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, highest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 15 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, lowest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 15 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, lowest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 15 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, lowest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 15 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, highest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 15 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, lowest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 15 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, highest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 15 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, lowest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 15 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, highest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 15 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, lowest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 15 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, highest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 15 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, highest)

PHPDoc tag @param references unknown parameter: $predicate
{
}

/**
* @template K of array-key
* @template V
* @param array<K, V> $array
* @param callable(V, K, array<K, V>): bool $predicate
* @param-immediately-invoked-callable $callback
*/
public static function every(iterable $array, callable $callback): bool

Check failure on line 26 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, highest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 26 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, lowest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 26 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, lowest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 26 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, lowest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 26 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, highest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 26 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, lowest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 26 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, highest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 26 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, lowest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 26 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, highest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 26 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, lowest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 26 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, highest)

PHPDoc tag @param references unknown parameter: $predicate

Check failure on line 26 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, highest)

PHPDoc tag @param references unknown parameter: $predicate
{
}

/**
* @template K of array-key
* @template V
* @template R
* @param array<K, V> $array
* @param callable(V, K, array<K, V>): R $transformer
* @return array<K, R>
* @param-immediately-invoked-callable $callback
*/
public static function map(iterable $array, callable $callback): array

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, highest)

PHPDoc tag @param references unknown parameter: $transformer

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, highest)

Template type R of method Nette\Utils\Arrays::map() is not referenced in a parameter.

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, lowest)

PHPDoc tag @param references unknown parameter: $transformer

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, lowest)

Template type R of method Nette\Utils\Arrays::map() is not referenced in a parameter.

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, lowest)

PHPDoc tag @param references unknown parameter: $transformer

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, lowest)

Template type R of method Nette\Utils\Arrays::map() is not referenced in a parameter.

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, lowest)

PHPDoc tag @param references unknown parameter: $transformer

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, lowest)

Template type R of method Nette\Utils\Arrays::map() is not referenced in a parameter.

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, highest)

PHPDoc tag @param references unknown parameter: $transformer

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, highest)

Template type R of method Nette\Utils\Arrays::map() is not referenced in a parameter.

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, lowest)

PHPDoc tag @param references unknown parameter: $transformer

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, lowest)

Template type R of method Nette\Utils\Arrays::map() is not referenced in a parameter.

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, highest)

PHPDoc tag @param references unknown parameter: $transformer

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, highest)

Template type R of method Nette\Utils\Arrays::map() is not referenced in a parameter.

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, lowest)

PHPDoc tag @param references unknown parameter: $transformer

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, lowest)

Template type R of method Nette\Utils\Arrays::map() is not referenced in a parameter.

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, highest)

PHPDoc tag @param references unknown parameter: $transformer

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, highest)

Template type R of method Nette\Utils\Arrays::map() is not referenced in a parameter.

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, lowest)

PHPDoc tag @param references unknown parameter: $transformer

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, lowest)

Template type R of method Nette\Utils\Arrays::map() is not referenced in a parameter.

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, highest)

PHPDoc tag @param references unknown parameter: $transformer

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, highest)

Template type R of method Nette\Utils\Arrays::map() is not referenced in a parameter.

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, highest)

PHPDoc tag @param references unknown parameter: $transformer

Check failure on line 39 in stubs/Utils/Arrays.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, highest)

Template type R of method Nette\Utils\Arrays::map() is not referenced in a parameter.
{
}

}
23 changes: 23 additions & 0 deletions stubs/Utils/Callback.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Nette\Utils;

class Callback
{

/**
* @param-immediately-invoked-callable $callable
*/
public static function invoke($callable, ...$args)

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, highest)

Method Nette\Utils\Callback::invoke() has no return type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, highest)

Method Nette\Utils\Callback::invoke() has parameter $args with no type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, lowest)

Method Nette\Utils\Callback::invoke() has no return type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.4, lowest)

Method Nette\Utils\Callback::invoke() has parameter $args with no type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, lowest)

Method Nette\Utils\Callback::invoke() has no return type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, lowest)

Method Nette\Utils\Callback::invoke() has parameter $args with no type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, lowest)

Method Nette\Utils\Callback::invoke() has no return type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, lowest)

Method Nette\Utils\Callback::invoke() has parameter $args with no type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, highest)

Method Nette\Utils\Callback::invoke() has no return type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, highest)

Method Nette\Utils\Callback::invoke() has parameter $args with no type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, lowest)

Method Nette\Utils\Callback::invoke() has no return type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, lowest)

Method Nette\Utils\Callback::invoke() has parameter $args with no type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, highest)

Method Nette\Utils\Callback::invoke() has no return type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, highest)

Method Nette\Utils\Callback::invoke() has parameter $args with no type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, lowest)

Method Nette\Utils\Callback::invoke() has no return type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.3, lowest)

Method Nette\Utils\Callback::invoke() has parameter $args with no type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, highest)

Method Nette\Utils\Callback::invoke() has no return type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, highest)

Method Nette\Utils\Callback::invoke() has parameter $args with no type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, lowest)

Method Nette\Utils\Callback::invoke() has no return type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, lowest)

Method Nette\Utils\Callback::invoke() has parameter $args with no type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, highest)

Method Nette\Utils\Callback::invoke() has no return type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, highest)

Method Nette\Utils\Callback::invoke() has parameter $args with no type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, highest)

Method Nette\Utils\Callback::invoke() has no return type specified.

Check failure on line 11 in stubs/Utils/Callback.stub

View workflow job for this annotation

GitHub Actions / PHPStan (7.2, highest)

Method Nette\Utils\Callback::invoke() has parameter $args with no type specified.
{
}

/**
* @param-immediately-invoked-callable $callable
*/

public static function invokeArgs($callable, array $args = [])
{
}

}
15 changes: 15 additions & 0 deletions stubs/Utils/Helpers.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Nette\Utils;

class Helpers
{

/**
* @param-immediately-invoked-callable $func
*/
public static function capture(callable $func): string
{
}

}

0 comments on commit 1f95f1d

Please sign in to comment.