-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
- Loading branch information
There are no files selected for viewing
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 GitHub Actions / PHPStan (7.4, highest)
Check failure on line 11 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.4, lowest)
Check failure on line 11 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.1, lowest)
Check failure on line 11 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.2, lowest)
Check failure on line 11 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.1, highest)
Check failure on line 11 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.0, lowest)
Check failure on line 11 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.3, highest)
Check failure on line 11 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.3, lowest)
Check failure on line 11 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.0, highest)
Check failure on line 11 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.2, lowest)
Check failure on line 11 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.2, highest)
|
||
{ | ||
} | ||
|
||
/** | ||
* @param-immediately-invoked-callable $generator | ||
*/ | ||
public function bulkLoad(array $keys, ?callable $generator = null): array | ||
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.4, highest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.4, highest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.4, lowest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.4, lowest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.1, lowest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.1, lowest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.2, lowest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.2, lowest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.1, highest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.1, highest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.0, lowest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.0, lowest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.3, highest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.3, highest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.3, lowest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.3, lowest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.0, highest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.0, highest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.2, lowest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.2, lowest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.2, highest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.2, highest)
Check failure on line 18 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.2, highest)
|
||
{ | ||
} | ||
|
||
/** | ||
* @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 GitHub Actions / PHPStan (7.4, highest)
Check failure on line 32 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.4, lowest)
Check failure on line 32 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.1, lowest)
Check failure on line 32 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.2, lowest)
Check failure on line 32 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.1, highest)
Check failure on line 32 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.0, lowest)
Check failure on line 32 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.3, highest)
Check failure on line 32 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.3, lowest)
Check failure on line 32 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.0, highest)
Check failure on line 32 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (7.2, lowest)
Check failure on line 32 in stubs/Caching/Cache.stub GitHub Actions / PHPStan (8.2, highest)
|
||
{ | ||
} | ||
|
||
} |
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 GitHub Actions / PHPStan (7.4, highest)
Check failure on line 15 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.4, lowest)
Check failure on line 15 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.1, lowest)
Check failure on line 15 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.2, lowest)
Check failure on line 15 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.1, highest)
Check failure on line 15 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.0, lowest)
Check failure on line 15 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.3, highest)
Check failure on line 15 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.3, lowest)
Check failure on line 15 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.0, highest)
Check failure on line 15 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.2, lowest)
Check failure on line 15 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.2, highest)
Check failure on line 15 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.2, highest)
|
||
{ | ||
} | ||
|
||
/** | ||
* @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 GitHub Actions / PHPStan (7.4, highest)
Check failure on line 26 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.4, lowest)
Check failure on line 26 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.1, lowest)
Check failure on line 26 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.2, lowest)
Check failure on line 26 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.1, highest)
Check failure on line 26 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.0, lowest)
Check failure on line 26 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.3, highest)
Check failure on line 26 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.3, lowest)
Check failure on line 26 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.0, highest)
Check failure on line 26 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.2, lowest)
Check failure on line 26 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.2, highest)
Check failure on line 26 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.2, highest)
|
||
{ | ||
} | ||
|
||
/** | ||
* @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 GitHub Actions / PHPStan (7.4, highest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.4, highest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.4, lowest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.4, lowest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.1, lowest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.1, lowest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.2, lowest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.2, lowest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.1, highest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.1, highest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.0, lowest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.0, lowest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.3, highest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.3, highest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.3, lowest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.3, lowest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.0, highest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.0, highest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.2, lowest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.2, lowest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.2, highest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (8.2, highest)
Check failure on line 39 in stubs/Utils/Arrays.stub GitHub Actions / PHPStan (7.2, highest)
|
||
{ | ||
} | ||
|
||
} |
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 GitHub Actions / PHPStan (7.4, highest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (7.4, highest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (7.4, lowest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (7.4, lowest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (8.1, lowest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (8.1, lowest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (8.2, lowest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (8.2, lowest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (8.1, highest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (8.1, highest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (8.0, lowest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (8.0, lowest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (7.3, highest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (7.3, highest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (7.3, lowest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (7.3, lowest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (8.0, highest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (8.0, highest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (7.2, lowest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (7.2, lowest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (8.2, highest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (8.2, highest)
Check failure on line 11 in stubs/Utils/Callback.stub GitHub Actions / PHPStan (7.2, highest)
|
||
{ | ||
} | ||
|
||
/** | ||
* @param-immediately-invoked-callable $callable | ||
*/ | ||
|
||
public static function invokeArgs($callable, array $args = []) | ||
{ | ||
} | ||
|
||
} |
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 | ||
{ | ||
} | ||
|
||
} |