Unverified Commit 2649ae6a authored by Luís Cobucci's avatar Luís Cobucci Committed by Sergei Morozov

Fix argument type declaration

By either defining their types or renaming to match parent class (or
interface).
parent 35beaca3
...@@ -120,7 +120,9 @@ class MasterSlaveConnection extends Connection ...@@ -120,7 +120,9 @@ class MasterSlaveConnection extends Connection
} }
/** /**
* {@inheritDoc} * @param string|null $connectionName
*
* @return bool
*/ */
public function connect($connectionName = null) public function connect($connectionName = null)
{ {
......
...@@ -157,7 +157,7 @@ class DBALException extends Exception ...@@ -157,7 +157,7 @@ class DBALException extends Exception
/** /**
* @return self * @return self
*/ */
private static function wrapException(Driver $driver, Throwable $driverEx, $msg) private static function wrapException(Driver $driver, Throwable $driverEx, string $msg)
{ {
if ($driverEx instanceof DriverException) { if ($driverEx instanceof DriverException) {
return $driverEx; return $driverEx;
......
...@@ -213,6 +213,8 @@ class MysqliStatement implements IteratorAggregate, Statement ...@@ -213,6 +213,8 @@ class MysqliStatement implements IteratorAggregate, Statement
$types = $this->types; $types = $this->types;
foreach ($this->_bindedValues as $parameter => $value) { foreach ($this->_bindedValues as $parameter => $value) {
assert(is_int($parameter));
if (! isset($types[$parameter - 1])) { if (! isset($types[$parameter - 1])) {
$types[$parameter - 1] = static::$_paramTypeMap[ParameterType::STRING]; $types[$parameter - 1] = static::$_paramTypeMap[ParameterType::STRING];
} }
...@@ -243,9 +245,11 @@ class MysqliStatement implements IteratorAggregate, Statement ...@@ -243,9 +245,11 @@ class MysqliStatement implements IteratorAggregate, Statement
/** /**
* Handle $this->_longData after regular query parameters have been bound * Handle $this->_longData after regular query parameters have been bound
* *
* @param array<int, resource> $streams
*
* @throws MysqliException * @throws MysqliException
*/ */
private function sendLongData($streams) : void private function sendLongData(array $streams) : void
{ {
foreach ($streams as $paramNr => $stream) { foreach ($streams as $paramNr => $stream) {
while (! feof($stream)) { while (! feof($stream)) {
......
...@@ -53,7 +53,10 @@ class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection ...@@ -53,7 +53,10 @@ class PDOConnection extends PDO implements Connection, ServerInfoAwareConnection
} }
/** /**
* {@inheritdoc} * @param string $prepareString
* @param array<int, int> $driverOptions
*
* @return Statement
*/ */
public function prepare($prepareString, $driverOptions = []) public function prepare($prepareString, $driverOptions = [])
{ {
......
...@@ -85,7 +85,13 @@ class PDOStatement extends \PDOStatement implements Statement ...@@ -85,7 +85,13 @@ class PDOStatement extends \PDOStatement implements Statement
} }
/** /**
* {@inheritdoc} * @param mixed $column
* @param mixed $variable
* @param int $type
* @param int|null $length
* @param mixed $driverOptions
*
* @return bool
*/ */
public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null, $driverOptions = null) public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null, $driverOptions = null)
{ {
......
...@@ -335,7 +335,10 @@ class DrizzlePlatform extends AbstractPlatform ...@@ -335,7 +335,10 @@ class DrizzlePlatform extends AbstractPlatform
} }
/** /**
* {@inheritDoc} * @param string $table
* @param string|null $database
*
* @return string
*/ */
public function getListTableForeignKeysSQL($table, $database = null) public function getListTableForeignKeysSQL($table, $database = null)
{ {
...@@ -435,6 +438,7 @@ class DrizzlePlatform extends AbstractPlatform ...@@ -435,6 +438,7 @@ class DrizzlePlatform extends AbstractPlatform
} }
/** /**
* @param string $table
* *
* @return string * @return string
*/ */
......
...@@ -175,7 +175,10 @@ class MySqlPlatform extends AbstractPlatform ...@@ -175,7 +175,10 @@ class MySqlPlatform extends AbstractPlatform
} }
/** /**
* {@inheritDoc} * @param string $table
* @param string|null $database
*
* @return string
*/ */
public function getListTableForeignKeysSQL($table, $database = null) public function getListTableForeignKeysSQL($table, $database = null)
{ {
......
...@@ -61,6 +61,7 @@ class OraclePlatform extends AbstractPlatform ...@@ -61,6 +61,7 @@ class OraclePlatform extends AbstractPlatform
} }
/** /**
* @param string $type
* *
* @return string * @return string
*/ */
......
...@@ -279,7 +279,10 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -279,7 +279,10 @@ class PostgreSqlPlatform extends AbstractPlatform
} }
/** /**
* {@inheritDoc} * @param string $table
* @param string|null $database
*
* @return string
*/ */
public function getListTableForeignKeysSQL($table, $database = null) public function getListTableForeignKeysSQL($table, $database = null)
{ {
......
...@@ -933,7 +933,10 @@ SQL ...@@ -933,7 +933,10 @@ SQL
} }
/** /**
* {@inheritDoc} * @param string $table
* @param string|null $database
*
* @return string
*/ */
public function getListTableForeignKeysSQL($table, $database = null) public function getListTableForeignKeysSQL($table, $database = null)
{ {
......
...@@ -55,7 +55,9 @@ class SqlitePlatform extends AbstractPlatform ...@@ -55,7 +55,9 @@ class SqlitePlatform extends AbstractPlatform
} }
/** /**
* {@inheritDoc} * @param string $type
*
* @return string
*/ */
public function getNowExpression($type = 'timestamp') public function getNowExpression($type = 'timestamp')
{ {
...@@ -222,6 +224,7 @@ class SqlitePlatform extends AbstractPlatform ...@@ -222,6 +224,7 @@ class SqlitePlatform extends AbstractPlatform
} }
/** /**
* @param array<string, mixed> $field
* *
* @return string * @return string
*/ */
...@@ -249,6 +252,7 @@ class SqlitePlatform extends AbstractPlatform ...@@ -249,6 +252,7 @@ class SqlitePlatform extends AbstractPlatform
} }
/** /**
* @param array<string, mixed> $field
* *
* @return string * @return string
*/ */
...@@ -602,7 +606,7 @@ class SqlitePlatform extends AbstractPlatform ...@@ -602,7 +606,7 @@ class SqlitePlatform extends AbstractPlatform
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public function getForUpdateSql() public function getForUpdateSQL()
{ {
return ''; return '';
} }
...@@ -812,7 +816,10 @@ class SqlitePlatform extends AbstractPlatform ...@@ -812,7 +816,10 @@ class SqlitePlatform extends AbstractPlatform
} }
/** /**
* {@inheritDoc} * @param string $table
* @param string|null $database
*
* @return string
*/ */
public function getListTableForeignKeysSQL($table, $database = null) public function getListTableForeignKeysSQL($table, $database = null)
{ {
......
...@@ -178,6 +178,7 @@ class DB2SchemaManager extends AbstractSchemaManager ...@@ -178,6 +178,7 @@ class DB2SchemaManager extends AbstractSchemaManager
} }
/** /**
* @param string $def
* *
* @return string|null * @return string|null
*/ */
......
...@@ -225,6 +225,8 @@ class SqliteSchemaManager extends AbstractSchemaManager ...@@ -225,6 +225,8 @@ class SqliteSchemaManager extends AbstractSchemaManager
/** /**
* @deprecated * @deprecated
* *
* @param array<string, mixed> $tableIndex
*
* @return array<string, bool|string> * @return array<string, bool|string>
*/ */
protected function _getPortableTableIndexDefinition($tableIndex) protected function _getPortableTableIndexDefinition($tableIndex)
......
...@@ -91,6 +91,10 @@ class ConversionException extends DBALException ...@@ -91,6 +91,10 @@ class ConversionException extends DBALException
} }
/** /**
* @param mixed $value
* @param string $format
* @param string $error
*
* @return ConversionException * @return ConversionException
*/ */
public static function conversionFailedSerialization($value, $format, $error) public static function conversionFailedSerialization($value, $format, $error)
......
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