From e1910f3276c4369c25fbcb60e791fc0f4af6dfe9 Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Wed, 28 Oct 2020 08:52:32 +0100 Subject: [PATCH] Use short array deconstruction syntax. --- Caster/ArgsStub.php | 2 +- Cloner/AbstractCloner.php | 2 +- Server/DumpServer.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Caster/ArgsStub.php b/Caster/ArgsStub.php index 591c7e2a..f8b485bd 100644 --- a/Caster/ArgsStub.php +++ b/Caster/ArgsStub.php @@ -24,7 +24,7 @@ class ArgsStub extends EnumStub public function __construct(array $args, string $function, ?string $class) { - list($variadic, $params) = self::getParameters($function, $class); + [$variadic, $params] = self::getParameters($function, $class); $values = []; foreach ($args as $k => $v) { diff --git a/Cloner/AbstractCloner.php b/Cloner/AbstractCloner.php index 43051ab4..9d50da90 100644 --- a/Cloner/AbstractCloner.php +++ b/Cloner/AbstractCloner.php @@ -296,7 +296,7 @@ protected function castObject(Stub $stub, $isNested) $stub->class = get_debug_type($obj); } if (isset($this->classInfo[$class])) { - list($i, $parents, $hasDebugInfo, $fileInfo) = $this->classInfo[$class]; + [$i, $parents, $hasDebugInfo, $fileInfo] = $this->classInfo[$class]; } else { $i = 2; $parents = [$class]; diff --git a/Server/DumpServer.php b/Server/DumpServer.php index 23b35b2f..55510c0e 100644 --- a/Server/DumpServer.php +++ b/Server/DumpServer.php @@ -71,7 +71,7 @@ public function listen(callable $callback): void continue; } - list($data, $context) = $payload; + [$data, $context] = $payload; $callback($data, $context, $clientId); }