Skip to content

Commit

Permalink
Merge branch '4.4' into 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus committed Oct 28, 2020
2 parents fa5cc9f + ee9d133 commit a8be34b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Transport.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function fromStrings(array $dsns): Transports

public function fromString(string $dsn): TransportInterface
{
list($transport, $offset) = $this->parseDsn($dsn);
[$transport, $offset] = $this->parseDsn($dsn);
if ($offset !== \strlen($dsn)) {
throw new InvalidArgumentException(sprintf('The DSN has some garbage at the end: "%s".', substr($dsn, $offset)));
}
Expand Down Expand Up @@ -111,7 +111,7 @@ private function parseDsn(string $dsn, int $offset = 0): array
++$offset;
$args = [];
while (true) {
list($arg, $offset) = $this->parseDsn($dsn, $offset);
[$arg, $offset] = $this->parseDsn($dsn, $offset);
$args[] = $arg;
if (\strlen($dsn) === $offset) {
break;
Expand Down
2 changes: 1 addition & 1 deletion Transport/Smtp/SmtpTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ private function assertResponseCode(string $response, array $codes): void
throw new TransportException(sprintf('Expected response code "%s" but got an empty response.', implode('/', $codes)));
}

list($code) = sscanf($response, '%3d');
[$code] = sscanf($response, '%3d');
$valid = \in_array($code, $codes);

if (!$valid) {
Expand Down

0 comments on commit a8be34b

Please sign in to comment.