Skip to content

Commit

Permalink
Fix PhpStan errors + remove deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Mar 24, 2020
1 parent 6fcae06 commit b33a7c3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Driver/Postgres/Postgre10SqlSchemaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ protected function _getPortableSequenceDefinition($sequence)
}

if (isset($sequence['increment_by'], $sequence['min_value']) === false) {
if (\is_array($sequence) === true) {
$sequence = array_merge($sequence, $this->_conn->fetchAssoc('SELECT min_value, increment_by FROM ' . $this->_platform->quoteIdentifier($sequenceName)));
} else {
throw new \RuntimeException('Sequence must be type of array, type "' . \gettype($sequence) . '" given.');
}
$sequence = array_merge($sequence, $this->_conn->fetchAssoc('SELECT min_value, increment_by FROM ' . $this->_platform->quoteIdentifier($sequenceName)));
}

return new Sequence($sequenceName, $sequence['increment_by'], $sequence['min_value']);
Expand Down

0 comments on commit b33a7c3

Please sign in to comment.