From ff6f5a4673370d7404153ef54258c240c90d8187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Wed, 16 Oct 2019 20:21:39 +0200 Subject: [PATCH] extract() is not our friend and is not fit for static analysis by @phpstan --- src/Task/Development/SemVer.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Task/Development/SemVer.php b/src/Task/Development/SemVer.php index 2757324c0..2024e5fa8 100644 --- a/src/Task/Development/SemVer.php +++ b/src/Task/Development/SemVer.php @@ -225,8 +225,14 @@ protected function dump() if (empty($this->path)) { return true; } - extract($this->version); - $semver = sprintf(self::SEMVER, $major, $minor, $patch, $special, $metadata); + $semver = sprintf( + self::SEMVER, + $this->version['major'], + $this->version['minor'], + $this->version['patch'], + $this->version['special'], + $this->version['metadata'] + ); if (is_writeable($this->path) === false || file_put_contents($this->path, $semver) === false) { throw new TaskException($this, 'Failed to write semver file.'); }