mirror of
https://github.com/danog/amp.git
synced 2024-11-30 04:29:08 +01:00
Use static function for rethrow
This commit is contained in:
parent
6ec8757698
commit
7a05fe1316
@ -37,7 +37,7 @@ final class Failure implements Promise {
|
||||
Promise\rethrow($result);
|
||||
}
|
||||
} catch (\Throwable $exception) {
|
||||
Loop::defer(function () use ($exception) {
|
||||
Loop::defer(static function () use ($exception) {
|
||||
throw $exception;
|
||||
});
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ trait Placeholder {
|
||||
Promise\rethrow($result);
|
||||
}
|
||||
} catch (\Throwable $exception) {
|
||||
Loop::defer(function () use ($exception) {
|
||||
Loop::defer(static function () use ($exception) {
|
||||
throw $exception;
|
||||
});
|
||||
}
|
||||
@ -134,7 +134,7 @@ trait Placeholder {
|
||||
Promise\rethrow($result);
|
||||
}
|
||||
} catch (\Throwable $exception) {
|
||||
Loop::defer(function () use ($exception) {
|
||||
Loop::defer(static function () use ($exception) {
|
||||
throw $exception;
|
||||
});
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ class ResolutionQueue {
|
||||
Promise\rethrow($result);
|
||||
}
|
||||
} catch (\Throwable $exception) {
|
||||
Loop::defer(function () use ($exception) {
|
||||
Loop::defer(static function () use ($exception) {
|
||||
throw $exception;
|
||||
});
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ final class Success implements Promise {
|
||||
Promise\rethrow($result);
|
||||
}
|
||||
} catch (\Throwable $exception) {
|
||||
Loop::defer(function () use ($exception) {
|
||||
Loop::defer(static function () use ($exception) {
|
||||
throw $exception;
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user