We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fadf9a9 commit ff1c11aCopy full SHA for ff1c11a
src/DSN.php
@@ -18,7 +18,7 @@
18
*/
19
class DSN
20
{
21
- const PORTS = [
+ private static $PORTS = [
22
'redis' => 6379,
23
'mongodb' => 27017,
24
'tcp' => 6379,
@@ -229,7 +229,9 @@ private function parseHosts($hostString)
229
230
$hosts = [];
231
foreach ($matches['host'] as $index => $match) {
232
- $port = !empty($matches['port'][$index]) ? (int) $matches['port'][$index] : self::PORTS[$this->protocol];
+ $port = !empty($matches['port'][$index])
233
+ ? (int) $matches['port'][$index]
234
+ : self::$PORTS[$this->protocol];
235
$hosts[] = ['host' => $match, 'port' => $port];
236
}
237
0 commit comments