Skip to content

Commit bf79372

Browse files
committed
review
1 parent 169804c commit bf79372

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

Diff for: phpstan/include-by-php-version.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
$phpversion = phpversion();
66
if (version_compare($phpversion, '8.4', '>=')) {
7-
$includes[] = __DIR__ . '/php-8.4.neon';
7+
$includes[] = __DIR__ . '/php-at-least-8.4.neon';
88
}
99
if (version_compare($phpversion, '8.2', '>=')) {
1010
$includes[] = __DIR__ . '/php-at-least-8.2.neon';
File renamed without changes.

Diff for: src/Executor/ExecutionResult.php

+2-7
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,10 @@ public function toArray(int $debug = DebugFlag::NONE): array
158158
$result = [];
159159

160160
if ($this->errors !== []) {
161-
/**
162-
* @phpstan-var ErrorsHandler $defaultErrorsHandler
163-
*
164-
* @phpstan-ignore varTag.nativeType (phpstan cannot type callables yet)
165-
*/
166-
$defaultErrorsHandler = static fn (array $errors, callable $formatter): array => \array_map($formatter, $errors);
167161
$errorsHandler = $this->errorsHandler
168-
?? $defaultErrorsHandler;
162+
?? static fn (array $errors, callable $formatter): array => \array_map($formatter, $errors);
169163

164+
/** @phpstan-var SerializableErrors */
170165
$handledErrors = $errorsHandler(
171166
$this->errors,
172167
FormattedError::prepareFormatter($this->errorFormatter, $debug)

Diff for: src/Executor/Promise/Adapter/AmpPromiseAdapter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public function all(iterable $promisesOrValues): Promise
126126

127127
/**
128128
* @template TArgument
129-
* @template TResult of \Amp\Promise<mixed>
129+
* @template TResult of AmpPromise<mixed>
130130
*
131131
* @param Deferred<TResult> $deferred
132132
* @param callable(TArgument): TResult $callback

0 commit comments

Comments
 (0)