diff --git a/lib/Doctrine/DBAL/Cache/ArrayStatement.php b/lib/Doctrine/DBAL/Cache/ArrayStatement.php index b77f85cacfe..6e09e124d83 100644 --- a/lib/Doctrine/DBAL/Cache/ArrayStatement.php +++ b/lib/Doctrine/DBAL/Cache/ArrayStatement.php @@ -21,6 +21,10 @@ use Doctrine\DBAL\Driver\ResultStatement; use Doctrine\DBAL\FetchMode; +use function array_merge; +use function array_values; +use function count; +use function reset; class ArrayStatement implements \IteratorAggregate, ResultStatement { diff --git a/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php b/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php index cc5b4e3e941..4b200a5d438 100644 --- a/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php +++ b/lib/Doctrine/DBAL/Cache/ResultCacheStatement.php @@ -23,6 +23,9 @@ use Doctrine\DBAL\Driver\ResultStatement; use Doctrine\Common\Cache\Cache; use Doctrine\DBAL\FetchMode; +use function array_merge; +use function array_values; +use function reset; /** * Cache statement for SQL results. diff --git a/lib/Doctrine/DBAL/Connection.php b/lib/Doctrine/DBAL/Connection.php index 53ed295ff97..3c876eb9eb5 100644 --- a/lib/Doctrine/DBAL/Connection.php +++ b/lib/Doctrine/DBAL/Connection.php @@ -32,6 +32,13 @@ use Doctrine\DBAL\Cache\CacheException; use Doctrine\DBAL\Driver\PingableConnection; use Throwable; +use function array_key_exists; +use function array_merge; +use function func_get_args; +use function implode; +use function is_int; +use function is_string; +use function key; /** * A wrapper around a Doctrine\DBAL\Driver\Connection that adds features like diff --git a/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php b/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php index 74e167fff12..e769cc4299e 100644 --- a/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php +++ b/lib/Doctrine/DBAL/Connections/MasterSlaveConnection.php @@ -25,6 +25,9 @@ use Doctrine\Common\EventManager; use Doctrine\DBAL\Event\ConnectionEventArgs; use Doctrine\DBAL\Events; +use function array_rand; +use function count; +use function func_get_args; /** * Master-Slave Connection diff --git a/lib/Doctrine/DBAL/DBALException.php b/lib/Doctrine/DBAL/DBALException.php index 7ca5e00de87..67265d954fb 100644 --- a/lib/Doctrine/DBAL/DBALException.php +++ b/lib/Doctrine/DBAL/DBALException.php @@ -23,6 +23,14 @@ use Doctrine\DBAL\Driver; use Doctrine\DBAL\Driver\ExceptionConverterDriver; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function array_map; +use function bin2hex; +use function implode; +use function is_resource; +use function is_string; +use function json_encode; +use function sprintf; +use function str_split; class DBALException extends \Exception { diff --git a/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php b/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php index c29993d2ed9..ed881052c0b 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php @@ -27,6 +27,9 @@ use Doctrine\DBAL\Platforms\MySqlPlatform; use Doctrine\DBAL\Schema\MySqlSchemaManager; use Doctrine\DBAL\VersionAwarePlatformDriver; +use function preg_match; +use function stripos; +use function version_compare; /** * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for MySQL based drivers. diff --git a/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php b/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php index fed70df0b97..ea7aa71676b 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php @@ -29,6 +29,9 @@ use Doctrine\DBAL\Platforms\PostgreSqlPlatform; use Doctrine\DBAL\Schema\PostgreSqlSchemaManager; use Doctrine\DBAL\VersionAwarePlatformDriver; +use function preg_match; +use function strpos; +use function version_compare; /** * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for PostgreSQL based drivers. diff --git a/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php b/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php index 44cb4fa50d3..ca966511d3b 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractSQLAnywhereDriver.php @@ -28,6 +28,8 @@ use Doctrine\DBAL\Platforms\SQLAnywherePlatform; use Doctrine\DBAL\Schema\SQLAnywhereSchemaManager; use Doctrine\DBAL\VersionAwarePlatformDriver; +use function preg_match; +use function version_compare; /** * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for SAP Sybase SQL Anywhere based drivers. diff --git a/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php b/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php index c14306ecdf8..fb9c989bd14 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractSQLServerDriver.php @@ -27,6 +27,8 @@ use Doctrine\DBAL\Platforms\SQLServerPlatform; use Doctrine\DBAL\Schema\SQLServerSchemaManager; use Doctrine\DBAL\VersionAwarePlatformDriver; +use function preg_match; +use function version_compare; /** * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for Microsoft SQL Server based drivers. diff --git a/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php b/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php index d54700db97c..406cb92ef2f 100644 --- a/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php +++ b/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php @@ -23,6 +23,7 @@ use Doctrine\DBAL\Exception; use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\Schema\SqliteSchemaManager; +use function strpos; /** * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for SQLite based drivers. diff --git a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php index be43fc5f88b..72ef796862d 100644 --- a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php +++ b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php @@ -22,6 +22,23 @@ use Doctrine\DBAL\Driver\Connection; use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\ParameterType; +use const DB2_AUTOCOMMIT_OFF; +use const DB2_AUTOCOMMIT_ON; +use function db2_autocommit; +use function db2_commit; +use function db2_conn_error; +use function db2_conn_errormsg; +use function db2_connect; +use function db2_escape_string; +use function db2_exec; +use function db2_last_insert_id; +use function db2_num_rows; +use function db2_pconnect; +use function db2_prepare; +use function db2_rollback; +use function db2_server_info; +use function db2_stmt_errormsg; +use function func_get_args; class DB2Connection implements Connection, ServerInfoAwareConnection { diff --git a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php index 9a8ba334db6..4aaa054abf7 100644 --- a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php +++ b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php @@ -23,6 +23,30 @@ use Doctrine\DBAL\Driver\StatementIterator; use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; +use const DB2_CHAR; +use const DB2_LONG; +use const DB2_PARAM_IN; +use function array_change_key_case; +use function call_user_func_array; +use function db2_bind_param; +use function db2_execute; +use function db2_fetch_array; +use function db2_fetch_assoc; +use function db2_fetch_both; +use function db2_fetch_object; +use function db2_free_result; +use function db2_num_fields; +use function db2_num_rows; +use function db2_stmt_error; +use function db2_stmt_errormsg; +use function func_get_args; +use function func_num_args; +use function gettype; +use function is_object; +use function is_string; +use function ksort; +use function sprintf; +use function strtolower; class DB2Statement implements \IteratorAggregate, Statement { diff --git a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php index b3314b46dfb..98a5b2361c6 100644 --- a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php +++ b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php @@ -23,6 +23,19 @@ use Doctrine\DBAL\Driver\PingableConnection; use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\ParameterType; +use function defined; +use function floor; +use function func_get_args; +use function in_array; +use function ini_get; +use function mysqli_errno; +use function mysqli_error; +use function mysqli_init; +use function mysqli_options; +use function restore_error_handler; +use function set_error_handler; +use function sprintf; +use function stripos; /** * @author Kim Hemsø Rasmussen diff --git a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php index 38b05e318b2..db78c7178ef 100644 --- a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php +++ b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php @@ -23,6 +23,11 @@ use Doctrine\DBAL\Driver\StatementIterator; use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; +use function array_combine; +use function array_fill; +use function call_user_func_array; +use function count; +use function str_repeat; /** * @author Kim Hemsø Rasmussen diff --git a/lib/Doctrine/DBAL/Driver/OCI8/Driver.php b/lib/Doctrine/DBAL/Driver/OCI8/Driver.php index 1f49dac6352..925e9b70f78 100644 --- a/lib/Doctrine/DBAL/Driver/OCI8/Driver.php +++ b/lib/Doctrine/DBAL/Driver/OCI8/Driver.php @@ -21,6 +21,7 @@ use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Driver\AbstractOracleDriver; +use const OCI_DEFAULT; /** * A Doctrine DBAL driver for the Oracle OCI8 PHP extensions. diff --git a/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php b/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php index 9d68bea7de1..e2111d47444 100644 --- a/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php +++ b/lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php @@ -22,6 +22,24 @@ use Doctrine\DBAL\Driver\Connection; use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\ParameterType; +use const OCI_COMMIT_ON_SUCCESS; +use const OCI_DEFAULT; +use const OCI_NO_AUTO_COMMIT; +use function addcslashes; +use function define; +use function defined; +use function func_get_args; +use function is_float; +use function is_int; +use function oci_commit; +use function oci_connect; +use function oci_error; +use function oci_pconnect; +use function oci_rollback; +use function oci_server_version; +use function preg_match; +use function sprintf; +use function str_replace; /** * OCI8 implementation of the Connection interface. diff --git a/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php b/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php index 66bedeab5a3..1d771007fda 100644 --- a/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php +++ b/lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php @@ -24,6 +24,36 @@ use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use IteratorAggregate; +use const OCI_ASSOC; +use const OCI_B_BLOB; +use const OCI_BOTH; +use const OCI_D_LOB; +use const OCI_FETCHSTATEMENT_BY_COLUMN; +use const OCI_FETCHSTATEMENT_BY_ROW; +use const OCI_NUM; +use const OCI_RETURN_LOBS; +use const OCI_RETURN_NULLS; +use const OCI_TEMP_BLOB; +use const PREG_OFFSET_CAPTURE; +use function array_key_exists; +use function count; +use function implode; +use function is_numeric; +use function oci_bind_by_name; +use function oci_cancel; +use function oci_error; +use function oci_execute; +use function oci_fetch_all; +use function oci_fetch_array; +use function oci_fetch_object; +use function oci_new_descriptor; +use function oci_num_fields; +use function oci_num_rows; +use function oci_parse; +use function preg_match; +use function preg_quote; +use function sprintf; +use function substr; /** * The OCI8 implementation of the Statement interface. diff --git a/lib/Doctrine/DBAL/Driver/PDOConnection.php b/lib/Doctrine/DBAL/Driver/PDOConnection.php index 91629f65bdb..62a214a53d2 100644 --- a/lib/Doctrine/DBAL/Driver/PDOConnection.php +++ b/lib/Doctrine/DBAL/Driver/PDOConnection.php @@ -21,6 +21,8 @@ use Doctrine\DBAL\ParameterType; use PDO; +use function count; +use function func_get_args; /** * PDO implementation of the Connection interface. diff --git a/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php b/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php index fa993e7a522..685e8d77750 100644 --- a/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php +++ b/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php @@ -24,6 +24,7 @@ use Doctrine\DBAL\DBALException; use PDOException; use PDO; +use function defined; /** * Driver that connects through pdo_pgsql. diff --git a/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php b/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php index 4fe4e72018e..096f7a2b64f 100644 --- a/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php +++ b/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php @@ -23,6 +23,7 @@ use Doctrine\DBAL\Driver\AbstractSQLiteDriver; use Doctrine\DBAL\Driver\PDOConnection; use PDOException; +use function array_merge; /** * The PDO Sqlite driver. diff --git a/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php b/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php index 36747110109..7ce7e8a76b6 100644 --- a/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php +++ b/lib/Doctrine/DBAL/Driver/PDOSqlsrv/Connection.php @@ -21,6 +21,8 @@ use Doctrine\DBAL\Driver\PDOConnection; use Doctrine\DBAL\ParameterType; +use function strpos; +use function substr; /** * Sqlsrv Connection implementation. diff --git a/lib/Doctrine/DBAL/Driver/SQLAnywhere/Driver.php b/lib/Doctrine/DBAL/Driver/SQLAnywhere/Driver.php index 5e31b53d6d2..1ff0b04b1ba 100644 --- a/lib/Doctrine/DBAL/Driver/SQLAnywhere/Driver.php +++ b/lib/Doctrine/DBAL/Driver/SQLAnywhere/Driver.php @@ -21,6 +21,9 @@ use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Driver\AbstractSQLAnywhereDriver; +use function array_keys; +use function array_map; +use function implode; /** * A Doctrine DBAL driver for the SAP Sybase SQL Anywhere PHP extension. diff --git a/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php b/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php index 03be0576a7b..29542252c1b 100644 --- a/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php +++ b/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereConnection.php @@ -22,6 +22,21 @@ use Doctrine\DBAL\Driver\Connection; use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\ParameterType; +use function func_get_args; +use function is_float; +use function is_int; +use function is_resource; +use function sasql_affected_rows; +use function sasql_commit; +use function sasql_connect; +use function sasql_error; +use function sasql_errorcode; +use function sasql_escape_string; +use function sasql_insert_id; +use function sasql_pconnect; +use function sasql_real_query; +use function sasql_rollback; +use function sasql_set_option; /** * SAP Sybase SQL Anywhere implementation of the Connection interface. diff --git a/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereException.php b/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereException.php index 046938037d5..2a89206d782 100644 --- a/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereException.php +++ b/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereException.php @@ -20,6 +20,12 @@ namespace Doctrine\DBAL\Driver\SQLAnywhere; use Doctrine\DBAL\Driver\AbstractDriverException; +use function is_resource; +use function sasql_error; +use function sasql_errorcode; +use function sasql_sqlstate; +use function sasql_stmt_errno; +use function sasql_stmt_error; /** * SAP Sybase SQL Anywhere driver exception. diff --git a/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php b/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php index 8a6b4a1176a..5605e525ff2 100644 --- a/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php +++ b/lib/Doctrine/DBAL/Driver/SQLAnywhere/SQLAnywhereStatement.php @@ -24,6 +24,31 @@ use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; use IteratorAggregate; +use const SASQL_BOTH; +use function array_key_exists; +use function call_user_func_array; +use function func_get_args; +use function func_num_args; +use function gettype; +use function is_array; +use function is_numeric; +use function is_object; +use function is_resource; +use function is_string; +use function sasql_fetch_array; +use function sasql_fetch_assoc; +use function sasql_fetch_object; +use function sasql_fetch_row; +use function sasql_prepare; +use function sasql_stmt_affected_rows; +use function sasql_stmt_bind_param_ex; +use function sasql_stmt_errno; +use function sasql_stmt_error; +use function sasql_stmt_execute; +use function sasql_stmt_field_count; +use function sasql_stmt_reset; +use function sasql_stmt_result_metadata; +use function sprintf; /** * SAP SQL Anywhere implementation of the Statement interface. diff --git a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php index 69a91417184..6cdd4bca97f 100644 --- a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php +++ b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php @@ -22,6 +22,21 @@ use Doctrine\DBAL\Driver\Connection; use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\ParameterType; +use const SQLSRV_ERR_ERRORS; +use function func_get_args; +use function is_float; +use function is_int; +use function sprintf; +use function sqlsrv_begin_transaction; +use function sqlsrv_commit; +use function sqlsrv_configure; +use function sqlsrv_connect; +use function sqlsrv_errors; +use function sqlsrv_query; +use function sqlsrv_rollback; +use function sqlsrv_rows_affected; +use function sqlsrv_server_info; +use function str_replace; /** * SQL Server implementation for the Connection interface. diff --git a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvException.php b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvException.php index 49f5a3ef4ef..3223c113608 100644 --- a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvException.php +++ b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvException.php @@ -21,6 +21,9 @@ use Doctrine\DBAL\Driver\AbstractDriverException; +use const SQLSRV_ERR_ERRORS; +use function rtrim; +use function sqlsrv_errors; class SQLSrvException extends AbstractDriverException { diff --git a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php index d2fcc72715e..f4d450177a8 100644 --- a/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php +++ b/lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php @@ -24,7 +24,30 @@ use Doctrine\DBAL\ParameterType; use IteratorAggregate; use Doctrine\DBAL\Driver\Statement; +use const SQLSRV_ENC_BINARY; +use const SQLSRV_ERR_ERRORS; +use const SQLSRV_FETCH_ASSOC; +use const SQLSRV_FETCH_BOTH; +use const SQLSRV_FETCH_NUMERIC; +use const SQLSRV_PARAM_IN; +use function array_key_exists; +use function count; use function func_get_args; +use function in_array; +use function is_numeric; +use function sqlsrv_errors; +use function sqlsrv_execute; +use function sqlsrv_fetch; +use function sqlsrv_fetch_array; +use function sqlsrv_fetch_object; +use function sqlsrv_get_field; +use function sqlsrv_next_result; +use function sqlsrv_num_fields; +use function SQLSRV_PHPTYPE_STREAM; +use function sqlsrv_prepare; +use function sqlsrv_rows_affected; +use function SQLSRV_SQLTYPE_VARBINARY; +use function stripos; /** * SQL Server Statement. diff --git a/lib/Doctrine/DBAL/DriverManager.php b/lib/Doctrine/DBAL/DriverManager.php index 7ab1bd767ce..22ae8ac3264 100644 --- a/lib/Doctrine/DBAL/DriverManager.php +++ b/lib/Doctrine/DBAL/DriverManager.php @@ -20,6 +20,18 @@ namespace Doctrine\DBAL; use Doctrine\Common\EventManager; +use function array_keys; +use function array_map; +use function array_merge; +use function class_implements; +use function in_array; +use function is_subclass_of; +use function parse_str; +use function parse_url; +use function preg_replace; +use function str_replace; +use function strpos; +use function substr; /** * Factory for creating Doctrine\DBAL\Connection instances. diff --git a/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php b/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php index da22abc3c45..851986cc1a4 100644 --- a/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php +++ b/lib/Doctrine/DBAL/Event/Listeners/OracleSessionInit.php @@ -22,6 +22,10 @@ use Doctrine\DBAL\Event\ConnectionEventArgs; use Doctrine\DBAL\Events; use Doctrine\Common\EventSubscriber; +use function array_change_key_case; +use function array_merge; +use function count; +use function implode; /** * Should be used when Oracle Server default environment does not match the Doctrine requirements. diff --git a/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php index c9969cb7e37..7cb235ea18b 100644 --- a/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php @@ -22,6 +22,8 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\TableDiff; +use function array_merge; +use function is_array; /** * Event Arguments used when SQL queries for adding table columns are generated inside Doctrine\DBAL\Platform\*Platform. diff --git a/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php index 6539de3d348..fdafb45a7a4 100644 --- a/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php @@ -22,6 +22,8 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Schema\ColumnDiff; use Doctrine\DBAL\Schema\TableDiff; +use function array_merge; +use function is_array; /** * Event Arguments used when SQL queries for changing table columns are generated inside Doctrine\DBAL\Platform\*Platform. diff --git a/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php index 9ee9604c233..8e60b2c5f6b 100644 --- a/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php @@ -21,6 +21,8 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Schema\TableDiff; +use function array_merge; +use function is_array; /** * Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform\*Platform. diff --git a/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php index cdea7ef1156..52413ce9173 100644 --- a/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php @@ -22,6 +22,8 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\TableDiff; +use function array_merge; +use function is_array; /** * Event Arguments used when SQL queries for removing table columns are generated inside Doctrine\DBAL\Platform\*Platform. diff --git a/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php index 66431b698f4..697660442a5 100644 --- a/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php @@ -22,6 +22,8 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\TableDiff; +use function array_merge; +use function is_array; /** * Event Arguments used when SQL queries for renaming table columns are generated inside Doctrine\DBAL\Platform\*Platform. diff --git a/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php index a21fb73d26e..824e243b135 100644 --- a/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php @@ -22,6 +22,8 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\Table; +use function array_merge; +use function is_array; /** * Event Arguments used when SQL queries for creating table columns are generated inside Doctrine\DBAL\Platform\AbstractPlatform. diff --git a/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php index bb3f77acb25..7993b3adb15 100644 --- a/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php @@ -21,6 +21,8 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Schema\Table; +use function array_merge; +use function is_array; /** * Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform. diff --git a/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php index 6ffb6442c07..b3c90422121 100644 --- a/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php @@ -21,6 +21,7 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Schema\Table; +use function is_string; /** * Event Arguments used when the SQL query for dropping tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform. diff --git a/lib/Doctrine/DBAL/Id/TableGenerator.php b/lib/Doctrine/DBAL/Id/TableGenerator.php index 68039407206..068eb6056bf 100644 --- a/lib/Doctrine/DBAL/Id/TableGenerator.php +++ b/lib/Doctrine/DBAL/Id/TableGenerator.php @@ -23,6 +23,8 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\LockMode; +use const CASE_LOWER; +use function array_change_key_case; /** * Table ID Generator for those poor languages that are missing sequences. diff --git a/lib/Doctrine/DBAL/Logging/DebugStack.php b/lib/Doctrine/DBAL/Logging/DebugStack.php index d178770886b..4cffaa67fce 100644 --- a/lib/Doctrine/DBAL/Logging/DebugStack.php +++ b/lib/Doctrine/DBAL/Logging/DebugStack.php @@ -19,6 +19,8 @@ namespace Doctrine\DBAL\Logging; +use function microtime; + /** * Includes executed SQLs in a Debug Stack. * diff --git a/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php b/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php index 8ed04788fd6..a6c1ae5ea0b 100644 --- a/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php +++ b/lib/Doctrine/DBAL/Logging/EchoSQLLogger.php @@ -19,6 +19,9 @@ namespace Doctrine\DBAL\Logging; +use const PHP_EOL; +use function var_dump; + /** * A SQL logger that logs to the standard output using echo/var_dump. * diff --git a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php index 63c37f37fb6..daf6b8528f4 100644 --- a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php @@ -43,10 +43,29 @@ use Doctrine\DBAL\Types; use Doctrine\DBAL\Types\Type; use function addcslashes; +use function array_map; +use function array_merge; +use function array_unique; +use function array_values; +use function count; +use function explode; +use function func_get_args; +use function get_class; +use function implode; +use function in_array; +use function is_array; +use function is_bool; +use function is_int; +use function is_string; +use function join; use function preg_quote; use function preg_replace; use function sprintf; +use function str_replace; use function strlen; +use function strpos; +use function strtolower; +use function strtoupper; /** * Base class for all DatabasePlatforms. The DatabasePlatforms are the central diff --git a/lib/Doctrine/DBAL/Platforms/DB2Platform.php b/lib/Doctrine/DBAL/Platforms/DB2Platform.php index a324dc471c9..df2faab440d 100644 --- a/lib/Doctrine/DBAL/Platforms/DB2Platform.php +++ b/lib/Doctrine/DBAL/Platforms/DB2Platform.php @@ -26,6 +26,14 @@ use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\Types\Type; +use function array_merge; +use function count; +use function current; +use function explode; +use function implode; +use function sprintf; +use function strpos; +use function strtoupper; class DB2Platform extends AbstractPlatform { diff --git a/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php b/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php index 86e3ea070ec..3037d895e3e 100644 --- a/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php @@ -24,6 +24,19 @@ use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\Types\BinaryType; +use function array_merge; +use function array_unique; +use function array_values; +use function count; +use function func_get_args; +use function implode; +use function is_array; +use function is_bool; +use function is_numeric; +use function is_string; +use function join; +use function sprintf; +use function trim; /** * Drizzle platform diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php b/lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php index 8fad40c580a..e8933a3860d 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/KeywordList.php @@ -19,6 +19,10 @@ namespace Doctrine\DBAL\Platforms\Keywords; +use function array_flip; +use function array_map; +use function strtoupper; + /** * Abstract interface for a SQL reserved keyword dictionary. * diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL92Keywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL92Keywords.php index 7ce91ed0522..d6c6a9d3f77 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL92Keywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL92Keywords.php @@ -19,6 +19,8 @@ namespace Doctrine\DBAL\Platforms\Keywords; +use function array_merge; + /** * PostgreSQL 9.2 reserved keywords list. * diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php index 0e2d9c5ac2b..8daa59539a4 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/PostgreSQL94Keywords.php @@ -19,6 +19,9 @@ namespace Doctrine\DBAL\Platforms\Keywords; +use function array_diff; +use function array_merge; + /** * PostgreSQL 9.4 reserved keywords list. * diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php b/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php index cb35aba47e5..c6a5954e274 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/ReservedKeywordsValidator.php @@ -26,6 +26,8 @@ use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Sequence; use Doctrine\DBAL\Schema\Index; +use function implode; +use function str_replace; class ReservedKeywordsValidator implements Visitor { diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere11Keywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere11Keywords.php index fbbdc40fd55..6e67ee2e6fa 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere11Keywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere11Keywords.php @@ -19,6 +19,9 @@ namespace Doctrine\DBAL\Platforms\Keywords; +use function array_diff; +use function array_merge; + /** * SAP Sybase SQL Anywhere 11 reserved keywords list. * diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere12Keywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere12Keywords.php index 7367fc82fb4..ebc38bf8440 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere12Keywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere12Keywords.php @@ -19,6 +19,9 @@ namespace Doctrine\DBAL\Platforms\Keywords; +use function array_diff; +use function array_merge; + /** * SAP Sybase SQL Anywhere 12 reserved keywords list. * diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php index 5f3883a4271..1ec984e789c 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/SQLAnywhere16Keywords.php @@ -19,6 +19,8 @@ namespace Doctrine\DBAL\Platforms\Keywords; +use function array_merge; + /** * SAP Sybase SQL Anywhere 16 reserved keywords list. * diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2005Keywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2005Keywords.php index 18cb83a1bd8..02b4656208d 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2005Keywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2005Keywords.php @@ -19,6 +19,9 @@ namespace Doctrine\DBAL\Platforms\Keywords; +use function array_diff; +use function array_merge; + /** * Microsoft SQL Server 2005 reserved keyword dictionary. * diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2008Keywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2008Keywords.php index 6aa586e8818..b5c38610afa 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2008Keywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2008Keywords.php @@ -19,6 +19,8 @@ namespace Doctrine\DBAL\Platforms\Keywords; +use function array_merge; + /** * Microsoft SQL Server 2008 reserved keyword dictionary. * diff --git a/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2012Keywords.php b/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2012Keywords.php index 9eabada0c9c..bf621bff8af 100644 --- a/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2012Keywords.php +++ b/lib/Doctrine/DBAL/Platforms/Keywords/SQLServer2012Keywords.php @@ -19,6 +19,8 @@ namespace Doctrine\DBAL\Platforms\Keywords; +use function array_merge; + /** * Microsoft SQL Server 2012 reserved keyword dictionary. * diff --git a/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php b/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php index 56f1e9a2ee7..e318c2650ce 100644 --- a/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php @@ -26,6 +26,21 @@ use Doctrine\DBAL\TransactionIsolationLevel; use Doctrine\DBAL\Types\BlobType; use Doctrine\DBAL\Types\TextType; +use function array_diff_key; +use function array_merge; +use function array_unique; +use function array_values; +use function count; +use function func_get_args; +use function implode; +use function in_array; +use function is_numeric; +use function is_string; +use function join; +use function sprintf; +use function str_replace; +use function strtoupper; +use function trim; /** * The MySqlPlatform provides the behavior, features and SQL dialect of the diff --git a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php index a6796eec245..1abc6cba108 100644 --- a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php @@ -28,6 +28,17 @@ use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\TransactionIsolationLevel; use Doctrine\DBAL\Types\BinaryType; +use function array_merge; +use function count; +use function explode; +use function implode; +use function preg_match; +use function sprintf; +use function str_replace; +use function strlen; +use function strpos; +use function strtoupper; +use function substr; /** * OraclePlatform. diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSQL91Platform.php b/lib/Doctrine/DBAL/Platforms/PostgreSQL91Platform.php index 1ba03153b55..94d810483d4 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSQL91Platform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSQL91Platform.php @@ -19,6 +19,8 @@ namespace Doctrine\DBAL\Platforms; +use function explode; + /** * Provides the behavior, features and SQL dialect of the PostgreSQL 9.1 database platform. * diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php index 4830068a2c5..61f6e09c497 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php @@ -30,6 +30,22 @@ use Doctrine\DBAL\Types\BlobType; use Doctrine\DBAL\Types\IntegerType; use Doctrine\DBAL\Types\Type; +use function array_diff; +use function array_merge; +use function array_unique; +use function array_values; +use function count; +use function explode; +use function implode; +use function in_array; +use function is_array; +use function is_bool; +use function is_numeric; +use function is_string; +use function str_replace; +use function strpos; +use function strtolower; +use function trim; /** * PostgreSqlPlatform. diff --git a/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php b/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php index e520b141aa7..98bc4689a9f 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php @@ -30,6 +30,20 @@ use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\TransactionIsolationLevel; +use function array_merge; +use function array_unique; +use function array_values; +use function count; +use function explode; +use function func_get_args; +use function get_class; +use function implode; +use function is_string; +use function preg_replace; +use function strlen; +use function strpos; +use function strtoupper; +use function substr; /** * The SQLAnywherePlatform provides the behavior, features and SQL dialect of the diff --git a/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php b/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php index 1fcb8a4dad1..df523ca764b 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLServer2012Platform.php @@ -20,6 +20,10 @@ namespace Doctrine\DBAL\Platforms; use Doctrine\DBAL\Schema\Sequence; +use const PREG_OFFSET_CAPTURE; +use function preg_match; +use function preg_match_all; +use function substr_count; /** * Platform to ensure compatibility of Doctrine with Microsoft SQL Server 2012 version. diff --git a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php b/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php index 4147dbd0ffb..3531afb9836 100644 --- a/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php @@ -28,10 +28,31 @@ use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\Types; +use function array_merge; +use function array_unique; +use function array_values; +use function count; +use function crc32; +use function dechex; use function explode; +use function func_get_args; use function implode; +use function is_array; +use function is_bool; +use function is_null; +use function is_numeric; +use function is_string; +use function preg_match; +use function preg_replace; use function sprintf; +use function str_replace; +use function stripos; +use function stristr; +use function strlen; use function strpos; +use function strtoupper; +use function substr; +use function substr_count; /** * The SQLServerPlatform provides the behavior, features and SQL dialect of the diff --git a/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php b/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php index 495b6011b6c..251500d065d 100644 --- a/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php @@ -29,6 +29,17 @@ use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\TransactionIsolationLevel; use Doctrine\DBAL\Types; +use function array_merge; +use function array_unique; +use function array_values; +use function implode; +use function is_numeric; +use function sprintf; +use function sqrt; +use function str_replace; +use function strlen; +use function strpos; +use function strtolower; /** * The SqlitePlatform class describes the specifics and dialects of the SQLite diff --git a/lib/Doctrine/DBAL/Portability/Connection.php b/lib/Doctrine/DBAL/Portability/Connection.php index d841d317879..723a333bb18 100644 --- a/lib/Doctrine/DBAL/Portability/Connection.php +++ b/lib/Doctrine/DBAL/Portability/Connection.php @@ -21,6 +21,9 @@ use Doctrine\DBAL\Cache\QueryCacheProfile; use Doctrine\DBAL\ColumnCase; +use const CASE_LOWER; +use const CASE_UPPER; +use function func_get_args; /** * Portability wrapper for a Connection. diff --git a/lib/Doctrine/DBAL/Portability/Statement.php b/lib/Doctrine/DBAL/Portability/Statement.php index f36c365b4ea..bd9a445fe59 100644 --- a/lib/Doctrine/DBAL/Portability/Statement.php +++ b/lib/Doctrine/DBAL/Portability/Statement.php @@ -21,6 +21,10 @@ use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\ParameterType; +use function array_change_key_case; +use function is_null; +use function is_string; +use function rtrim; /** * Portability wrapper for a Statement. diff --git a/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php b/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php index 1ea10f3598e..00802a44ee8 100644 --- a/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php +++ b/lib/Doctrine/DBAL/Query/Expression/CompositeExpression.php @@ -19,6 +19,9 @@ namespace Doctrine\DBAL\Query\Expression; +use function count; +use function implode; + /** * Composite expression is responsible to build a group of similar expression. * diff --git a/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php b/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php index fed4434430c..1ee72484775 100644 --- a/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php +++ b/lib/Doctrine/DBAL/Query/Expression/ExpressionBuilder.php @@ -21,7 +21,9 @@ use Doctrine\DBAL\Connection; use function func_get_arg; +use function func_get_args; use function func_num_args; +use function implode; use function sprintf; /** diff --git a/lib/Doctrine/DBAL/Query/QueryBuilder.php b/lib/Doctrine/DBAL/Query/QueryBuilder.php index 4bfeff1ab7c..0eac78a56aa 100644 --- a/lib/Doctrine/DBAL/Query/QueryBuilder.php +++ b/lib/Doctrine/DBAL/Query/QueryBuilder.php @@ -22,6 +22,18 @@ use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Query\Expression\CompositeExpression; use Doctrine\DBAL\Connection; +use function array_key_exists; +use function array_keys; +use function array_unshift; +use function func_get_args; +use function func_num_args; +use function implode; +use function is_array; +use function is_null; +use function is_object; +use function key; +use function strtoupper; +use function substr; /** * QueryBuilder class is responsible to dynamically create SQL queries. diff --git a/lib/Doctrine/DBAL/Query/QueryException.php b/lib/Doctrine/DBAL/Query/QueryException.php index 53c7a7fad39..45a3d55f650 100644 --- a/lib/Doctrine/DBAL/Query/QueryException.php +++ b/lib/Doctrine/DBAL/Query/QueryException.php @@ -20,6 +20,7 @@ namespace Doctrine\DBAL\Query; use Doctrine\DBAL\DBALException; +use function implode; /** * @since 2.1.4 diff --git a/lib/Doctrine/DBAL/SQLParserUtils.php b/lib/Doctrine/DBAL/SQLParserUtils.php index d3b600c917a..e635af754d9 100644 --- a/lib/Doctrine/DBAL/SQLParserUtils.php +++ b/lib/Doctrine/DBAL/SQLParserUtils.php @@ -19,6 +19,22 @@ namespace Doctrine\DBAL; +use const PREG_OFFSET_CAPTURE; +use function array_fill; +use function array_key_exists; +use function array_merge; +use function array_slice; +use function array_values; +use function count; +use function implode; +use function is_int; +use function key; +use function ksort; +use function preg_match_all; +use function strlen; +use function strpos; +use function substr; + /** * Utility class that parses sql statements with regard to types and parameters. * diff --git a/lib/Doctrine/DBAL/SQLParserUtilsException.php b/lib/Doctrine/DBAL/SQLParserUtilsException.php index 25c7209c7be..e7c15c53e84 100644 --- a/lib/Doctrine/DBAL/SQLParserUtilsException.php +++ b/lib/Doctrine/DBAL/SQLParserUtilsException.php @@ -21,6 +21,8 @@ namespace Doctrine\DBAL; +use function sprintf; + /** * Doctrine\DBAL\ConnectionException * diff --git a/lib/Doctrine/DBAL/Schema/AbstractAsset.php b/lib/Doctrine/DBAL/Schema/AbstractAsset.php index cd1c81f0f11..3ac7fb8bd37 100644 --- a/lib/Doctrine/DBAL/Schema/AbstractAsset.php +++ b/lib/Doctrine/DBAL/Schema/AbstractAsset.php @@ -20,6 +20,16 @@ namespace Doctrine\DBAL\Schema; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function array_map; +use function crc32; +use function dechex; +use function explode; +use function implode; +use function str_replace; +use function strpos; +use function strtolower; +use function strtoupper; +use function substr; /** * The abstract asset allows to reset the name of all assets without publishing this to the public userland. diff --git a/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php b/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php index 345d4812d90..c8677901116 100644 --- a/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php @@ -24,6 +24,17 @@ use Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs; use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function array_filter; +use function array_map; +use function array_values; +use function call_user_func_array; +use function count; +use function func_get_args; +use function is_array; +use function is_null; +use function preg_match; +use function str_replace; +use function strtolower; /** * Base class for schema managers. Schema managers are used to inspect and/or diff --git a/lib/Doctrine/DBAL/Schema/Column.php b/lib/Doctrine/DBAL/Schema/Column.php index 0db2b91fde4..7534a33035c 100644 --- a/lib/Doctrine/DBAL/Schema/Column.php +++ b/lib/Doctrine/DBAL/Schema/Column.php @@ -20,6 +20,12 @@ namespace Doctrine\DBAL\Schema; use Doctrine\DBAL\Types\Type; +use const E_USER_DEPRECATED; +use function array_merge; +use function is_numeric; +use function method_exists; +use function sprintf; +use function trigger_error; /** * Object representation of a database column. diff --git a/lib/Doctrine/DBAL/Schema/ColumnDiff.php b/lib/Doctrine/DBAL/Schema/ColumnDiff.php index efa2ffe9e2b..65517d75cb5 100644 --- a/lib/Doctrine/DBAL/Schema/ColumnDiff.php +++ b/lib/Doctrine/DBAL/Schema/ColumnDiff.php @@ -19,6 +19,8 @@ namespace Doctrine\DBAL\Schema; +use function in_array; + /** * Represents the change of a column. * diff --git a/lib/Doctrine/DBAL/Schema/Comparator.php b/lib/Doctrine/DBAL/Schema/Comparator.php index 2bcb8737c22..6e0c42fe4ae 100644 --- a/lib/Doctrine/DBAL/Schema/Comparator.php +++ b/lib/Doctrine/DBAL/Schema/Comparator.php @@ -20,6 +20,15 @@ namespace Doctrine\DBAL\Schema; use Doctrine\DBAL\Types; +use function array_intersect_key; +use function array_key_exists; +use function array_keys; +use function array_map; +use function array_merge; +use function array_shift; +use function array_unique; +use function count; +use function strtolower; /** * Compares two Schemas and return an instance of SchemaDiff. diff --git a/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php b/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php index 890bfa4f3fa..c97685b5d0e 100644 --- a/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/DB2SchemaManager.php @@ -19,6 +19,13 @@ namespace Doctrine\DBAL\Schema; +use function array_change_key_case; +use function is_resource; +use function strpos; +use function strtolower; +use function substr; +use function trim; + /** * IBM Db2 Schema Manager. * diff --git a/lib/Doctrine/DBAL/Schema/DrizzleSchemaManager.php b/lib/Doctrine/DBAL/Schema/DrizzleSchemaManager.php index 62f7fed17f1..a10eb3da066 100644 --- a/lib/Doctrine/DBAL/Schema/DrizzleSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/DrizzleSchemaManager.php @@ -20,6 +20,9 @@ namespace Doctrine\DBAL\Schema; use Doctrine\DBAL\Types\Type; +use function explode; +use function strtolower; +use function trim; /** * Schema manager for the Drizzle RDBMS. diff --git a/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php b/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php index dd0a89cac2c..a50b7a0b5c5 100644 --- a/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php +++ b/lib/Doctrine/DBAL/Schema/ForeignKeyConstraint.php @@ -20,6 +20,14 @@ namespace Doctrine\DBAL\Schema; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function array_combine; +use function array_keys; +use function array_map; +use function end; +use function explode; +use function in_array; +use function strtolower; +use function strtoupper; /** * An abstraction class for a foreign key constraint. diff --git a/lib/Doctrine/DBAL/Schema/Index.php b/lib/Doctrine/DBAL/Schema/Index.php index 29685f80d58..78a2322c8d0 100644 --- a/lib/Doctrine/DBAL/Schema/Index.php +++ b/lib/Doctrine/DBAL/Schema/Index.php @@ -20,6 +20,12 @@ namespace Doctrine\DBAL\Schema; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function array_keys; +use function array_map; +use function array_search; +use function count; +use function is_string; +use function strtolower; class Index extends AbstractAsset implements Constraint { diff --git a/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php b/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php index 9b07976f2db..a56a6af86b2 100644 --- a/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php @@ -22,6 +22,18 @@ use Doctrine\DBAL\Platforms\MariaDb1027Platform; use Doctrine\DBAL\Platforms\MySqlPlatform; use Doctrine\DBAL\Types\Type; +use const CASE_LOWER; +use function array_change_key_case; +use function array_shift; +use function array_values; +use function end; +use function preg_match; +use function preg_replace; +use function str_replace; +use function stripslashes; +use function strpos; +use function strtok; +use function strtolower; /** * Schema manager for the MySql RDBMS. diff --git a/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php b/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php index ae62af6e3ba..dafc1fac20c 100644 --- a/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php @@ -22,6 +22,16 @@ use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Driver\DriverException; use Doctrine\DBAL\Types\Type; +use const CASE_LOWER; +use function array_change_key_case; +use function array_values; +use function is_null; +use function preg_match; +use function sprintf; +use function strpos; +use function strtolower; +use function strtoupper; +use function trim; /** * Oracle Schema Manager. diff --git a/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php b/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php index 15a591915bf..6eeaf119193 100644 --- a/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php @@ -21,6 +21,23 @@ use Doctrine\DBAL\Exception\DriverException; use Doctrine\DBAL\Types\Type; +use const CASE_LOWER; +use function array_change_key_case; +use function array_filter; +use function array_keys; +use function array_map; +use function array_shift; +use function explode; +use function in_array; +use function join; +use function preg_match; +use function preg_replace; +use function str_replace; +use function stripos; +use function strlen; +use function strpos; +use function strtolower; +use function trim; /** * PostgreSQL Schema Manager. diff --git a/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php b/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php index 83f3720a07d..4025c0345c8 100644 --- a/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/SQLAnywhereSchemaManager.php @@ -20,6 +20,7 @@ namespace Doctrine\DBAL\Schema; use Doctrine\DBAL\Types\Type; +use function preg_replace; /** * SAP Sybase SQL Anywhere schema manager. diff --git a/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php b/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php index 8ae89899f16..13525b7b2af 100644 --- a/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php @@ -22,6 +22,14 @@ use Doctrine\DBAL\DBALException; use Doctrine\DBAL\Driver\DriverException; use Doctrine\DBAL\Types\Type; +use function count; +use function in_array; +use function preg_replace; +use function sprintf; +use function str_replace; +use function strpos; +use function strtok; +use function trim; /** * SQL Server Schema Manager. diff --git a/lib/Doctrine/DBAL/Schema/Schema.php b/lib/Doctrine/DBAL/Schema/Schema.php index 0a30d7b6654..88e5ed0ded7 100644 --- a/lib/Doctrine/DBAL/Schema/Schema.php +++ b/lib/Doctrine/DBAL/Schema/Schema.php @@ -24,6 +24,9 @@ use Doctrine\DBAL\Schema\Visitor\NamespaceVisitor; use Doctrine\DBAL\Schema\Visitor\Visitor; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function array_keys; +use function strpos; +use function strtolower; /** * Object representation of a database schema. diff --git a/lib/Doctrine/DBAL/Schema/SchemaDiff.php b/lib/Doctrine/DBAL/Schema/SchemaDiff.php index 88c04bad4d3..ec9ccba933d 100644 --- a/lib/Doctrine/DBAL/Schema/SchemaDiff.php +++ b/lib/Doctrine/DBAL/Schema/SchemaDiff.php @@ -20,6 +20,7 @@ namespace Doctrine\DBAL\Schema; use \Doctrine\DBAL\Platforms\AbstractPlatform; +use function array_merge; /** * Schema Diff. diff --git a/lib/Doctrine/DBAL/Schema/SchemaException.php b/lib/Doctrine/DBAL/Schema/SchemaException.php index 23572074075..7285d81cbf0 100644 --- a/lib/Doctrine/DBAL/Schema/SchemaException.php +++ b/lib/Doctrine/DBAL/Schema/SchemaException.php @@ -19,6 +19,9 @@ namespace Doctrine\DBAL\Schema; +use function implode; +use function sprintf; + class SchemaException extends \Doctrine\DBAL\DBALException { const TABLE_DOESNT_EXIST = 10; diff --git a/lib/Doctrine/DBAL/Schema/Sequence.php b/lib/Doctrine/DBAL/Schema/Sequence.php index b464b46a3d2..7d255305e02 100644 --- a/lib/Doctrine/DBAL/Schema/Sequence.php +++ b/lib/Doctrine/DBAL/Schema/Sequence.php @@ -20,6 +20,9 @@ namespace Doctrine\DBAL\Schema; use Doctrine\DBAL\Schema\Visitor\Visitor; +use function count; +use function is_numeric; +use function sprintf; /** * Sequence structure. diff --git a/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php b/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php index d29564647d1..ee11049aa36 100644 --- a/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php @@ -24,6 +24,25 @@ use Doctrine\DBAL\Types\StringType; use Doctrine\DBAL\Types\TextType; use Doctrine\DBAL\Types\Type; +use const CASE_LOWER; +use function array_change_key_case; +use function array_map; +use function array_reverse; +use function array_values; +use function explode; +use function file_exists; +use function preg_match; +use function preg_match_all; +use function preg_quote; +use function preg_replace; +use function rtrim; +use function sprintf; +use function str_replace; +use function strpos; +use function strtolower; +use function trim; +use function unlink; +use function usort; /** * Sqlite SchemaManager. diff --git a/lib/Doctrine/DBAL/Schema/Synchronizer/SingleDatabaseSynchronizer.php b/lib/Doctrine/DBAL/Schema/Synchronizer/SingleDatabaseSynchronizer.php index 7cab7a5b3a1..f22607e6b96 100644 --- a/lib/Doctrine/DBAL/Schema/Synchronizer/SingleDatabaseSynchronizer.php +++ b/lib/Doctrine/DBAL/Schema/Synchronizer/SingleDatabaseSynchronizer.php @@ -23,6 +23,7 @@ use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Comparator; use Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector; +use function count; /** * Schema Synchronizer for Default DBAL Connection. diff --git a/lib/Doctrine/DBAL/Schema/Table.php b/lib/Doctrine/DBAL/Schema/Table.php index 0b390a6bb2b..40af2b2198f 100644 --- a/lib/Doctrine/DBAL/Schema/Table.php +++ b/lib/Doctrine/DBAL/Schema/Table.php @@ -22,6 +22,15 @@ use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Schema\Visitor\Visitor; use Doctrine\DBAL\DBALException; +use const ARRAY_FILTER_USE_KEY; +use function array_filter; +use function array_merge; +use function in_array; +use function is_numeric; +use function is_string; +use function preg_match; +use function strlen; +use function strtolower; /** * Object Representation of a table. diff --git a/lib/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php b/lib/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php index 777a1540d12..0d92edb0998 100644 --- a/lib/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php +++ b/lib/Doctrine/DBAL/Schema/Visitor/CreateSchemaSqlCollector.php @@ -23,6 +23,7 @@ use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\ForeignKeyConstraint; use Doctrine\DBAL\Schema\Sequence; +use function array_merge; class CreateSchemaSqlCollector extends AbstractVisitor { diff --git a/lib/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php b/lib/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php index 58c324c6c3f..abd183d5ae5 100644 --- a/lib/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php +++ b/lib/Doctrine/DBAL/Schema/Visitor/DropSchemaSqlCollector.php @@ -24,6 +24,7 @@ use Doctrine\DBAL\Schema\ForeignKeyConstraint; use Doctrine\DBAL\Schema\Sequence; use Doctrine\DBAL\Schema\SchemaException; +use function strlen; /** * Gathers SQL statements that allow to completely drop the current schema. diff --git a/lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php b/lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php index 33f1888a3d6..daec58ef064 100644 --- a/lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php +++ b/lib/Doctrine/DBAL/Schema/Visitor/Graphviz.php @@ -22,6 +22,12 @@ use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\ForeignKeyConstraint; +use function current; +use function file_put_contents; +use function in_array; +use function mt_rand; +use function sha1; +use function strtolower; /** * Create a Graphviz output of a Schema. diff --git a/lib/Doctrine/DBAL/Sharding/PoolingShardConnection.php b/lib/Doctrine/DBAL/Sharding/PoolingShardConnection.php index 36458deb72c..8145480d819 100644 --- a/lib/Doctrine/DBAL/Sharding/PoolingShardConnection.php +++ b/lib/Doctrine/DBAL/Sharding/PoolingShardConnection.php @@ -26,6 +26,9 @@ use Doctrine\DBAL\Event\ConnectionEventArgs; use Doctrine\DBAL\Events; use Doctrine\DBAL\Sharding\ShardChoser\ShardChoser; +use function array_merge; +use function is_numeric; +use function is_string; /** * Sharding implementation that pools many different connections diff --git a/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureFederationsSynchronizer.php b/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureFederationsSynchronizer.php index f332137bde4..2b700b38a4a 100644 --- a/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureFederationsSynchronizer.php +++ b/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureFederationsSynchronizer.php @@ -26,6 +26,7 @@ use Doctrine\DBAL\Schema\Synchronizer\AbstractSchemaSynchronizer; use Doctrine\DBAL\Schema\Synchronizer\SingleDatabaseSynchronizer; use Doctrine\DBAL\Schema\Synchronizer\SchemaSynchronizer; +use function array_merge; /** * SQL Azure Schema Synchronizer. diff --git a/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureShardManager.php b/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureShardManager.php index a9dd7fe5c5a..255ca8b418e 100644 --- a/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureShardManager.php +++ b/lib/Doctrine/DBAL/Sharding/SQLAzure/SQLAzureShardManager.php @@ -23,6 +23,9 @@ use Doctrine\DBAL\Sharding\ShardingException; use Doctrine\DBAL\Sharding\ShardManager; use Doctrine\DBAL\Types\Type; +use function is_bool; +use function is_scalar; +use function sprintf; /** * Sharding using the SQL Azure Federations support. diff --git a/lib/Doctrine/DBAL/Sharding/SQLAzure/Schema/MultiTenantVisitor.php b/lib/Doctrine/DBAL/Sharding/SQLAzure/Schema/MultiTenantVisitor.php index 514bf73145a..92851d00182 100644 --- a/lib/Doctrine/DBAL/Sharding/SQLAzure/Schema/MultiTenantVisitor.php +++ b/lib/Doctrine/DBAL/Sharding/SQLAzure/Schema/MultiTenantVisitor.php @@ -26,6 +26,7 @@ use Doctrine\DBAL\Schema\ForeignKeyConstraint; use Doctrine\DBAL\Schema\Sequence; use Doctrine\DBAL\Schema\Index; +use function in_array; /** * Converts a single tenant schema into a multi-tenant schema for SQL Azure diff --git a/lib/Doctrine/DBAL/Statement.php b/lib/Doctrine/DBAL/Statement.php index 6469e501f0a..9774e4afe0a 100644 --- a/lib/Doctrine/DBAL/Statement.php +++ b/lib/Doctrine/DBAL/Statement.php @@ -21,6 +21,8 @@ use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Driver\Statement as DriverStatement; +use function is_array; +use function is_string; /** * A thin wrapper around a Doctrine\DBAL\Driver\Statement that adds support diff --git a/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php b/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php index d183421d514..78921f39c2e 100644 --- a/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php +++ b/lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php @@ -23,6 +23,12 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; +use const PHP_EOL; +use function file_exists; +use function file_get_contents; +use function is_readable; +use function realpath; +use function sprintf; /** * Task for executing arbitrary SQL that can come from a file or directly from diff --git a/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php b/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php index 0e097e45f7f..82b56241d93 100644 --- a/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php +++ b/lib/Doctrine/DBAL/Tools/Console/Command/ReservedWordsCommand.php @@ -24,6 +24,9 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +use function array_keys; +use function count; +use function implode; class ReservedWordsCommand extends Command { diff --git a/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php b/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php index 0b0f7ba2c00..27982d08950 100644 --- a/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php +++ b/lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php @@ -24,6 +24,10 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Input\InputOption; +use function is_numeric; +use function ob_get_clean; +use function ob_start; +use function stripos; /** * Task for executing arbitrary SQL that can come from a file or directly from diff --git a/lib/Doctrine/DBAL/Types/ArrayType.php b/lib/Doctrine/DBAL/Types/ArrayType.php index f8c62cb7a90..7fc4fcc9be6 100644 --- a/lib/Doctrine/DBAL/Types/ArrayType.php +++ b/lib/Doctrine/DBAL/Types/ArrayType.php @@ -20,6 +20,10 @@ namespace Doctrine\DBAL\Types; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function is_resource; +use function serialize; +use function stream_get_contents; +use function unserialize; /** * Type that maps a PHP array to a clob SQL type. diff --git a/lib/Doctrine/DBAL/Types/BinaryType.php b/lib/Doctrine/DBAL/Types/BinaryType.php index a112e776a15..08dd7f74169 100644 --- a/lib/Doctrine/DBAL/Types/BinaryType.php +++ b/lib/Doctrine/DBAL/Types/BinaryType.php @@ -21,6 +21,11 @@ use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function fopen; +use function fseek; +use function fwrite; +use function is_resource; +use function is_string; /** * Type that maps ab SQL BINARY/VARBINARY to a PHP resource stream. diff --git a/lib/Doctrine/DBAL/Types/BlobType.php b/lib/Doctrine/DBAL/Types/BlobType.php index b0173e1a6d7..84ee48af83e 100644 --- a/lib/Doctrine/DBAL/Types/BlobType.php +++ b/lib/Doctrine/DBAL/Types/BlobType.php @@ -21,6 +21,11 @@ use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function fopen; +use function fseek; +use function fwrite; +use function is_resource; +use function is_string; /** * Type that maps an SQL BLOB to a PHP resource stream. diff --git a/lib/Doctrine/DBAL/Types/ConversionException.php b/lib/Doctrine/DBAL/Types/ConversionException.php index bf59eb92220..df2eb74a38f 100644 --- a/lib/Doctrine/DBAL/Types/ConversionException.php +++ b/lib/Doctrine/DBAL/Types/ConversionException.php @@ -29,6 +29,15 @@ */ namespace Doctrine\DBAL\Types; +use function get_class; +use function gettype; +use function implode; +use function is_object; +use function is_scalar; +use function sprintf; +use function strlen; +use function substr; + class ConversionException extends \Doctrine\DBAL\DBALException { /** diff --git a/lib/Doctrine/DBAL/Types/DateTimeType.php b/lib/Doctrine/DBAL/Types/DateTimeType.php index a681ecad6ee..3cb76ee5b54 100644 --- a/lib/Doctrine/DBAL/Types/DateTimeType.php +++ b/lib/Doctrine/DBAL/Types/DateTimeType.php @@ -20,6 +20,7 @@ namespace Doctrine\DBAL\Types; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function date_create; /** * Type that maps an SQL DATETIME/TIMESTAMP to a PHP DateTime object. diff --git a/lib/Doctrine/DBAL/Types/JsonArrayType.php b/lib/Doctrine/DBAL/Types/JsonArrayType.php index 8cf497f0473..5650eb51856 100644 --- a/lib/Doctrine/DBAL/Types/JsonArrayType.php +++ b/lib/Doctrine/DBAL/Types/JsonArrayType.php @@ -20,6 +20,9 @@ namespace Doctrine\DBAL\Types; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function is_resource; +use function json_decode; +use function stream_get_contents; /** * Array Type which can be used to generate json arrays. diff --git a/lib/Doctrine/DBAL/Types/JsonType.php b/lib/Doctrine/DBAL/Types/JsonType.php index 0514a67bc14..6395332c682 100644 --- a/lib/Doctrine/DBAL/Types/JsonType.php +++ b/lib/Doctrine/DBAL/Types/JsonType.php @@ -20,6 +20,13 @@ namespace Doctrine\DBAL\Types; use Doctrine\DBAL\Platforms\AbstractPlatform; +use const JSON_ERROR_NONE; +use function is_resource; +use function json_decode; +use function json_encode; +use function json_last_error; +use function json_last_error_msg; +use function stream_get_contents; /** * Type generating json objects values diff --git a/lib/Doctrine/DBAL/Types/ObjectType.php b/lib/Doctrine/DBAL/Types/ObjectType.php index 0b1f87a23c7..95fe84a5a19 100644 --- a/lib/Doctrine/DBAL/Types/ObjectType.php +++ b/lib/Doctrine/DBAL/Types/ObjectType.php @@ -20,6 +20,10 @@ namespace Doctrine\DBAL\Types; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function is_resource; +use function serialize; +use function stream_get_contents; +use function unserialize; /** * Type that maps a PHP object to a clob SQL type. diff --git a/lib/Doctrine/DBAL/Types/SimpleArrayType.php b/lib/Doctrine/DBAL/Types/SimpleArrayType.php index 9ee3ac806fd..fb01479e322 100644 --- a/lib/Doctrine/DBAL/Types/SimpleArrayType.php +++ b/lib/Doctrine/DBAL/Types/SimpleArrayType.php @@ -20,6 +20,10 @@ namespace Doctrine\DBAL\Types; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function explode; +use function implode; +use function is_resource; +use function stream_get_contents; /** * Array Type which can be used for simple values. diff --git a/lib/Doctrine/DBAL/Types/TextType.php b/lib/Doctrine/DBAL/Types/TextType.php index 4055ac88d22..bd72355464d 100644 --- a/lib/Doctrine/DBAL/Types/TextType.php +++ b/lib/Doctrine/DBAL/Types/TextType.php @@ -20,6 +20,8 @@ namespace Doctrine\DBAL\Types; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function is_resource; +use function stream_get_contents; /** * Type that maps an SQL CLOB to a PHP string. diff --git a/lib/Doctrine/DBAL/Types/Type.php b/lib/Doctrine/DBAL/Types/Type.php index eed08fc5a76..453631e0aaa 100644 --- a/lib/Doctrine/DBAL/Types/Type.php +++ b/lib/Doctrine/DBAL/Types/Type.php @@ -22,6 +22,10 @@ use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\DBALException; +use function end; +use function explode; +use function get_class; +use function str_replace; /** * The base class for so-called Doctrine mapping types. diff --git a/lib/Doctrine/DBAL/Types/VarDateTimeImmutableType.php b/lib/Doctrine/DBAL/Types/VarDateTimeImmutableType.php index 3a3735b042a..f0e8ff84482 100644 --- a/lib/Doctrine/DBAL/Types/VarDateTimeImmutableType.php +++ b/lib/Doctrine/DBAL/Types/VarDateTimeImmutableType.php @@ -20,6 +20,7 @@ namespace Doctrine\DBAL\Types; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function date_create_immutable; /** * Immutable type of {@see VarDateTimeType}. diff --git a/lib/Doctrine/DBAL/Types/VarDateTimeType.php b/lib/Doctrine/DBAL/Types/VarDateTimeType.php index 5cf35f79583..b55e0b05b3e 100644 --- a/lib/Doctrine/DBAL/Types/VarDateTimeType.php +++ b/lib/Doctrine/DBAL/Types/VarDateTimeType.php @@ -20,6 +20,7 @@ namespace Doctrine\DBAL\Types; use Doctrine\DBAL\Platforms\AbstractPlatform; +use function date_create; /** * Variable DateTime Type using date_create() instead of DateTime::createFromFormat(). diff --git a/lib/Doctrine/DBAL/Version.php b/lib/Doctrine/DBAL/Version.php index 6d3eef7a127..1fbc7f31d73 100644 --- a/lib/Doctrine/DBAL/Version.php +++ b/lib/Doctrine/DBAL/Version.php @@ -19,6 +19,10 @@ namespace Doctrine\DBAL; +use function str_replace; +use function strtolower; +use function version_compare; + /** * Class to store and retrieve the version of Doctrine. * diff --git a/tests/Doctrine/Tests/DBAL/ConnectionTest.php b/tests/Doctrine/Tests/DBAL/ConnectionTest.php index 897d44302cd..819dd71f487 100644 --- a/tests/Doctrine/Tests/DBAL/ConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/ConnectionTest.php @@ -19,6 +19,7 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\Tests\Mocks\DriverMock; use Doctrine\Tests\Mocks\VersionAwarePlatformDriverMock; +use function call_user_func_array; /** * @requires extension pdo_mysql diff --git a/tests/Doctrine/Tests/DBAL/DBALExceptionTest.php b/tests/Doctrine/Tests/DBAL/DBALExceptionTest.php index 46911ecab1b..e83524f3c84 100644 --- a/tests/Doctrine/Tests/DBAL/DBALExceptionTest.php +++ b/tests/Doctrine/Tests/DBAL/DBALExceptionTest.php @@ -7,6 +7,9 @@ use Doctrine\DBAL\Driver\DriverException as InnerDriverException; use Doctrine\Tests\DbalTestCase; use Doctrine\DBAL\Driver; +use function chr; +use function fopen; +use function sprintf; class DBALExceptionTest extends DbalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/Driver/AbstractDriverTest.php b/tests/Doctrine/Tests/DBAL/Driver/AbstractDriverTest.php index dd448d65730..7a49b3f9577 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/AbstractDriverTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/AbstractDriverTest.php @@ -7,6 +7,8 @@ use Doctrine\DBAL\Driver\ExceptionConverterDriver; use Doctrine\DBAL\VersionAwarePlatformDriver; use Doctrine\Tests\DbalTestCase; +use function get_class; +use function sprintf; abstract class AbstractDriverTest extends DbalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/Driver/IBMDB2/DB2ConnectionTest.php b/tests/Doctrine/Tests/DBAL/Driver/IBMDB2/DB2ConnectionTest.php index 85343862ea3..114a5a108a1 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/IBMDB2/DB2ConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/IBMDB2/DB2ConnectionTest.php @@ -3,6 +3,7 @@ namespace Doctrine\Tests\DBAL\Driver\IBMDB2; use Doctrine\Tests\DbalTestCase; +use function extension_loaded; class DB2ConnectionTest extends DbalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/Driver/Mysqli/MysqliConnectionTest.php b/tests/Doctrine/Tests/DBAL/Driver/Mysqli/MysqliConnectionTest.php index 9ee3d26a76e..1dec0608eba 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/Mysqli/MysqliConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/Mysqli/MysqliConnectionTest.php @@ -6,6 +6,9 @@ use Doctrine\DBAL\Driver\Mysqli\MysqliException; use Doctrine\DBAL\Platforms\MySqlPlatform; use Doctrine\Tests\DbalFunctionalTestCase; +use function extension_loaded; +use function restore_error_handler; +use function set_error_handler; class MysqliConnectionTest extends DbalFunctionalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8ConnectionTest.php b/tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8ConnectionTest.php index 938d86322ed..864b1a643d5 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8ConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8ConnectionTest.php @@ -3,6 +3,7 @@ namespace Doctrine\Tests\DBAL\Driver\OCI8; use Doctrine\Tests\DbalTestCase; +use function extension_loaded; class OCI8ConnectionTest extends DbalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php b/tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php index 06e80338985..c8104fe0fa7 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/OCI8/OCI8StatementTest.php @@ -5,6 +5,7 @@ use Doctrine\DBAL\Driver\OCI8\OCI8Exception; use Doctrine\DBAL\Driver\OCI8\OCI8Statement; use Doctrine\Tests\DbalTestCase; +use function extension_loaded; class OCI8StatementTest extends DbalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/Driver/PDOExceptionTest.php b/tests/Doctrine/Tests/DBAL/Driver/PDOExceptionTest.php index 4040c2ac3e0..96691bacd9c 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/PDOExceptionTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/PDOExceptionTest.php @@ -4,6 +4,7 @@ use Doctrine\DBAL\Driver\PDOException; use Doctrine\Tests\DbalTestCase; +use function extension_loaded; class PDOExceptionTest extends DbalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/Driver/PDOPgSql/DriverTest.php b/tests/Doctrine/Tests/DBAL/Driver/PDOPgSql/DriverTest.php index c162ef96491..6fd187e3d28 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/PDOPgSql/DriverTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/PDOPgSql/DriverTest.php @@ -6,6 +6,7 @@ use Doctrine\Tests\DBAL\Driver\AbstractPostgreSQLDriverTest; use PDO; use PDOException; +use function defined; class DriverTest extends AbstractPostgreSQLDriverTest { diff --git a/tests/Doctrine/Tests/DBAL/Driver/SQLAnywhere/SQLAnywhereConnectionTest.php b/tests/Doctrine/Tests/DBAL/Driver/SQLAnywhere/SQLAnywhereConnectionTest.php index da4b4462699..273c2de1b85 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/SQLAnywhere/SQLAnywhereConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/SQLAnywhere/SQLAnywhereConnectionTest.php @@ -3,6 +3,7 @@ namespace Doctrine\Tests\DBAL\Driver\SQLAnywhere; use Doctrine\Tests\DbalTestCase; +use function extension_loaded; class SQLAnywhereConnectionTest extends DbalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/Driver/SQLSrv/SQLSrvConnectionTest.php b/tests/Doctrine/Tests/DBAL/Driver/SQLSrv/SQLSrvConnectionTest.php index 5cc8f847b41..089d2b11085 100644 --- a/tests/Doctrine/Tests/DBAL/Driver/SQLSrv/SQLSrvConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Driver/SQLSrv/SQLSrvConnectionTest.php @@ -3,6 +3,7 @@ namespace Doctrine\Tests\DBAL\Driver\SQLSrv; use Doctrine\Tests\DbalTestCase; +use function extension_loaded; class SQLSrvConnectionTest extends DbalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/DriverManagerTest.php b/tests/Doctrine/Tests/DBAL/DriverManagerTest.php index 473c0ac0206..b242ea49153 100644 --- a/tests/Doctrine/Tests/DBAL/DriverManagerTest.php +++ b/tests/Doctrine/Tests/DBAL/DriverManagerTest.php @@ -13,6 +13,9 @@ use Doctrine\Tests\Mocks\ConnectionMock; use Doctrine\Tests\Mocks\DriverMock; use stdClass; +use function extension_loaded; +use function in_array; +use function is_array; class DriverManagerTest extends DbalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/Events/OracleSessionInitTest.php b/tests/Doctrine/Tests/DBAL/Events/OracleSessionInitTest.php index 60648a13dbd..4ec3545c002 100644 --- a/tests/Doctrine/Tests/DBAL/Events/OracleSessionInitTest.php +++ b/tests/Doctrine/Tests/DBAL/Events/OracleSessionInitTest.php @@ -6,6 +6,7 @@ use Doctrine\DBAL\Event\Listeners\OracleSessionInit; use Doctrine\DBAL\Events; use Doctrine\Tests\DbalTestCase; +use function sprintf; class OracleSessionInitTest extends DbalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/Functional/BlobTest.php b/tests/Doctrine/Tests/DBAL/Functional/BlobTest.php index ebbff67bcef..25c72415718 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/BlobTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/BlobTest.php @@ -4,6 +4,9 @@ use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Types\Type; +use const CASE_LOWER; +use function array_change_key_case; +use function stream_get_contents; /** * @group DBAL-6 diff --git a/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php b/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php index e1b81198727..0c9d57895aa 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/ConnectionTest.php @@ -7,6 +7,7 @@ use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Types\Type; +use function in_array; class ConnectionTest extends \Doctrine\Tests\DbalFunctionalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php b/tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php index c02a0731ddc..137b2ed5e4f 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/DataAccessTest.php @@ -8,6 +8,18 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\TrimMode; use Doctrine\DBAL\Types\Type; +use const CASE_LOWER; +use const PHP_EOL; +use function array_change_key_case; +use function array_filter; +use function array_keys; +use function count; +use function date; +use function implode; +use function is_numeric; +use function json_encode; +use function property_exists; +use function strtotime; class DataAccessTest extends \Doctrine\Tests\DbalFunctionalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/Functional/Driver/IBMDB2/DB2DriverTest.php b/tests/Doctrine/Tests/DBAL/Functional/Driver/IBMDB2/DB2DriverTest.php index f345e88d92c..4bcc5b6cf76 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Driver/IBMDB2/DB2DriverTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Driver/IBMDB2/DB2DriverTest.php @@ -4,6 +4,7 @@ use Doctrine\DBAL\Driver\IBMDB2\DB2Driver; use Doctrine\Tests\DBAL\Functional\Driver\AbstractDriverTest; +use function extension_loaded; class DB2DriverTest extends AbstractDriverTest { diff --git a/tests/Doctrine/Tests/DBAL/Functional/Driver/IBMDB2/DB2StatementTest.php b/tests/Doctrine/Tests/DBAL/Functional/Driver/IBMDB2/DB2StatementTest.php index c915ef7723f..59b42a75635 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Driver/IBMDB2/DB2StatementTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Driver/IBMDB2/DB2StatementTest.php @@ -7,6 +7,7 @@ use Doctrine\DBAL\Driver\IBMDB2\DB2Driver; use Doctrine\Tests\DbalFunctionalTestCase; use PHPUnit\Framework\Error\Notice; +use function extension_loaded; class DB2StatementTest extends DbalFunctionalTestCase { diff --git a/tests/Doctrine/Tests/DBAL/Functional/Driver/Mysqli/ConnectionTest.php b/tests/Doctrine/Tests/DBAL/Functional/Driver/Mysqli/ConnectionTest.php index a320aca3fd2..c20533a4700 100644 --- a/tests/Doctrine/Tests/DBAL/Functional/Driver/Mysqli/ConnectionTest.php +++ b/tests/Doctrine/Tests/DBAL/Functional/Driver/Mysqli/ConnectionTest.php @@ -1,5 +1,6 @@