Skip to content

Commit

Permalink
Remove PHP 7.1 feature usage for 7.0 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Aug 2, 2019
1 parent d4fc8ce commit b57fc2e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/CombinedCancellationToken.php
Expand Up @@ -30,7 +30,7 @@ public function __construct(CancellationToken ...$tokens)

public function __destruct()
{
foreach ($this->tokens as [$token, $id]) {
foreach ($this->tokens as list($token, $id)) {
/** @var CancellationToken $token */
$token->unsubscribe($id);
}
Expand Down Expand Up @@ -59,7 +59,7 @@ public function unsubscribe(string $id)
/** @inheritdoc */
public function isRequested(): bool
{
foreach ($this->tokens as [$token]) {
foreach ($this->tokens as list($token)) {
if ($token->isRequested()) {
return true;
}
Expand All @@ -71,9 +71,8 @@ public function isRequested(): bool
/** @inheritdoc */
public function throwIfRequested()
{
foreach ($this->tokens as [$token]) {
foreach ($this->tokens as list($token)) {
$token->throwIfRequested();
}
}
}

0 comments on commit b57fc2e

Please sign in to comment.