1
0
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:
Aaron Piotrowski 2017-06-05 00:21:45 -05:00
parent 6ec8757698
commit 7a05fe1316
4 changed files with 5 additions and 5 deletions

View File

@ -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;
});
}

View File

@ -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;
});
}

View File

@ -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;
});
}

View File

@ -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;
});
}