Skip to content

Commit

Permalink
extract() is not our friend (consolidation#903)
Browse files Browse the repository at this point in the history
and is not fit for static analysis by @phpstan
  • Loading branch information
szepeviktor authored and greg-1-anderson committed Nov 4, 2019
1 parent 3fddfaa commit ca87d26
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Task/Development/SemVer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');
}
Expand Down

0 comments on commit ca87d26

Please sign in to comment.