Commit a5738956 authored by Gabriel Caruso's avatar Gabriel Caruso

Update comments, use short array syntax and fix redundancy.

parent 80304590
......@@ -139,7 +139,7 @@ class ArrayStatement implements \IteratorAggregate, ResultStatement
{
$row = $this->fetch(PDO::FETCH_NUM);
// TODO: verify this is correct behavior
// TODO: verify that return false is the correct behavior
return $row[$columnIndex] ?? false;
}
}
......@@ -196,7 +196,7 @@ class ResultCacheStatement implements \IteratorAggregate, ResultStatement
{
$row = $this->fetch(PDO::FETCH_NUM);
// TODO: verify this is correct behavior
// TODO: verify that return false is the correct behavior
return $row[$columnIndex] ?? false;
}
......
......@@ -153,7 +153,7 @@ final class DriverManager
self::_checkParams($params);
}
$className = $params['driverClass'] ?? $className = self::$_driverMap[$params['driver']];
$className = $params['driverClass'] ?? self::$_driverMap[$params['driver']];
$driver = new $className();
......@@ -393,11 +393,11 @@ final class DriverManager
// URL schemes must not contain underscores, but dashes are ok
$driver = str_replace('-', '_', $url['scheme']);
// The requested driver from the URL scheme takes precedence
// over the default driver from the connection parameters (if any).
// The requested driver from the URL scheme takes precedence over the
// default driver from the connection parameters. If the driver is
// an alias (e.g. "postgres"), map it to the actual name ("pdo-pgsql").
// Otherwise, let checkParams decide later if the driver exists.
$params['driver'] = self::$driverSchemeAliases[$driver] ?? $driver;
// use alias like "postgres", else we just let checkParams decide later
// if the driver exists (for literal "pdo-pgsql" etc)
return $params;
}
......
......@@ -873,7 +873,7 @@ class SchemaManagerFunctionalTestCase extends \Doctrine\Tests\DbalFunctionalTest
*/
protected function createTestTable($name = 'test_table', $data = array())
{
$options = $data['options'] ?? array();
$options = $data['options'] ?? [];
$table = $this->getTestTable($name, $options);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment