Unverified Commit f76bf5ef authored by Marco Pivetta's avatar Marco Pivetta Committed by GitHub

Merge pull request #3077 from Majkl578/cs-4.0+fn-const-imports

CS bump to 4.0, imports for global functions & constants
parents 46069b6b 9f3188ab
...@@ -84,6 +84,7 @@ install: ...@@ -84,6 +84,7 @@ install:
} }
} }
# install composer dependencies # install composer dependencies
- rm composer.lock
- appveyor-retry php composer.phar self-update - appveyor-retry php composer.phar self-update
- appveyor-retry php composer.phar install --no-progress --profile - appveyor-retry php composer.phar install --no-progress --profile
......
...@@ -10,3 +10,4 @@ build.xml export-ignore ...@@ -10,3 +10,4 @@ build.xml export-ignore
phpunit.xml.dist export-ignore phpunit.xml.dist export-ignore
run-all.sh export-ignore run-all.sh export-ignore
/phpcs.xml.dist export-ignore /phpcs.xml.dist export-ignore
/composer.lock export-ignore
...@@ -5,6 +5,5 @@ dist/ ...@@ -5,6 +5,5 @@ dist/
download/ download/
vendor/ vendor/
*.phpunit.xml *.phpunit.xml
composer.lock
/phpunit.xml /phpunit.xml
/.phpcs-cache /.phpcs-cache
...@@ -24,7 +24,8 @@ before_script: ...@@ -24,7 +24,8 @@ before_script:
- if [[ "$DB" == "mysql" || "$DB" == "mysqli" || "$DB" == *"mariadb"* ]]; then mysql < tests/travis/create-mysql-schema.sql; fi; - if [[ "$DB" == "mysql" || "$DB" == "mysqli" || "$DB" == *"mariadb"* ]]; then mysql < tests/travis/create-mysql-schema.sql; fi;
install: install:
- travis_retry composer -n install - rm composer.lock
- travis_retry composer -n update --prefer-dist
script: ./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml script: ./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml
...@@ -343,6 +344,7 @@ jobs: ...@@ -343,6 +344,7 @@ jobs:
- stage: Pull request coding standard - stage: Pull request coding standard
if: type = pull_request if: type = pull_request
php: 7.1 php: 7.1
install: travis_retry composer install --prefer-dist
script: script:
- | - |
if [ $TRAVIS_BRANCH != "master" ]; then if [ $TRAVIS_BRANCH != "master" ]; then
...@@ -356,5 +358,6 @@ jobs: ...@@ -356,5 +358,6 @@ jobs:
- stage: Coding standard - stage: Coding standard
if: NOT type = pull_request if: NOT type = pull_request
php: 7.1 php: 7.1
install: travis_retry composer install --prefer-dist
script: script:
- ./vendor/bin/phpcs - ./vendor/bin/phpcs
This diff is collapsed.
...@@ -21,6 +21,10 @@ namespace Doctrine\DBAL\Cache; ...@@ -21,6 +21,10 @@ namespace Doctrine\DBAL\Cache;
use Doctrine\DBAL\Driver\ResultStatement; use Doctrine\DBAL\Driver\ResultStatement;
use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\FetchMode;
use function array_merge;
use function array_values;
use function count;
use function reset;
class ArrayStatement implements \IteratorAggregate, ResultStatement class ArrayStatement implements \IteratorAggregate, ResultStatement
{ {
......
...@@ -23,6 +23,9 @@ use Doctrine\DBAL\Driver\Statement; ...@@ -23,6 +23,9 @@ use Doctrine\DBAL\Driver\Statement;
use Doctrine\DBAL\Driver\ResultStatement; use Doctrine\DBAL\Driver\ResultStatement;
use Doctrine\Common\Cache\Cache; use Doctrine\Common\Cache\Cache;
use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\FetchMode;
use function array_merge;
use function array_values;
use function reset;
/** /**
* Cache statement for SQL results. * Cache statement for SQL results.
......
...@@ -32,6 +32,13 @@ use Doctrine\DBAL\Cache\ArrayStatement; ...@@ -32,6 +32,13 @@ use Doctrine\DBAL\Cache\ArrayStatement;
use Doctrine\DBAL\Cache\CacheException; use Doctrine\DBAL\Cache\CacheException;
use Doctrine\DBAL\Driver\PingableConnection; use Doctrine\DBAL\Driver\PingableConnection;
use Throwable; 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 * A wrapper around a Doctrine\DBAL\Driver\Connection that adds features like
......
...@@ -25,6 +25,9 @@ use Doctrine\DBAL\Configuration; ...@@ -25,6 +25,9 @@ use Doctrine\DBAL\Configuration;
use Doctrine\Common\EventManager; use Doctrine\Common\EventManager;
use Doctrine\DBAL\Event\ConnectionEventArgs; use Doctrine\DBAL\Event\ConnectionEventArgs;
use Doctrine\DBAL\Events; use Doctrine\DBAL\Events;
use function array_rand;
use function count;
use function func_get_args;
/** /**
* Master-Slave Connection * Master-Slave Connection
......
...@@ -23,6 +23,14 @@ use Doctrine\DBAL\Exception; ...@@ -23,6 +23,14 @@ use Doctrine\DBAL\Exception;
use Doctrine\DBAL\Driver; use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Driver\ExceptionConverterDriver; use Doctrine\DBAL\Driver\ExceptionConverterDriver;
use Doctrine\DBAL\Platforms\AbstractPlatform; 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 class DBALException extends \Exception
{ {
......
...@@ -27,6 +27,9 @@ use Doctrine\DBAL\Platforms\MySQL57Platform; ...@@ -27,6 +27,9 @@ use Doctrine\DBAL\Platforms\MySQL57Platform;
use Doctrine\DBAL\Platforms\MySqlPlatform; use Doctrine\DBAL\Platforms\MySqlPlatform;
use Doctrine\DBAL\Schema\MySqlSchemaManager; use Doctrine\DBAL\Schema\MySqlSchemaManager;
use Doctrine\DBAL\VersionAwarePlatformDriver; 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. * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for MySQL based drivers.
......
...@@ -29,6 +29,9 @@ use Doctrine\DBAL\Platforms\PostgreSQL94Platform; ...@@ -29,6 +29,9 @@ use Doctrine\DBAL\Platforms\PostgreSQL94Platform;
use Doctrine\DBAL\Platforms\PostgreSqlPlatform; use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
use Doctrine\DBAL\Schema\PostgreSqlSchemaManager; use Doctrine\DBAL\Schema\PostgreSqlSchemaManager;
use Doctrine\DBAL\VersionAwarePlatformDriver; 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. * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for PostgreSQL based drivers.
......
...@@ -28,6 +28,8 @@ use Doctrine\DBAL\Platforms\SQLAnywhere16Platform; ...@@ -28,6 +28,8 @@ use Doctrine\DBAL\Platforms\SQLAnywhere16Platform;
use Doctrine\DBAL\Platforms\SQLAnywherePlatform; use Doctrine\DBAL\Platforms\SQLAnywherePlatform;
use Doctrine\DBAL\Schema\SQLAnywhereSchemaManager; use Doctrine\DBAL\Schema\SQLAnywhereSchemaManager;
use Doctrine\DBAL\VersionAwarePlatformDriver; 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. * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for SAP Sybase SQL Anywhere based drivers.
......
...@@ -27,6 +27,8 @@ use Doctrine\DBAL\Platforms\SQLServer2012Platform; ...@@ -27,6 +27,8 @@ use Doctrine\DBAL\Platforms\SQLServer2012Platform;
use Doctrine\DBAL\Platforms\SQLServerPlatform; use Doctrine\DBAL\Platforms\SQLServerPlatform;
use Doctrine\DBAL\Schema\SQLServerSchemaManager; use Doctrine\DBAL\Schema\SQLServerSchemaManager;
use Doctrine\DBAL\VersionAwarePlatformDriver; 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. * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for Microsoft SQL Server based drivers.
......
...@@ -23,6 +23,7 @@ use Doctrine\DBAL\Driver; ...@@ -23,6 +23,7 @@ use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Exception; use Doctrine\DBAL\Exception;
use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\SqliteSchemaManager; use Doctrine\DBAL\Schema\SqliteSchemaManager;
use function strpos;
/** /**
* Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for SQLite based drivers. * Abstract base implementation of the {@link Doctrine\DBAL\Driver} interface for SQLite based drivers.
......
...@@ -22,6 +22,23 @@ namespace Doctrine\DBAL\Driver\IBMDB2; ...@@ -22,6 +22,23 @@ namespace Doctrine\DBAL\Driver\IBMDB2;
use Doctrine\DBAL\Driver\Connection; use Doctrine\DBAL\Driver\Connection;
use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
use Doctrine\DBAL\ParameterType; 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 class DB2Connection implements Connection, ServerInfoAwareConnection
{ {
......
...@@ -23,6 +23,30 @@ use Doctrine\DBAL\Driver\Statement; ...@@ -23,6 +23,30 @@ use Doctrine\DBAL\Driver\Statement;
use Doctrine\DBAL\Driver\StatementIterator; use Doctrine\DBAL\Driver\StatementIterator;
use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\FetchMode;
use Doctrine\DBAL\ParameterType; 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 class DB2Statement implements \IteratorAggregate, Statement
{ {
......
...@@ -23,6 +23,19 @@ use Doctrine\DBAL\Driver\Connection as Connection; ...@@ -23,6 +23,19 @@ use Doctrine\DBAL\Driver\Connection as Connection;
use Doctrine\DBAL\Driver\PingableConnection; use Doctrine\DBAL\Driver\PingableConnection;
use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
use Doctrine\DBAL\ParameterType; 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 <kimhemsoe@gmail.com> * @author Kim Hemsø Rasmussen <kimhemsoe@gmail.com>
......
...@@ -23,6 +23,11 @@ use Doctrine\DBAL\Driver\Statement; ...@@ -23,6 +23,11 @@ use Doctrine\DBAL\Driver\Statement;
use Doctrine\DBAL\Driver\StatementIterator; use Doctrine\DBAL\Driver\StatementIterator;
use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\FetchMode;
use Doctrine\DBAL\ParameterType; 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 <kimhemsoe@gmail.com> * @author Kim Hemsø Rasmussen <kimhemsoe@gmail.com>
......
...@@ -21,6 +21,7 @@ namespace Doctrine\DBAL\Driver\OCI8; ...@@ -21,6 +21,7 @@ namespace Doctrine\DBAL\Driver\OCI8;
use Doctrine\DBAL\DBALException; use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Driver\AbstractOracleDriver; use Doctrine\DBAL\Driver\AbstractOracleDriver;
use const OCI_DEFAULT;
/** /**
* A Doctrine DBAL driver for the Oracle OCI8 PHP extensions. * A Doctrine DBAL driver for the Oracle OCI8 PHP extensions.
......
...@@ -22,6 +22,24 @@ namespace Doctrine\DBAL\Driver\OCI8; ...@@ -22,6 +22,24 @@ namespace Doctrine\DBAL\Driver\OCI8;
use Doctrine\DBAL\Driver\Connection; use Doctrine\DBAL\Driver\Connection;
use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
use Doctrine\DBAL\ParameterType; 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. * OCI8 implementation of the Connection interface.
......
...@@ -24,6 +24,36 @@ use Doctrine\DBAL\Driver\StatementIterator; ...@@ -24,6 +24,36 @@ use Doctrine\DBAL\Driver\StatementIterator;
use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\FetchMode;
use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\ParameterType;
use IteratorAggregate; 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. * The OCI8 implementation of the Statement interface.
......
...@@ -21,6 +21,8 @@ namespace Doctrine\DBAL\Driver; ...@@ -21,6 +21,8 @@ namespace Doctrine\DBAL\Driver;
use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\ParameterType;
use PDO; use PDO;
use function count;
use function func_get_args;
/** /**
* PDO implementation of the Connection interface. * PDO implementation of the Connection interface.
......
...@@ -24,6 +24,7 @@ use Doctrine\DBAL\Driver\PDOConnection; ...@@ -24,6 +24,7 @@ use Doctrine\DBAL\Driver\PDOConnection;
use Doctrine\DBAL\DBALException; use Doctrine\DBAL\DBALException;
use PDOException; use PDOException;
use PDO; use PDO;
use function defined;
/** /**
* Driver that connects through pdo_pgsql. * Driver that connects through pdo_pgsql.
......
...@@ -23,6 +23,7 @@ use Doctrine\DBAL\DBALException; ...@@ -23,6 +23,7 @@ use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Driver\AbstractSQLiteDriver; use Doctrine\DBAL\Driver\AbstractSQLiteDriver;
use Doctrine\DBAL\Driver\PDOConnection; use Doctrine\DBAL\Driver\PDOConnection;
use PDOException; use PDOException;
use function array_merge;
/** /**
* The PDO Sqlite driver. * The PDO Sqlite driver.
......
...@@ -21,6 +21,8 @@ namespace Doctrine\DBAL\Driver\PDOSqlsrv; ...@@ -21,6 +21,8 @@ namespace Doctrine\DBAL\Driver\PDOSqlsrv;
use Doctrine\DBAL\Driver\PDOConnection; use Doctrine\DBAL\Driver\PDOConnection;
use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\ParameterType;
use function strpos;
use function substr;
/** /**
* Sqlsrv Connection implementation. * Sqlsrv Connection implementation.
......
...@@ -21,6 +21,9 @@ namespace Doctrine\DBAL\Driver\SQLAnywhere; ...@@ -21,6 +21,9 @@ namespace Doctrine\DBAL\Driver\SQLAnywhere;
use Doctrine\DBAL\DBALException; use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Driver\AbstractSQLAnywhereDriver; 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. * A Doctrine DBAL driver for the SAP Sybase SQL Anywhere PHP extension.
......
...@@ -22,6 +22,21 @@ namespace Doctrine\DBAL\Driver\SQLAnywhere; ...@@ -22,6 +22,21 @@ namespace Doctrine\DBAL\Driver\SQLAnywhere;
use Doctrine\DBAL\Driver\Connection; use Doctrine\DBAL\Driver\Connection;
use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
use Doctrine\DBAL\ParameterType; 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. * SAP Sybase SQL Anywhere implementation of the Connection interface.
......
...@@ -20,6 +20,12 @@ ...@@ -20,6 +20,12 @@
namespace Doctrine\DBAL\Driver\SQLAnywhere; namespace Doctrine\DBAL\Driver\SQLAnywhere;
use Doctrine\DBAL\Driver\AbstractDriverException; 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. * SAP Sybase SQL Anywhere driver exception.
......
...@@ -24,6 +24,31 @@ use Doctrine\DBAL\Driver\StatementIterator; ...@@ -24,6 +24,31 @@ use Doctrine\DBAL\Driver\StatementIterator;
use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\FetchMode;
use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\ParameterType;
use IteratorAggregate; 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. * SAP SQL Anywhere implementation of the Statement interface.
......
...@@ -22,6 +22,21 @@ namespace Doctrine\DBAL\Driver\SQLSrv; ...@@ -22,6 +22,21 @@ namespace Doctrine\DBAL\Driver\SQLSrv;
use Doctrine\DBAL\Driver\Connection; use Doctrine\DBAL\Driver\Connection;
use Doctrine\DBAL\Driver\ServerInfoAwareConnection; use Doctrine\DBAL\Driver\ServerInfoAwareConnection;
use Doctrine\DBAL\ParameterType; 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. * SQL Server implementation for the Connection interface.
......
...@@ -21,6 +21,9 @@ namespace Doctrine\DBAL\Driver\SQLSrv; ...@@ -21,6 +21,9 @@ namespace Doctrine\DBAL\Driver\SQLSrv;
use Doctrine\DBAL\Driver\AbstractDriverException; use Doctrine\DBAL\Driver\AbstractDriverException;
use const SQLSRV_ERR_ERRORS;
use function rtrim;
use function sqlsrv_errors;
class SQLSrvException extends AbstractDriverException class SQLSrvException extends AbstractDriverException
{ {
......
...@@ -24,7 +24,30 @@ use Doctrine\DBAL\FetchMode; ...@@ -24,7 +24,30 @@ use Doctrine\DBAL\FetchMode;
use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\ParameterType;
use IteratorAggregate; use IteratorAggregate;
use Doctrine\DBAL\Driver\Statement; 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 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. * SQL Server Statement.
......
...@@ -20,6 +20,18 @@ ...@@ -20,6 +20,18 @@
namespace Doctrine\DBAL; namespace Doctrine\DBAL;
use Doctrine\Common\EventManager; 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. * Factory for creating Doctrine\DBAL\Connection instances.
......
...@@ -22,6 +22,10 @@ namespace Doctrine\DBAL\Event\Listeners; ...@@ -22,6 +22,10 @@ namespace Doctrine\DBAL\Event\Listeners;
use Doctrine\DBAL\Event\ConnectionEventArgs; use Doctrine\DBAL\Event\ConnectionEventArgs;
use Doctrine\DBAL\Events; use Doctrine\DBAL\Events;
use Doctrine\Common\EventSubscriber; 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. * Should be used when Oracle Server default environment does not match the Doctrine requirements.
......
...@@ -22,6 +22,8 @@ namespace Doctrine\DBAL\Event; ...@@ -22,6 +22,8 @@ namespace Doctrine\DBAL\Event;
use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\TableDiff; 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. * Event Arguments used when SQL queries for adding table columns are generated inside Doctrine\DBAL\Platform\*Platform.
......
...@@ -22,6 +22,8 @@ namespace Doctrine\DBAL\Event; ...@@ -22,6 +22,8 @@ namespace Doctrine\DBAL\Event;
use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\ColumnDiff; use Doctrine\DBAL\Schema\ColumnDiff;
use Doctrine\DBAL\Schema\TableDiff; 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. * Event Arguments used when SQL queries for changing table columns are generated inside Doctrine\DBAL\Platform\*Platform.
......
...@@ -21,6 +21,8 @@ namespace Doctrine\DBAL\Event; ...@@ -21,6 +21,8 @@ namespace Doctrine\DBAL\Event;
use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\TableDiff; 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. * Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform\*Platform.
......
...@@ -22,6 +22,8 @@ namespace Doctrine\DBAL\Event; ...@@ -22,6 +22,8 @@ namespace Doctrine\DBAL\Event;
use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\TableDiff; 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. * Event Arguments used when SQL queries for removing table columns are generated inside Doctrine\DBAL\Platform\*Platform.
......
...@@ -22,6 +22,8 @@ namespace Doctrine\DBAL\Event; ...@@ -22,6 +22,8 @@ namespace Doctrine\DBAL\Event;
use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\TableDiff; 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. * Event Arguments used when SQL queries for renaming table columns are generated inside Doctrine\DBAL\Platform\*Platform.
......
...@@ -22,6 +22,8 @@ namespace Doctrine\DBAL\Event; ...@@ -22,6 +22,8 @@ namespace Doctrine\DBAL\Event;
use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\Column;
use Doctrine\DBAL\Schema\Table; 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. * Event Arguments used when SQL queries for creating table columns are generated inside Doctrine\DBAL\Platform\AbstractPlatform.
......
...@@ -21,6 +21,8 @@ namespace Doctrine\DBAL\Event; ...@@ -21,6 +21,8 @@ namespace Doctrine\DBAL\Event;
use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\Table; 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. * Event Arguments used when SQL queries for creating tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform.
......
...@@ -21,6 +21,7 @@ namespace Doctrine\DBAL\Event; ...@@ -21,6 +21,7 @@ namespace Doctrine\DBAL\Event;
use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\Table; 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. * Event Arguments used when the SQL query for dropping tables are generated inside Doctrine\DBAL\Platform\AbstractPlatform.
......
...@@ -23,6 +23,8 @@ use Doctrine\DBAL\DriverManager; ...@@ -23,6 +23,8 @@ use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\Connection; use Doctrine\DBAL\Connection;
use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\FetchMode;
use Doctrine\DBAL\LockMode; 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. * Table ID Generator for those poor languages that are missing sequences.
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
namespace Doctrine\DBAL\Logging; namespace Doctrine\DBAL\Logging;
use function microtime;
/** /**
* Includes executed SQLs in a Debug Stack. * Includes executed SQLs in a Debug Stack.
* *
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
namespace Doctrine\DBAL\Logging; 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. * A SQL logger that logs to the standard output using echo/var_dump.
* *
......
...@@ -43,10 +43,29 @@ use Doctrine\DBAL\TransactionIsolationLevel; ...@@ -43,10 +43,29 @@ use Doctrine\DBAL\TransactionIsolationLevel;
use Doctrine\DBAL\Types; use Doctrine\DBAL\Types;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use function addcslashes; 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_quote;
use function preg_replace; use function preg_replace;
use function sprintf; use function sprintf;
use function str_replace;
use function strlen; use function strlen;
use function strpos;
use function strtolower;
use function strtoupper;
/** /**
* Base class for all DatabasePlatforms. The DatabasePlatforms are the central * Base class for all DatabasePlatforms. The DatabasePlatforms are the central
......
...@@ -26,6 +26,14 @@ use Doctrine\DBAL\Schema\Index; ...@@ -26,6 +26,14 @@ use Doctrine\DBAL\Schema\Index;
use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\Schema\TableDiff;
use Doctrine\DBAL\Types\Type; 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 class DB2Platform extends AbstractPlatform
{ {
......
...@@ -24,6 +24,19 @@ use Doctrine\DBAL\Schema\Index; ...@@ -24,6 +24,19 @@ use Doctrine\DBAL\Schema\Index;
use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\Schema\TableDiff;
use Doctrine\DBAL\Types\BinaryType; 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 * Drizzle platform
......
...@@ -19,6 +19,10 @@ ...@@ -19,6 +19,10 @@
namespace Doctrine\DBAL\Platforms\Keywords; namespace Doctrine\DBAL\Platforms\Keywords;
use function array_flip;
use function array_map;
use function strtoupper;
/** /**
* Abstract interface for a SQL reserved keyword dictionary. * Abstract interface for a SQL reserved keyword dictionary.
* *
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
namespace Doctrine\DBAL\Platforms\Keywords; namespace Doctrine\DBAL\Platforms\Keywords;
use function array_merge;
/** /**
* PostgreSQL 9.2 reserved keywords list. * PostgreSQL 9.2 reserved keywords list.
* *
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
namespace Doctrine\DBAL\Platforms\Keywords; namespace Doctrine\DBAL\Platforms\Keywords;
use function array_diff;
use function array_merge;
/** /**
* PostgreSQL 9.4 reserved keywords list. * PostgreSQL 9.4 reserved keywords list.
* *
......
...@@ -26,6 +26,8 @@ use Doctrine\DBAL\Schema\ForeignKeyConstraint; ...@@ -26,6 +26,8 @@ use Doctrine\DBAL\Schema\ForeignKeyConstraint;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\Sequence; use Doctrine\DBAL\Schema\Sequence;
use Doctrine\DBAL\Schema\Index; use Doctrine\DBAL\Schema\Index;
use function implode;
use function str_replace;
class ReservedKeywordsValidator implements Visitor class ReservedKeywordsValidator implements Visitor
{ {
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
namespace Doctrine\DBAL\Platforms\Keywords; namespace Doctrine\DBAL\Platforms\Keywords;
use function array_diff;
use function array_merge;
/** /**
* SAP Sybase SQL Anywhere 11 reserved keywords list. * SAP Sybase SQL Anywhere 11 reserved keywords list.
* *
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
namespace Doctrine\DBAL\Platforms\Keywords; namespace Doctrine\DBAL\Platforms\Keywords;
use function array_diff;
use function array_merge;
/** /**
* SAP Sybase SQL Anywhere 12 reserved keywords list. * SAP Sybase SQL Anywhere 12 reserved keywords list.
* *
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
namespace Doctrine\DBAL\Platforms\Keywords; namespace Doctrine\DBAL\Platforms\Keywords;
use function array_merge;
/** /**
* SAP Sybase SQL Anywhere 16 reserved keywords list. * SAP Sybase SQL Anywhere 16 reserved keywords list.
* *
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
namespace Doctrine\DBAL\Platforms\Keywords; namespace Doctrine\DBAL\Platforms\Keywords;
use function array_diff;
use function array_merge;
/** /**
* Microsoft SQL Server 2005 reserved keyword dictionary. * Microsoft SQL Server 2005 reserved keyword dictionary.
* *
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
namespace Doctrine\DBAL\Platforms\Keywords; namespace Doctrine\DBAL\Platforms\Keywords;
use function array_merge;
/** /**
* Microsoft SQL Server 2008 reserved keyword dictionary. * Microsoft SQL Server 2008 reserved keyword dictionary.
* *
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
namespace Doctrine\DBAL\Platforms\Keywords; namespace Doctrine\DBAL\Platforms\Keywords;
use function array_merge;
/** /**
* Microsoft SQL Server 2012 reserved keyword dictionary. * Microsoft SQL Server 2012 reserved keyword dictionary.
* *
......
...@@ -26,6 +26,21 @@ use Doctrine\DBAL\Schema\TableDiff; ...@@ -26,6 +26,21 @@ use Doctrine\DBAL\Schema\TableDiff;
use Doctrine\DBAL\TransactionIsolationLevel; use Doctrine\DBAL\TransactionIsolationLevel;
use Doctrine\DBAL\Types\BlobType; use Doctrine\DBAL\Types\BlobType;
use Doctrine\DBAL\Types\TextType; 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 * The MySqlPlatform provides the behavior, features and SQL dialect of the
......
...@@ -28,6 +28,17 @@ use Doctrine\DBAL\Schema\Table; ...@@ -28,6 +28,17 @@ use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\Schema\TableDiff;
use Doctrine\DBAL\TransactionIsolationLevel; use Doctrine\DBAL\TransactionIsolationLevel;
use Doctrine\DBAL\Types\BinaryType; 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. * OraclePlatform.
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
namespace Doctrine\DBAL\Platforms; namespace Doctrine\DBAL\Platforms;
use function explode;
/** /**
* Provides the behavior, features and SQL dialect of the PostgreSQL 9.1 database platform. * Provides the behavior, features and SQL dialect of the PostgreSQL 9.1 database platform.
* *
......
...@@ -30,6 +30,22 @@ use Doctrine\DBAL\Types\BigIntType; ...@@ -30,6 +30,22 @@ use Doctrine\DBAL\Types\BigIntType;
use Doctrine\DBAL\Types\BlobType; use Doctrine\DBAL\Types\BlobType;
use Doctrine\DBAL\Types\IntegerType; use Doctrine\DBAL\Types\IntegerType;
use Doctrine\DBAL\Types\Type; 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. * PostgreSqlPlatform.
......
...@@ -30,6 +30,20 @@ use Doctrine\DBAL\Schema\Index; ...@@ -30,6 +30,20 @@ use Doctrine\DBAL\Schema\Index;
use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\Schema\TableDiff;
use Doctrine\DBAL\TransactionIsolationLevel; 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 * The SQLAnywherePlatform provides the behavior, features and SQL dialect of the
......
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
namespace Doctrine\DBAL\Platforms; namespace Doctrine\DBAL\Platforms;
use Doctrine\DBAL\Schema\Sequence; 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. * Platform to ensure compatibility of Doctrine with Microsoft SQL Server 2012 version.
......
...@@ -28,10 +28,31 @@ use Doctrine\DBAL\Schema\Index; ...@@ -28,10 +28,31 @@ use Doctrine\DBAL\Schema\Index;
use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\Schema\TableDiff;
use Doctrine\DBAL\Types; 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 explode;
use function func_get_args;
use function implode; 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 sprintf;
use function str_replace;
use function stripos;
use function stristr;
use function strlen;
use function strpos; use function strpos;
use function strtoupper;
use function substr;
use function substr_count;
/** /**
* The SQLServerPlatform provides the behavior, features and SQL dialect of the * The SQLServerPlatform provides the behavior, features and SQL dialect of the
......
...@@ -29,6 +29,17 @@ use Doctrine\DBAL\Schema\Table; ...@@ -29,6 +29,17 @@ use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Schema\TableDiff; use Doctrine\DBAL\Schema\TableDiff;
use Doctrine\DBAL\TransactionIsolationLevel; use Doctrine\DBAL\TransactionIsolationLevel;
use Doctrine\DBAL\Types; 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 * The SqlitePlatform class describes the specifics and dialects of the SQLite
......
...@@ -21,6 +21,9 @@ namespace Doctrine\DBAL\Portability; ...@@ -21,6 +21,9 @@ namespace Doctrine\DBAL\Portability;
use Doctrine\DBAL\Cache\QueryCacheProfile; use Doctrine\DBAL\Cache\QueryCacheProfile;
use Doctrine\DBAL\ColumnCase; use Doctrine\DBAL\ColumnCase;
use const CASE_LOWER;
use const CASE_UPPER;
use function func_get_args;
/** /**
* Portability wrapper for a Connection. * Portability wrapper for a Connection.
......
...@@ -21,6 +21,10 @@ namespace Doctrine\DBAL\Portability; ...@@ -21,6 +21,10 @@ namespace Doctrine\DBAL\Portability;
use Doctrine\DBAL\FetchMode; use Doctrine\DBAL\FetchMode;
use Doctrine\DBAL\ParameterType; 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. * Portability wrapper for a Statement.
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
namespace Doctrine\DBAL\Query\Expression; namespace Doctrine\DBAL\Query\Expression;
use function count;
use function implode;
/** /**
* Composite expression is responsible to build a group of similar expression. * Composite expression is responsible to build a group of similar expression.
* *
......
...@@ -21,7 +21,9 @@ namespace Doctrine\DBAL\Query\Expression; ...@@ -21,7 +21,9 @@ namespace Doctrine\DBAL\Query\Expression;
use Doctrine\DBAL\Connection; use Doctrine\DBAL\Connection;
use function func_get_arg; use function func_get_arg;
use function func_get_args;
use function func_num_args; use function func_num_args;
use function implode;
use function sprintf; use function sprintf;
/** /**
......
...@@ -22,6 +22,18 @@ namespace Doctrine\DBAL\Query; ...@@ -22,6 +22,18 @@ namespace Doctrine\DBAL\Query;
use Doctrine\DBAL\ParameterType; use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Query\Expression\CompositeExpression; use Doctrine\DBAL\Query\Expression\CompositeExpression;
use Doctrine\DBAL\Connection; 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. * QueryBuilder class is responsible to dynamically create SQL queries.
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
namespace Doctrine\DBAL\Query; namespace Doctrine\DBAL\Query;
use Doctrine\DBAL\DBALException; use Doctrine\DBAL\DBALException;
use function implode;
/** /**
* @since 2.1.4 * @since 2.1.4
......
...@@ -19,6 +19,22 @@ ...@@ -19,6 +19,22 @@
namespace Doctrine\DBAL; 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. * Utility class that parses sql statements with regard to types and parameters.
* *
......
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
namespace Doctrine\DBAL; namespace Doctrine\DBAL;
use function sprintf;
/** /**
* Doctrine\DBAL\ConnectionException * Doctrine\DBAL\ConnectionException
* *
......
...@@ -20,6 +20,16 @@ ...@@ -20,6 +20,16 @@
namespace Doctrine\DBAL\Schema; namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\Platforms\AbstractPlatform; 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. * The abstract asset allows to reset the name of all assets without publishing this to the public userland.
......
...@@ -24,6 +24,17 @@ use Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs; ...@@ -24,6 +24,17 @@ use Doctrine\DBAL\Event\SchemaColumnDefinitionEventArgs;
use Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs; use Doctrine\DBAL\Event\SchemaIndexDefinitionEventArgs;
use Doctrine\DBAL\DBALException; use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Platforms\AbstractPlatform; 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 * Base class for schema managers. Schema managers are used to inspect and/or
......
...@@ -20,6 +20,12 @@ ...@@ -20,6 +20,12 @@
namespace Doctrine\DBAL\Schema; namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\Types\Type; 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. * Object representation of a database column.
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
namespace Doctrine\DBAL\Schema; namespace Doctrine\DBAL\Schema;
use function in_array;
/** /**
* Represents the change of a column. * Represents the change of a column.
* *
......
...@@ -20,6 +20,15 @@ ...@@ -20,6 +20,15 @@
namespace Doctrine\DBAL\Schema; namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\Types; 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. * Compares two Schemas and return an instance of SchemaDiff.
......
...@@ -19,6 +19,13 @@ ...@@ -19,6 +19,13 @@
namespace Doctrine\DBAL\Schema; 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. * IBM Db2 Schema Manager.
* *
......
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
namespace Doctrine\DBAL\Schema; namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use function explode;
use function strtolower;
use function trim;
/** /**
* Schema manager for the Drizzle RDBMS. * Schema manager for the Drizzle RDBMS.
......
...@@ -20,6 +20,14 @@ ...@@ -20,6 +20,14 @@
namespace Doctrine\DBAL\Schema; namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\Platforms\AbstractPlatform; 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. * An abstraction class for a foreign key constraint.
......
...@@ -20,6 +20,12 @@ ...@@ -20,6 +20,12 @@
namespace Doctrine\DBAL\Schema; namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\Platforms\AbstractPlatform; 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 class Index extends AbstractAsset implements Constraint
{ {
......
...@@ -22,6 +22,18 @@ namespace Doctrine\DBAL\Schema; ...@@ -22,6 +22,18 @@ namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\Platforms\MariaDb1027Platform; use Doctrine\DBAL\Platforms\MariaDb1027Platform;
use Doctrine\DBAL\Platforms\MySqlPlatform; use Doctrine\DBAL\Platforms\MySqlPlatform;
use Doctrine\DBAL\Types\Type; 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. * Schema manager for the MySql RDBMS.
......
...@@ -22,6 +22,16 @@ namespace Doctrine\DBAL\Schema; ...@@ -22,6 +22,16 @@ namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\DBALException; use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Driver\DriverException; use Doctrine\DBAL\Driver\DriverException;
use Doctrine\DBAL\Types\Type; 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. * Oracle Schema Manager.
......
...@@ -21,6 +21,23 @@ namespace Doctrine\DBAL\Schema; ...@@ -21,6 +21,23 @@ namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\Exception\DriverException; use Doctrine\DBAL\Exception\DriverException;
use Doctrine\DBAL\Types\Type; 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. * PostgreSQL Schema Manager.
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
namespace Doctrine\DBAL\Schema; namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use function preg_replace;
/** /**
* SAP Sybase SQL Anywhere schema manager. * SAP Sybase SQL Anywhere schema manager.
......
...@@ -22,6 +22,14 @@ namespace Doctrine\DBAL\Schema; ...@@ -22,6 +22,14 @@ namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\DBALException; use Doctrine\DBAL\DBALException;
use Doctrine\DBAL\Driver\DriverException; use Doctrine\DBAL\Driver\DriverException;
use Doctrine\DBAL\Types\Type; 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. * SQL Server Schema Manager.
......
...@@ -24,6 +24,9 @@ use Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector; ...@@ -24,6 +24,9 @@ use Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector;
use Doctrine\DBAL\Schema\Visitor\NamespaceVisitor; use Doctrine\DBAL\Schema\Visitor\NamespaceVisitor;
use Doctrine\DBAL\Schema\Visitor\Visitor; use Doctrine\DBAL\Schema\Visitor\Visitor;
use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
use function array_keys;
use function strpos;
use function strtolower;
/** /**
* Object representation of a database schema. * Object representation of a database schema.
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
namespace Doctrine\DBAL\Schema; namespace Doctrine\DBAL\Schema;
use \Doctrine\DBAL\Platforms\AbstractPlatform; use \Doctrine\DBAL\Platforms\AbstractPlatform;
use function array_merge;
/** /**
* Schema Diff. * Schema Diff.
......
...@@ -19,6 +19,9 @@ ...@@ -19,6 +19,9 @@
namespace Doctrine\DBAL\Schema; namespace Doctrine\DBAL\Schema;
use function implode;
use function sprintf;
class SchemaException extends \Doctrine\DBAL\DBALException class SchemaException extends \Doctrine\DBAL\DBALException
{ {
const TABLE_DOESNT_EXIST = 10; const TABLE_DOESNT_EXIST = 10;
......
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
namespace Doctrine\DBAL\Schema; namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\Schema\Visitor\Visitor; use Doctrine\DBAL\Schema\Visitor\Visitor;
use function count;
use function is_numeric;
use function sprintf;
/** /**
* Sequence structure. * Sequence structure.
......
...@@ -24,6 +24,25 @@ use Doctrine\DBAL\FetchMode; ...@@ -24,6 +24,25 @@ use Doctrine\DBAL\FetchMode;
use Doctrine\DBAL\Types\StringType; use Doctrine\DBAL\Types\StringType;
use Doctrine\DBAL\Types\TextType; use Doctrine\DBAL\Types\TextType;
use Doctrine\DBAL\Types\Type; 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. * Sqlite SchemaManager.
......
...@@ -23,6 +23,7 @@ use Doctrine\DBAL\Connection; ...@@ -23,6 +23,7 @@ use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\Comparator; use Doctrine\DBAL\Schema\Comparator;
use Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector; use Doctrine\DBAL\Schema\Visitor\DropSchemaSqlCollector;
use function count;
/** /**
* Schema Synchronizer for Default DBAL Connection. * Schema Synchronizer for Default DBAL Connection.
......
...@@ -22,6 +22,15 @@ namespace Doctrine\DBAL\Schema; ...@@ -22,6 +22,15 @@ namespace Doctrine\DBAL\Schema;
use Doctrine\DBAL\Types\Type; use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Schema\Visitor\Visitor; use Doctrine\DBAL\Schema\Visitor\Visitor;
use Doctrine\DBAL\DBALException; 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. * Object Representation of a table.
......
...@@ -23,6 +23,7 @@ use Doctrine\DBAL\Platforms\AbstractPlatform; ...@@ -23,6 +23,7 @@ use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Schema\ForeignKeyConstraint; use Doctrine\DBAL\Schema\ForeignKeyConstraint;
use Doctrine\DBAL\Schema\Sequence; use Doctrine\DBAL\Schema\Sequence;
use function array_merge;
class CreateSchemaSqlCollector extends AbstractVisitor class CreateSchemaSqlCollector extends AbstractVisitor
{ {
......
...@@ -24,6 +24,7 @@ use Doctrine\DBAL\Schema\Table; ...@@ -24,6 +24,7 @@ use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Schema\ForeignKeyConstraint; use Doctrine\DBAL\Schema\ForeignKeyConstraint;
use Doctrine\DBAL\Schema\Sequence; use Doctrine\DBAL\Schema\Sequence;
use Doctrine\DBAL\Schema\SchemaException; use Doctrine\DBAL\Schema\SchemaException;
use function strlen;
/** /**
* Gathers SQL statements that allow to completely drop the current schema. * Gathers SQL statements that allow to completely drop the current schema.
......
...@@ -22,6 +22,12 @@ namespace Doctrine\DBAL\Schema\Visitor; ...@@ -22,6 +22,12 @@ namespace Doctrine\DBAL\Schema\Visitor;
use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Schema\Table;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\ForeignKeyConstraint; 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. * Create a Graphviz output of a Schema.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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