diff --git a/composer.json b/composer.json index b361c0a..377bf02 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ ] }, "require": { - "pre/plugin": "^0.11.0" + "pre/plugin": "^0.11.3" }, "require-dev": { "phpunit/phpunit": "^5.0|^6.0" diff --git a/tests/specs/async.spec b/tests/specs/async.spec index f17ecd6..6ae8580 100644 --- a/tests/specs/async.spec +++ b/tests/specs/async.spec @@ -84,15 +84,21 @@ $first = function (): \Amp\Promise { }); }; -$second = [$thing = $thing ?? null, "fn" => function () use (&$thing): \Amp\Promise { - return \Amp\call(function () use (&$thing) { - $this->something(); - yield $thing; - }); -}]["fn"]; +$second = [ + ($thing = $thing ?? null), + "fn" => function () use (&$thing): \Amp\Promise { + return \Amp\call(function () use (&$thing) { + $this->something(); + yield $thing; + }); + } +]["fn"]; -$third = [$thing = $thing ?? null, "fn" => function () use (&$thing): \Amp\Promise { - return \Amp\call(function () use (&$thing) { - yield $thing; - }); -}]["fn"]; +$third = [ + ($thing = $thing ?? null), + "fn" => function () use (&$thing): \Amp\Promise { + return \Amp\call(function () use (&$thing) { + yield $thing; + }); + } +]["fn"];