From 1cbadb3e4821f10db4eb17b93dc3eed487751231 Mon Sep 17 00:00:00 2001 From: Sergei Morozov Date: Mon, 1 Oct 2018 20:25:06 -0700 Subject: [PATCH] Removed leading underscore from private class memeber names --- lib/Doctrine/DBAL/Connection.php | 132 +++++++++--------- .../DBAL/Driver/IBMDB2/DB2Connection.php | 34 ++--- .../DBAL/Driver/IBMDB2/DB2Statement.php | 52 +++---- .../DBAL/Driver/Mysqli/MysqliConnection.php | 54 +++---- .../DBAL/Event/ConnectionEventArgs.php | 12 +- .../DBAL/Event/Listeners/MysqlSessionInit.php | 12 +- .../SchemaAlterTableAddColumnEventArgs.php | 26 ++-- .../SchemaAlterTableChangeColumnEventArgs.php | 26 ++-- .../DBAL/Event/SchemaAlterTableEventArgs.php | 20 +-- .../SchemaAlterTableRemoveColumnEventArgs.php | 26 ++-- .../SchemaAlterTableRenameColumnEventArgs.php | 32 ++--- .../Event/SchemaColumnDefinitionEventArgs.php | 32 ++--- .../SchemaCreateTableColumnEventArgs.php | 26 ++-- .../DBAL/Event/SchemaCreateTableEventArgs.php | 32 ++--- .../DBAL/Event/SchemaDropTableEventArgs.php | 18 +-- lib/Doctrine/DBAL/Event/SchemaEventArgs.php | 6 +- .../Event/SchemaIndexDefinitionEventArgs.php | 26 ++-- lib/Doctrine/DBAL/Schema/View.php | 6 +- 18 files changed, 286 insertions(+), 286 deletions(-) diff --git a/lib/Doctrine/DBAL/Connection.php b/lib/Doctrine/DBAL/Connection.php index c23947aae8c..afe4382b6de 100644 --- a/lib/Doctrine/DBAL/Connection.php +++ b/lib/Doctrine/DBAL/Connection.php @@ -103,7 +103,7 @@ class Connection implements DriverConnection * * @var bool */ - private $_isConnected = false; + private $isConnected = false; /** * The current auto-commit mode of this connection. @@ -117,28 +117,28 @@ class Connection implements DriverConnection * * @var int */ - private $_transactionNestingLevel = 0; + private $transactionNestingLevel = 0; /** * The currently active transaction isolation level. * * @var int */ - private $_transactionIsolationLevel; + private $transactionIsolationLevel; /** * If nested transactions should use savepoints. * * @var bool */ - private $_nestTransactionsWithSavepoints = false; + private $nestTransactionsWithSavepoints = false; /** * The parameters used during creation of the Connection instance. * * @var mixed[] */ - private $_params = []; + private $params = []; /** * The DatabasePlatform object that provides information about the @@ -167,7 +167,7 @@ class Connection implements DriverConnection * * @var bool */ - private $_isRollbackOnly = false; + private $isRollbackOnly = false; /** @var int */ protected $defaultFetchMode = FetchMode::ASSOCIATIVE; @@ -189,12 +189,12 @@ public function __construct( ?EventManager $eventManager = null ) { $this->_driver = $driver; - $this->_params = $params; + $this->params = $params; if (isset($params['pdo'])) { - $this->_conn = $params['pdo']; - $this->_isConnected = true; - unset($this->_params['pdo']); + $this->_conn = $params['pdo']; + $this->isConnected = true; + unset($this->params['pdo']); } if (isset($params['platform'])) { @@ -203,7 +203,7 @@ public function __construct( } $this->platform = $params['platform']; - unset($this->_params['platform']); + unset($this->params['platform']); } // Create default config and event manager if none given @@ -230,7 +230,7 @@ public function __construct( */ public function getParams() { - return $this->_params; + return $this->params; } /** @@ -250,7 +250,7 @@ public function getDatabase() */ public function getHost() { - return $this->_params['host'] ?? null; + return $this->params['host'] ?? null; } /** @@ -260,7 +260,7 @@ public function getHost() */ public function getPort() { - return $this->_params['port'] ?? null; + return $this->params['port'] ?? null; } /** @@ -270,7 +270,7 @@ public function getPort() */ public function getUsername() { - return $this->_params['user'] ?? null; + return $this->params['user'] ?? null; } /** @@ -280,7 +280,7 @@ public function getUsername() */ public function getPassword() { - return $this->_params['password'] ?? null; + return $this->params['password'] ?? null; } /** @@ -347,16 +347,16 @@ public function getExpressionBuilder() */ public function connect() { - if ($this->_isConnected) { + if ($this->isConnected) { return false; } - $driverOptions = $this->_params['driverOptions'] ?? []; - $user = $this->_params['user'] ?? null; - $password = $this->_params['password'] ?? null; + $driverOptions = $this->params['driverOptions'] ?? []; + $user = $this->params['user'] ?? null; + $password = $this->params['password'] ?? null; - $this->_conn = $this->_driver->connect($this->_params, $user, $password, $driverOptions); - $this->_isConnected = true; + $this->_conn = $this->_driver->connect($this->params, $user, $password, $driverOptions); + $this->isConnected = true; if ($this->autoCommit === false) { $this->beginTransaction(); @@ -412,8 +412,8 @@ private function getDatabasePlatformVersion() } // Explicit platform version requested (supersedes auto-detection). - if (isset($this->_params['serverVersion'])) { - return $this->_params['serverVersion']; + if (isset($this->params['serverVersion'])) { + return $this->params['serverVersion']; } // If not connected, we need to connect now to determine the platform version. @@ -421,14 +421,14 @@ private function getDatabasePlatformVersion() try { $this->connect(); } catch (Throwable $originalException) { - if (empty($this->_params['dbname'])) { + if (empty($this->params['dbname'])) { throw $originalException; } // The database to connect to might not yet exist. // Retry detection without database name connection parameter. - $databaseName = $this->_params['dbname']; - $this->_params['dbname'] = null; + $databaseName = $this->params['dbname']; + $this->params['dbname'] = null; try { $this->connect(); @@ -436,14 +436,14 @@ private function getDatabasePlatformVersion() // Either the platform does not support database-less connections // or something else went wrong. // Reset connection parameters and rethrow the original exception. - $this->_params['dbname'] = $databaseName; + $this->params['dbname'] = $databaseName; throw $originalException; } // Reset connection parameters. - $this->_params['dbname'] = $databaseName; - $serverVersion = $this->getServerVersion(); + $this->params['dbname'] = $databaseName; + $serverVersion = $this->getServerVersion(); // Close "temporary" connection to allow connecting to the real database again. $this->close(); @@ -511,7 +511,7 @@ public function setAutoCommit($autoCommit) $this->autoCommit = $autoCommit; // Commit all currently active transactions if any when switching auto-commit mode. - if ($this->_isConnected !== true || $this->_transactionNestingLevel === 0) { + if ($this->isConnected !== true || $this->transactionNestingLevel === 0) { return; } @@ -587,7 +587,7 @@ public function fetchColumn($statement, array $params = [], $column = 0, array $ */ public function isConnected() { - return $this->_isConnected; + return $this->isConnected; } /** @@ -597,7 +597,7 @@ public function isConnected() */ public function isTransactionActive() { - return $this->_transactionNestingLevel > 0; + return $this->transactionNestingLevel > 0; } /** @@ -668,7 +668,7 @@ public function close() { $this->_conn = null; - $this->_isConnected = false; + $this->isConnected = false; } /** @@ -680,7 +680,7 @@ public function close() */ public function setTransactionIsolation($level) { - $this->_transactionIsolationLevel = $level; + $this->transactionIsolationLevel = $level; return $this->executeUpdate($this->getDatabasePlatform()->getSetTransactionIsolationSQL($level)); } @@ -692,11 +692,11 @@ public function setTransactionIsolation($level) */ public function getTransactionIsolation() { - if ($this->_transactionIsolationLevel === null) { - $this->_transactionIsolationLevel = $this->getDatabasePlatform()->getDefaultTransactionIsolationLevel(); + if ($this->transactionIsolationLevel === null) { + $this->transactionIsolationLevel = $this->getDatabasePlatform()->getDefaultTransactionIsolationLevel(); } - return $this->_transactionIsolationLevel; + return $this->transactionIsolationLevel; } /** @@ -1110,7 +1110,7 @@ public function exec($statement) */ public function getTransactionNestingLevel() { - return $this->_transactionNestingLevel; + return $this->transactionNestingLevel; } /** @@ -1196,7 +1196,7 @@ public function transactional(Closure $func) */ public function setNestTransactionsWithSavepoints($nestTransactionsWithSavepoints) { - if ($this->_transactionNestingLevel > 0) { + if ($this->transactionNestingLevel > 0) { throw ConnectionException::mayNotAlterNestedTransactionWithSavepointsInTransaction(); } @@ -1204,7 +1204,7 @@ public function setNestTransactionsWithSavepoints($nestTransactionsWithSavepoint throw ConnectionException::savepointsNotSupported(); } - $this->_nestTransactionsWithSavepoints = (bool) $nestTransactionsWithSavepoints; + $this->nestTransactionsWithSavepoints = (bool) $nestTransactionsWithSavepoints; } /** @@ -1214,7 +1214,7 @@ public function setNestTransactionsWithSavepoints($nestTransactionsWithSavepoint */ public function getNestTransactionsWithSavepoints() { - return $this->_nestTransactionsWithSavepoints; + return $this->nestTransactionsWithSavepoints; } /** @@ -1225,7 +1225,7 @@ public function getNestTransactionsWithSavepoints() */ protected function _getNestedTransactionSavePointName() { - return 'DOCTRINE2_SAVEPOINT_' . $this->_transactionNestingLevel; + return 'DOCTRINE2_SAVEPOINT_' . $this->transactionNestingLevel; } /** @@ -1237,11 +1237,11 @@ public function beginTransaction() { $this->connect(); - ++$this->_transactionNestingLevel; + ++$this->transactionNestingLevel; $logger = $this->_config->getSQLLogger(); - if ($this->_transactionNestingLevel === 1) { + if ($this->transactionNestingLevel === 1) { if ($logger) { $logger->startQuery('"START TRANSACTION"'); } @@ -1249,7 +1249,7 @@ public function beginTransaction() if ($logger) { $logger->stopQuery(); } - } elseif ($this->_nestTransactionsWithSavepoints) { + } elseif ($this->nestTransactionsWithSavepoints) { if ($logger) { $logger->startQuery('"SAVEPOINT"'); } @@ -1270,10 +1270,10 @@ public function beginTransaction() */ public function commit() { - if ($this->_transactionNestingLevel === 0) { + if ($this->transactionNestingLevel === 0) { throw ConnectionException::noActiveTransaction(); } - if ($this->_isRollbackOnly) { + if ($this->isRollbackOnly) { throw ConnectionException::commitFailedRollbackOnly(); } @@ -1281,7 +1281,7 @@ public function commit() $logger = $this->_config->getSQLLogger(); - if ($this->_transactionNestingLevel === 1) { + if ($this->transactionNestingLevel === 1) { if ($logger) { $logger->startQuery('"COMMIT"'); } @@ -1289,7 +1289,7 @@ public function commit() if ($logger) { $logger->stopQuery(); } - } elseif ($this->_nestTransactionsWithSavepoints) { + } elseif ($this->nestTransactionsWithSavepoints) { if ($logger) { $logger->startQuery('"RELEASE SAVEPOINT"'); } @@ -1299,9 +1299,9 @@ public function commit() } } - --$this->_transactionNestingLevel; + --$this->transactionNestingLevel; - if ($this->autoCommit !== false || $this->_transactionNestingLevel !== 0) { + if ($this->autoCommit !== false || $this->transactionNestingLevel !== 0) { return; } @@ -1313,8 +1313,8 @@ public function commit() */ private function commitAll() { - while ($this->_transactionNestingLevel !== 0) { - if ($this->autoCommit === false && $this->_transactionNestingLevel === 1) { + while ($this->transactionNestingLevel !== 0) { + if ($this->autoCommit === false && $this->transactionNestingLevel === 1) { // When in no auto-commit mode, the last nesting commit immediately starts a new transaction. // Therefore we need to do the final commit here and then leave to avoid an infinite loop. $this->commit(); @@ -1333,7 +1333,7 @@ private function commitAll() */ public function rollBack() { - if ($this->_transactionNestingLevel === 0) { + if ($this->transactionNestingLevel === 0) { throw ConnectionException::noActiveTransaction(); } @@ -1341,13 +1341,13 @@ public function rollBack() $logger = $this->_config->getSQLLogger(); - if ($this->_transactionNestingLevel === 1) { + if ($this->transactionNestingLevel === 1) { if ($logger) { $logger->startQuery('"ROLLBACK"'); } - $this->_transactionNestingLevel = 0; + $this->transactionNestingLevel = 0; $this->_conn->rollBack(); - $this->_isRollbackOnly = false; + $this->isRollbackOnly = false; if ($logger) { $logger->stopQuery(); } @@ -1355,18 +1355,18 @@ public function rollBack() if ($this->autoCommit === false) { $this->beginTransaction(); } - } elseif ($this->_nestTransactionsWithSavepoints) { + } elseif ($this->nestTransactionsWithSavepoints) { if ($logger) { $logger->startQuery('"ROLLBACK TO SAVEPOINT"'); } $this->rollbackSavepoint($this->_getNestedTransactionSavePointName()); - --$this->_transactionNestingLevel; + --$this->transactionNestingLevel; if ($logger) { $logger->stopQuery(); } } else { - $this->_isRollbackOnly = true; - --$this->_transactionNestingLevel; + $this->isRollbackOnly = true; + --$this->transactionNestingLevel; } } @@ -1465,10 +1465,10 @@ public function getSchemaManager() */ public function setRollbackOnly() { - if ($this->_transactionNestingLevel === 0) { + if ($this->transactionNestingLevel === 0) { throw ConnectionException::noActiveTransaction(); } - $this->_isRollbackOnly = true; + $this->isRollbackOnly = true; } /** @@ -1480,11 +1480,11 @@ public function setRollbackOnly() */ public function isRollbackOnly() { - if ($this->_transactionNestingLevel === 0) { + if ($this->transactionNestingLevel === 0) { throw ConnectionException::noActiveTransaction(); } - return $this->_isRollbackOnly; + return $this->isRollbackOnly; } /** diff --git a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php index bc555f8604c..bd80e6e49a7 100644 --- a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php +++ b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Connection.php @@ -27,7 +27,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection { /** @var resource */ - private $_conn = null; + private $conn = null; /** * @param mixed[] $params @@ -42,11 +42,11 @@ public function __construct(array $params, $username, $password, $driverOptions $isPersistent = (isset($params['persistent']) && $params['persistent'] === true); if ($isPersistent) { - $this->_conn = db2_pconnect($params['dbname'], $username, $password, $driverOptions); + $this->conn = db2_pconnect($params['dbname'], $username, $password, $driverOptions); } else { - $this->_conn = db2_connect($params['dbname'], $username, $password, $driverOptions); + $this->conn = db2_connect($params['dbname'], $username, $password, $driverOptions); } - if (! $this->_conn) { + if (! $this->conn) { throw new DB2Exception(db2_conn_errormsg()); } } @@ -57,7 +57,7 @@ public function __construct(array $params, $username, $password, $driverOptions public function getServerVersion() { /** @var stdClass $serverInfo */ - $serverInfo = db2_server_info($this->_conn); + $serverInfo = db2_server_info($this->conn); return $serverInfo->DBMS_VER; } @@ -75,7 +75,7 @@ public function requiresQueryForServerVersion() */ public function prepare($sql) { - $stmt = @db2_prepare($this->_conn, $sql); + $stmt = @db2_prepare($this->conn, $sql); if (! $stmt) { throw new DB2Exception(db2_stmt_errormsg()); } @@ -115,7 +115,7 @@ public function quote($input, $type = ParameterType::STRING) */ public function exec($statement) { - $stmt = @db2_exec($this->_conn, $statement); + $stmt = @db2_exec($this->conn, $statement); if ($stmt === false) { throw new DB2Exception(db2_stmt_errormsg()); @@ -129,7 +129,7 @@ public function exec($statement) */ public function lastInsertId($name = null) { - return db2_last_insert_id($this->_conn); + return db2_last_insert_id($this->conn); } /** @@ -137,7 +137,7 @@ public function lastInsertId($name = null) */ public function beginTransaction() { - db2_autocommit($this->_conn, DB2_AUTOCOMMIT_OFF); + db2_autocommit($this->conn, DB2_AUTOCOMMIT_OFF); } /** @@ -145,10 +145,10 @@ public function beginTransaction() */ public function commit() { - if (! db2_commit($this->_conn)) { - throw new DB2Exception(db2_conn_errormsg($this->_conn)); + if (! db2_commit($this->conn)) { + throw new DB2Exception(db2_conn_errormsg($this->conn)); } - db2_autocommit($this->_conn, DB2_AUTOCOMMIT_ON); + db2_autocommit($this->conn, DB2_AUTOCOMMIT_ON); } /** @@ -156,10 +156,10 @@ public function commit() */ public function rollBack() { - if (! db2_rollback($this->_conn)) { - throw new DB2Exception(db2_conn_errormsg($this->_conn)); + if (! db2_rollback($this->conn)) { + throw new DB2Exception(db2_conn_errormsg($this->conn)); } - db2_autocommit($this->_conn, DB2_AUTOCOMMIT_ON); + db2_autocommit($this->conn, DB2_AUTOCOMMIT_ON); } /** @@ -167,7 +167,7 @@ public function rollBack() */ public function errorCode() { - return db2_conn_error($this->_conn); + return db2_conn_error($this->conn); } /** @@ -176,7 +176,7 @@ public function errorCode() public function errorInfo() { return [ - 0 => db2_conn_errormsg($this->_conn), + 0 => db2_conn_errormsg($this->conn), 1 => $this->errorCode(), ]; } diff --git a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php index 9a8baf69bd2..5a303ceb856 100644 --- a/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php +++ b/lib/Doctrine/DBAL/Driver/IBMDB2/DB2Statement.php @@ -40,10 +40,10 @@ class DB2Statement implements IteratorAggregate, Statement { /** @var resource */ - private $_stmt; + private $stmt; /** @var mixed[] */ - private $_bindParam = []; + private $bindParam = []; /** @var string Name of the default class to instantiate when fetching class instances. */ private $defaultFetchClass = '\stdClass'; @@ -52,7 +52,7 @@ class DB2Statement implements IteratorAggregate, Statement private $defaultFetchClassCtorArgs = []; /** @var int */ - private $_defaultFetchMode = FetchMode::MIXED; + private $defaultFetchMode = FetchMode::MIXED; /** * Indicates whether the statement is in the state when fetching results is possible @@ -66,7 +66,7 @@ class DB2Statement implements IteratorAggregate, Statement * * @var int[] */ - static private $_typeMap = [ + static private $typeMap = [ ParameterType::INTEGER => DB2_LONG, ParameterType::STRING => DB2_CHAR, ]; @@ -76,7 +76,7 @@ class DB2Statement implements IteratorAggregate, Statement */ public function __construct($stmt) { - $this->_stmt = $stmt; + $this->stmt = $stmt; } /** @@ -92,15 +92,15 @@ public function bindValue($param, $value, $type = ParameterType::STRING) */ public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null) { - $this->_bindParam[$column] =& $variable; + $this->bindParam[$column] =& $variable; - if ($type && isset(self::$_typeMap[$type])) { - $type = self::$_typeMap[$type]; + if ($type && isset(self::$typeMap[$type])) { + $type = self::$typeMap[$type]; } else { $type = DB2_CHAR; } - if (! db2_bind_param($this->_stmt, $column, 'variable', DB2_PARAM_IN, $type)) { + if (! db2_bind_param($this->stmt, $column, 'variable', DB2_PARAM_IN, $type)) { throw new DB2Exception(db2_stmt_errormsg()); } @@ -112,13 +112,13 @@ public function bindParam($column, &$variable, $type = ParameterType::STRING, $l */ public function closeCursor() { - if (! $this->_stmt) { + if (! $this->stmt) { return false; } - $this->_bindParam = []; + $this->bindParam = []; - if (! db2_free_result($this->_stmt)) { + if (! db2_free_result($this->stmt)) { return false; } @@ -132,11 +132,11 @@ public function closeCursor() */ public function columnCount() { - if (! $this->_stmt) { + if (! $this->stmt) { return false; } - return db2_num_fields($this->_stmt); + return db2_num_fields($this->stmt); } /** @@ -163,21 +163,21 @@ public function errorInfo() */ public function execute($params = null) { - if (! $this->_stmt) { + if (! $this->stmt) { return false; } if ($params === null) { - ksort($this->_bindParam); + ksort($this->bindParam); $params = []; - foreach ($this->_bindParam as $column => $value) { + foreach ($this->bindParam as $column => $value) { $params[] = $value; } } - $retval = db2_execute($this->_stmt, $params); + $retval = db2_execute($this->stmt, $params); if ($retval === false) { throw new DB2Exception(db2_stmt_errormsg()); @@ -193,7 +193,7 @@ public function execute($params = null) */ public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null) { - $this->_defaultFetchMode = $fetchMode; + $this->defaultFetchMode = $fetchMode; $this->defaultFetchClass = $arg2 ?: $this->defaultFetchClass; $this->defaultFetchClassCtorArgs = $arg3 ? (array) $arg3 : $this->defaultFetchClassCtorArgs; @@ -219,16 +219,16 @@ public function fetch($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEX return false; } - $fetchMode = $fetchMode ?: $this->_defaultFetchMode; + $fetchMode = $fetchMode ?: $this->defaultFetchMode; switch ($fetchMode) { case FetchMode::COLUMN: return $this->fetchColumn(); case FetchMode::MIXED: - return db2_fetch_both($this->_stmt); + return db2_fetch_both($this->stmt); case FetchMode::ASSOCIATIVE: - return db2_fetch_assoc($this->_stmt); + return db2_fetch_assoc($this->stmt); case FetchMode::CUSTOM_OBJECT: $className = $this->defaultFetchClass; @@ -240,7 +240,7 @@ public function fetch($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEX $ctorArgs = $args[2] ?? []; } - $result = db2_fetch_object($this->_stmt); + $result = db2_fetch_object($this->stmt); if ($result instanceof stdClass) { $result = $this->castObject($result, $className, $ctorArgs); @@ -249,10 +249,10 @@ public function fetch($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEX return $result; case FetchMode::NUMERIC: - return db2_fetch_array($this->_stmt); + return db2_fetch_array($this->stmt); case FetchMode::STANDARD_OBJECT: - return db2_fetch_object($this->_stmt); + return db2_fetch_object($this->stmt); default: throw new DB2Exception('Given Fetch-Style ' . $fetchMode . ' is not supported.'); @@ -305,7 +305,7 @@ public function fetchColumn($columnIndex = 0) */ public function rowCount() { - return @db2_num_rows($this->_stmt) ? : 0; + return @db2_num_rows($this->stmt) ? : 0; } /** diff --git a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php index 4495cc92d0f..1f1a1d218c3 100644 --- a/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php +++ b/lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php @@ -35,7 +35,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar public const OPTION_FLAGS = 'flags'; /** @var mysqli */ - private $_conn; + private $conn; /** * @param mixed[] $params @@ -59,7 +59,7 @@ public function __construct(array $params, $username, $password, array $driverOp $flags = $driverOptions[static::OPTION_FLAGS] ?? null; - $this->_conn = mysqli_init(); + $this->conn = mysqli_init(); $this->setSecureConnection($params); $this->setDriverOptions($driverOptions); @@ -67,8 +67,8 @@ public function __construct(array $params, $username, $password, array $driverOp set_error_handler(static function () { }); try { - if (! $this->_conn->real_connect($params['host'], $username, $password, $dbname, $port, $socket, $flags)) { - throw new MysqliException($this->_conn->connect_error, $this->_conn->sqlstate ?? 'HY000', $this->_conn->connect_errno); + if (! $this->conn->real_connect($params['host'], $username, $password, $dbname, $port, $socket, $flags)) { + throw new MysqliException($this->conn->connect_error, $this->conn->sqlstate ?? 'HY000', $this->conn->connect_errno); } } finally { restore_error_handler(); @@ -78,7 +78,7 @@ public function __construct(array $params, $username, $password, array $driverOp return; } - $this->_conn->set_charset($params['charset']); + $this->conn->set_charset($params['charset']); } /** @@ -90,7 +90,7 @@ public function __construct(array $params, $username, $password, array $driverOp */ public function getWrappedResourceHandle() { - return $this->_conn; + return $this->conn; } /** @@ -103,14 +103,14 @@ public function getWrappedResourceHandle() */ public function getServerVersion() { - $serverInfos = $this->_conn->get_server_info(); + $serverInfos = $this->conn->get_server_info(); if (stripos($serverInfos, 'mariadb') !== false) { return $serverInfos; } - $majorVersion = floor($this->_conn->server_version / 10000); - $minorVersion = floor(($this->_conn->server_version - $majorVersion * 10000) / 100); - $patchVersion = floor($this->_conn->server_version - $majorVersion * 10000 - $minorVersion * 100); + $majorVersion = floor($this->conn->server_version / 10000); + $minorVersion = floor(($this->conn->server_version - $majorVersion * 10000) / 100); + $patchVersion = floor($this->conn->server_version - $majorVersion * 10000 - $minorVersion * 100); return $majorVersion . '.' . $minorVersion . '.' . $patchVersion; } @@ -128,7 +128,7 @@ public function requiresQueryForServerVersion() */ public function prepare($prepareString) { - return new MysqliStatement($this->_conn, $prepareString); + return new MysqliStatement($this->conn, $prepareString); } /** @@ -149,7 +149,7 @@ public function query() */ public function quote($input, $type = ParameterType::STRING) { - return "'" . $this->_conn->escape_string($input) . "'"; + return "'" . $this->conn->escape_string($input) . "'"; } /** @@ -157,11 +157,11 @@ public function quote($input, $type = ParameterType::STRING) */ public function exec($statement) { - if ($this->_conn->query($statement) === false) { - throw new MysqliException($this->_conn->error, $this->_conn->sqlstate, $this->_conn->errno); + if ($this->conn->query($statement) === false) { + throw new MysqliException($this->conn->error, $this->conn->sqlstate, $this->conn->errno); } - return $this->_conn->affected_rows; + return $this->conn->affected_rows; } /** @@ -169,7 +169,7 @@ public function exec($statement) */ public function lastInsertId($name = null) { - return $this->_conn->insert_id; + return $this->conn->insert_id; } /** @@ -177,7 +177,7 @@ public function lastInsertId($name = null) */ public function beginTransaction() { - $this->_conn->query('START TRANSACTION'); + $this->conn->query('START TRANSACTION'); return true; } @@ -187,7 +187,7 @@ public function beginTransaction() */ public function commit() { - return $this->_conn->commit(); + return $this->conn->commit(); } /** @@ -195,7 +195,7 @@ public function commit() */ public function rollBack() { - return $this->_conn->rollback(); + return $this->conn->rollback(); } /** @@ -203,7 +203,7 @@ public function rollBack() */ public function errorCode() { - return $this->_conn->errno; + return $this->conn->errno; } /** @@ -211,7 +211,7 @@ public function errorCode() */ public function errorInfo() { - return $this->_conn->error; + return $this->conn->error; } /** @@ -249,17 +249,17 @@ private function setDriverOptions(array $driverOptions = []) ); } - if (@mysqli_options($this->_conn, $option, $value)) { + if (@mysqli_options($this->conn, $option, $value)) { continue; } $msg = sprintf($exceptionMsg, 'Failed to set', $option, $value); - $msg .= sprintf(', error: %s (%d)', mysqli_error($this->_conn), mysqli_errno($this->_conn)); + $msg .= sprintf(', error: %s (%d)', mysqli_error($this->conn), mysqli_errno($this->conn)); throw new MysqliException( $msg, - $this->_conn->sqlstate, - $this->_conn->errno + $this->conn->sqlstate, + $this->conn->errno ); } } @@ -271,7 +271,7 @@ private function setDriverOptions(array $driverOptions = []) */ public function ping() { - return $this->_conn->ping(); + return $this->conn->ping(); } /** @@ -292,7 +292,7 @@ private function setSecureConnection(array $params) return; } - $this->_conn->ssl_set( + $this->conn->ssl_set( $params['ssl_key'] ?? null, $params['ssl_cert'] ?? null, $params['ssl_ca'] ?? null, diff --git a/lib/Doctrine/DBAL/Event/ConnectionEventArgs.php b/lib/Doctrine/DBAL/Event/ConnectionEventArgs.php index 9492005ad6b..07620e9e40d 100644 --- a/lib/Doctrine/DBAL/Event/ConnectionEventArgs.php +++ b/lib/Doctrine/DBAL/Event/ConnectionEventArgs.php @@ -16,11 +16,11 @@ class ConnectionEventArgs extends EventArgs { /** @var Connection */ - private $_connection; + private $connection; public function __construct(Connection $connection) { - $this->_connection = $connection; + $this->connection = $connection; } /** @@ -28,7 +28,7 @@ public function __construct(Connection $connection) */ public function getConnection() { - return $this->_connection; + return $this->connection; } /** @@ -36,7 +36,7 @@ public function getConnection() */ public function getDriver() { - return $this->_connection->getDriver(); + return $this->connection->getDriver(); } /** @@ -44,7 +44,7 @@ public function getDriver() */ public function getDatabasePlatform() { - return $this->_connection->getDatabasePlatform(); + return $this->connection->getDatabasePlatform(); } /** @@ -52,6 +52,6 @@ public function getDatabasePlatform() */ public function getSchemaManager() { - return $this->_connection->getSchemaManager(); + return $this->connection->getSchemaManager(); } } diff --git a/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php b/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php index c16d4aea329..53bc6e36479 100644 --- a/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php +++ b/lib/Doctrine/DBAL/Event/Listeners/MysqlSessionInit.php @@ -20,14 +20,14 @@ class MysqlSessionInit implements EventSubscriber * * @var string */ - private $_charset; + private $charset; /** * The collation, or FALSE if no collation. * * @var string|bool */ - private $_collation; + private $collation; /** * Configure Charset and Collation options of MySQL Client for each Connection. @@ -37,8 +37,8 @@ class MysqlSessionInit implements EventSubscriber */ public function __construct($charset = 'utf8', $collation = false) { - $this->_charset = $charset; - $this->_collation = $collation; + $this->charset = $charset; + $this->collation = $collation; } /** @@ -46,8 +46,8 @@ public function __construct($charset = 'utf8', $collation = false) */ public function postConnect(ConnectionEventArgs $args) { - $collation = $this->_collation ? ' COLLATE ' . $this->_collation : ''; - $args->getConnection()->executeUpdate('SET NAMES ' . $this->_charset . $collation); + $collation = $this->collation ? ' COLLATE ' . $this->collation : ''; + $args->getConnection()->executeUpdate('SET NAMES ' . $this->charset . $collation); } /** diff --git a/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php index 551a2eeec44..8ec240a50d8 100644 --- a/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaAlterTableAddColumnEventArgs.php @@ -16,22 +16,22 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs { /** @var Column */ - private $_column; + private $column; /** @var TableDiff */ - private $_tableDiff; + private $tableDiff; /** @var AbstractPlatform */ - private $_platform; + private $platform; /** @var string[] */ - private $_sql = []; + private $sql = []; public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform) { - $this->_column = $column; - $this->_tableDiff = $tableDiff; - $this->_platform = $platform; + $this->column = $column; + $this->tableDiff = $tableDiff; + $this->platform = $platform; } /** @@ -39,7 +39,7 @@ public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatfo */ public function getColumn() { - return $this->_column; + return $this->column; } /** @@ -47,7 +47,7 @@ public function getColumn() */ public function getTableDiff() { - return $this->_tableDiff; + return $this->tableDiff; } /** @@ -55,7 +55,7 @@ public function getTableDiff() */ public function getPlatform() { - return $this->_platform; + return $this->platform; } /** @@ -66,9 +66,9 @@ public function getPlatform() public function addSql($sql) { if (is_array($sql)) { - $this->_sql = array_merge($this->_sql, $sql); + $this->sql = array_merge($this->sql, $sql); } else { - $this->_sql[] = $sql; + $this->sql[] = $sql; } return $this; @@ -79,6 +79,6 @@ public function addSql($sql) */ public function getSql() { - return $this->_sql; + return $this->sql; } } diff --git a/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php index bb3875bc3fc..c1283471c2a 100644 --- a/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaAlterTableChangeColumnEventArgs.php @@ -16,22 +16,22 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs { /** @var ColumnDiff */ - private $_columnDiff; + private $columnDiff; /** @var TableDiff */ - private $_tableDiff; + private $tableDiff; /** @var AbstractPlatform */ - private $_platform; + private $platform; /** @var string[] */ - private $_sql = []; + private $sql = []; public function __construct(ColumnDiff $columnDiff, TableDiff $tableDiff, AbstractPlatform $platform) { - $this->_columnDiff = $columnDiff; - $this->_tableDiff = $tableDiff; - $this->_platform = $platform; + $this->columnDiff = $columnDiff; + $this->tableDiff = $tableDiff; + $this->platform = $platform; } /** @@ -39,7 +39,7 @@ public function __construct(ColumnDiff $columnDiff, TableDiff $tableDiff, Abstra */ public function getColumnDiff() { - return $this->_columnDiff; + return $this->columnDiff; } /** @@ -47,7 +47,7 @@ public function getColumnDiff() */ public function getTableDiff() { - return $this->_tableDiff; + return $this->tableDiff; } /** @@ -55,7 +55,7 @@ public function getTableDiff() */ public function getPlatform() { - return $this->_platform; + return $this->platform; } /** @@ -66,9 +66,9 @@ public function getPlatform() public function addSql($sql) { if (is_array($sql)) { - $this->_sql = array_merge($this->_sql, $sql); + $this->sql = array_merge($this->sql, $sql); } else { - $this->_sql[] = $sql; + $this->sql[] = $sql; } return $this; @@ -79,6 +79,6 @@ public function addSql($sql) */ public function getSql() { - return $this->_sql; + return $this->sql; } } diff --git a/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php index a4d411c50c7..de6af93f44e 100644 --- a/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaAlterTableEventArgs.php @@ -15,18 +15,18 @@ class SchemaAlterTableEventArgs extends SchemaEventArgs { /** @var TableDiff */ - private $_tableDiff; + private $tableDiff; /** @var AbstractPlatform */ - private $_platform; + private $platform; /** @var string[] */ - private $_sql = []; + private $sql = []; public function __construct(TableDiff $tableDiff, AbstractPlatform $platform) { - $this->_tableDiff = $tableDiff; - $this->_platform = $platform; + $this->tableDiff = $tableDiff; + $this->platform = $platform; } /** @@ -34,7 +34,7 @@ public function __construct(TableDiff $tableDiff, AbstractPlatform $platform) */ public function getTableDiff() { - return $this->_tableDiff; + return $this->tableDiff; } /** @@ -42,7 +42,7 @@ public function getTableDiff() */ public function getPlatform() { - return $this->_platform; + return $this->platform; } /** @@ -53,9 +53,9 @@ public function getPlatform() public function addSql($sql) { if (is_array($sql)) { - $this->_sql = array_merge($this->_sql, $sql); + $this->sql = array_merge($this->sql, $sql); } else { - $this->_sql[] = $sql; + $this->sql[] = $sql; } return $this; @@ -66,6 +66,6 @@ public function addSql($sql) */ public function getSql() { - return $this->_sql; + return $this->sql; } } diff --git a/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php index c4036b679c3..ac57c8c3be6 100644 --- a/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaAlterTableRemoveColumnEventArgs.php @@ -16,22 +16,22 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs { /** @var Column */ - private $_column; + private $column; /** @var TableDiff */ - private $_tableDiff; + private $tableDiff; /** @var AbstractPlatform */ - private $_platform; + private $platform; /** @var string[] */ - private $_sql = []; + private $sql = []; public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform) { - $this->_column = $column; - $this->_tableDiff = $tableDiff; - $this->_platform = $platform; + $this->column = $column; + $this->tableDiff = $tableDiff; + $this->platform = $platform; } /** @@ -39,7 +39,7 @@ public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatfo */ public function getColumn() { - return $this->_column; + return $this->column; } /** @@ -47,7 +47,7 @@ public function getColumn() */ public function getTableDiff() { - return $this->_tableDiff; + return $this->tableDiff; } /** @@ -55,7 +55,7 @@ public function getTableDiff() */ public function getPlatform() { - return $this->_platform; + return $this->platform; } /** @@ -66,9 +66,9 @@ public function getPlatform() public function addSql($sql) { if (is_array($sql)) { - $this->_sql = array_merge($this->_sql, $sql); + $this->sql = array_merge($this->sql, $sql); } else { - $this->_sql[] = $sql; + $this->sql[] = $sql; } return $this; @@ -79,6 +79,6 @@ public function addSql($sql) */ public function getSql() { - return $this->_sql; + return $this->sql; } } diff --git a/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php index 16bcef74454..74f7022becb 100644 --- a/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaAlterTableRenameColumnEventArgs.php @@ -16,29 +16,29 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs { /** @var string */ - private $_oldColumnName; + private $oldColumnName; /** @var Column */ - private $_column; + private $column; /** @var TableDiff */ - private $_tableDiff; + private $tableDiff; /** @var AbstractPlatform */ - private $_platform; + private $platform; /** @var string[] */ - private $_sql = []; + private $sql = []; /** * @param string $oldColumnName */ public function __construct($oldColumnName, Column $column, TableDiff $tableDiff, AbstractPlatform $platform) { - $this->_oldColumnName = $oldColumnName; - $this->_column = $column; - $this->_tableDiff = $tableDiff; - $this->_platform = $platform; + $this->oldColumnName = $oldColumnName; + $this->column = $column; + $this->tableDiff = $tableDiff; + $this->platform = $platform; } /** @@ -46,7 +46,7 @@ public function __construct($oldColumnName, Column $column, TableDiff $tableDiff */ public function getOldColumnName() { - return $this->_oldColumnName; + return $this->oldColumnName; } /** @@ -54,7 +54,7 @@ public function getOldColumnName() */ public function getColumn() { - return $this->_column; + return $this->column; } /** @@ -62,7 +62,7 @@ public function getColumn() */ public function getTableDiff() { - return $this->_tableDiff; + return $this->tableDiff; } /** @@ -70,7 +70,7 @@ public function getTableDiff() */ public function getPlatform() { - return $this->_platform; + return $this->platform; } /** @@ -81,9 +81,9 @@ public function getPlatform() public function addSql($sql) { if (is_array($sql)) { - $this->_sql = array_merge($this->_sql, $sql); + $this->sql = array_merge($this->sql, $sql); } else { - $this->_sql[] = $sql; + $this->sql[] = $sql; } return $this; @@ -94,6 +94,6 @@ public function addSql($sql) */ public function getSql() { - return $this->_sql; + return $this->sql; } } diff --git a/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php index f311c22f2f9..906ba1d3487 100644 --- a/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaColumnDefinitionEventArgs.php @@ -14,23 +14,23 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs { /** @var Column|null */ - private $_column = null; + private $column = null; /** * Raw column data as fetched from the database. * * @var mixed[] */ - private $_tableColumn; + private $tableColumn; /** @var string */ - private $_table; + private $table; /** @var string */ - private $_database; + private $database; /** @var Connection */ - private $_connection; + private $connection; /** * @param mixed[] $tableColumn @@ -39,10 +39,10 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs */ public function __construct(array $tableColumn, $table, $database, Connection $connection) { - $this->_tableColumn = $tableColumn; - $this->_table = $table; - $this->_database = $database; - $this->_connection = $connection; + $this->tableColumn = $tableColumn; + $this->table = $table; + $this->database = $database; + $this->connection = $connection; } /** @@ -53,7 +53,7 @@ public function __construct(array $tableColumn, $table, $database, Connection $c */ public function setColumn(?Column $column = null) { - $this->_column = $column; + $this->column = $column; return $this; } @@ -63,7 +63,7 @@ public function setColumn(?Column $column = null) */ public function getColumn() { - return $this->_column; + return $this->column; } /** @@ -71,7 +71,7 @@ public function getColumn() */ public function getTableColumn() { - return $this->_tableColumn; + return $this->tableColumn; } /** @@ -79,7 +79,7 @@ public function getTableColumn() */ public function getTable() { - return $this->_table; + return $this->table; } /** @@ -87,7 +87,7 @@ public function getTable() */ public function getDatabase() { - return $this->_database; + return $this->database; } /** @@ -95,7 +95,7 @@ public function getDatabase() */ public function getConnection() { - return $this->_connection; + return $this->connection; } /** @@ -103,6 +103,6 @@ public function getConnection() */ public function getDatabasePlatform() { - return $this->_connection->getDatabasePlatform(); + return $this->connection->getDatabasePlatform(); } } diff --git a/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php index fac12845eac..5e1d9afe0df 100644 --- a/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaCreateTableColumnEventArgs.php @@ -16,22 +16,22 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs { /** @var Column */ - private $_column; + private $column; /** @var Table */ - private $_table; + private $table; /** @var AbstractPlatform */ - private $_platform; + private $platform; /** @var string[] */ - private $_sql = []; + private $sql = []; public function __construct(Column $column, Table $table, AbstractPlatform $platform) { - $this->_column = $column; - $this->_table = $table; - $this->_platform = $platform; + $this->column = $column; + $this->table = $table; + $this->platform = $platform; } /** @@ -39,7 +39,7 @@ public function __construct(Column $column, Table $table, AbstractPlatform $plat */ public function getColumn() { - return $this->_column; + return $this->column; } /** @@ -47,7 +47,7 @@ public function getColumn() */ public function getTable() { - return $this->_table; + return $this->table; } /** @@ -55,7 +55,7 @@ public function getTable() */ public function getPlatform() { - return $this->_platform; + return $this->platform; } /** @@ -66,9 +66,9 @@ public function getPlatform() public function addSql($sql) { if (is_array($sql)) { - $this->_sql = array_merge($this->_sql, $sql); + $this->sql = array_merge($this->sql, $sql); } else { - $this->_sql[] = $sql; + $this->sql[] = $sql; } return $this; @@ -79,6 +79,6 @@ public function addSql($sql) */ public function getSql() { - return $this->_sql; + return $this->sql; } } diff --git a/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php index 7f2afc4f7fa..fc8ab830460 100644 --- a/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaCreateTableEventArgs.php @@ -16,19 +16,19 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs { /** @var Table */ - private $_table; + private $table; /** @var Column[] */ - private $_columns; + private $columns; /** @var mixed[] */ - private $_options; + private $options; /** @var AbstractPlatform */ - private $_platform; + private $platform; /** @var string[] */ - private $_sql = []; + private $sql = []; /** * @param Column[] $columns @@ -36,10 +36,10 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs */ public function __construct(Table $table, array $columns, array $options, AbstractPlatform $platform) { - $this->_table = $table; - $this->_columns = $columns; - $this->_options = $options; - $this->_platform = $platform; + $this->table = $table; + $this->columns = $columns; + $this->options = $options; + $this->platform = $platform; } /** @@ -47,7 +47,7 @@ public function __construct(Table $table, array $columns, array $options, Abstra */ public function getTable() { - return $this->_table; + return $this->table; } /** @@ -55,7 +55,7 @@ public function getTable() */ public function getColumns() { - return $this->_columns; + return $this->columns; } /** @@ -63,7 +63,7 @@ public function getColumns() */ public function getOptions() { - return $this->_options; + return $this->options; } /** @@ -71,7 +71,7 @@ public function getOptions() */ public function getPlatform() { - return $this->_platform; + return $this->platform; } /** @@ -82,9 +82,9 @@ public function getPlatform() public function addSql($sql) { if (is_array($sql)) { - $this->_sql = array_merge($this->_sql, $sql); + $this->sql = array_merge($this->sql, $sql); } else { - $this->_sql[] = $sql; + $this->sql[] = $sql; } return $this; @@ -95,6 +95,6 @@ public function addSql($sql) */ public function getSql() { - return $this->_sql; + return $this->sql; } } diff --git a/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php index cc77805ca83..97888b3f60a 100644 --- a/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaDropTableEventArgs.php @@ -15,13 +15,13 @@ class SchemaDropTableEventArgs extends SchemaEventArgs { /** @var string|Table */ - private $_table; + private $table; /** @var AbstractPlatform */ - private $_platform; + private $platform; /** @var string|null */ - private $_sql = null; + private $sql = null; /** * @param string|Table $table @@ -34,8 +34,8 @@ public function __construct($table, AbstractPlatform $platform) throw new InvalidArgumentException('SchemaDropTableEventArgs expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); } - $this->_table = $table; - $this->_platform = $platform; + $this->table = $table; + $this->platform = $platform; } /** @@ -43,7 +43,7 @@ public function __construct($table, AbstractPlatform $platform) */ public function getTable() { - return $this->_table; + return $this->table; } /** @@ -51,7 +51,7 @@ public function getTable() */ public function getPlatform() { - return $this->_platform; + return $this->platform; } /** @@ -61,7 +61,7 @@ public function getPlatform() */ public function setSql($sql) { - $this->_sql = $sql; + $this->sql = $sql; return $this; } @@ -71,6 +71,6 @@ public function setSql($sql) */ public function getSql() { - return $this->_sql; + return $this->sql; } } diff --git a/lib/Doctrine/DBAL/Event/SchemaEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaEventArgs.php index a47bde72916..30e1e65e24e 100644 --- a/lib/Doctrine/DBAL/Event/SchemaEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaEventArgs.php @@ -12,14 +12,14 @@ class SchemaEventArgs extends EventArgs { /** @var bool */ - private $_preventDefault = false; + private $preventDefault = false; /** * @return \Doctrine\DBAL\Event\SchemaEventArgs */ public function preventDefault() { - $this->_preventDefault = true; + $this->preventDefault = true; return $this; } @@ -29,6 +29,6 @@ public function preventDefault() */ public function isDefaultPrevented() { - return $this->_preventDefault; + return $this->preventDefault; } } diff --git a/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php b/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php index ec0d94aecbf..f89864158ce 100644 --- a/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php +++ b/lib/Doctrine/DBAL/Event/SchemaIndexDefinitionEventArgs.php @@ -14,20 +14,20 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs { /** @var Index|null */ - private $_index = null; + private $index = null; /** * Raw index data as fetched from the database. * * @var mixed[] */ - private $_tableIndex; + private $tableIndex; /** @var string */ - private $_table; + private $table; /** @var Connection */ - private $_connection; + private $connection; /** * @param mixed[] $tableIndex @@ -35,9 +35,9 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs */ public function __construct(array $tableIndex, $table, Connection $connection) { - $this->_tableIndex = $tableIndex; - $this->_table = $table; - $this->_connection = $connection; + $this->tableIndex = $tableIndex; + $this->table = $table; + $this->connection = $connection; } /** @@ -47,7 +47,7 @@ public function __construct(array $tableIndex, $table, Connection $connection) */ public function setIndex(?Index $index = null) { - $this->_index = $index; + $this->index = $index; return $this; } @@ -57,7 +57,7 @@ public function setIndex(?Index $index = null) */ public function getIndex() { - return $this->_index; + return $this->index; } /** @@ -65,7 +65,7 @@ public function getIndex() */ public function getTableIndex() { - return $this->_tableIndex; + return $this->tableIndex; } /** @@ -73,7 +73,7 @@ public function getTableIndex() */ public function getTable() { - return $this->_table; + return $this->table; } /** @@ -81,7 +81,7 @@ public function getTable() */ public function getConnection() { - return $this->_connection; + return $this->connection; } /** @@ -89,6 +89,6 @@ public function getConnection() */ public function getDatabasePlatform() { - return $this->_connection->getDatabasePlatform(); + return $this->connection->getDatabasePlatform(); } } diff --git a/lib/Doctrine/DBAL/Schema/View.php b/lib/Doctrine/DBAL/Schema/View.php index 6170f63680b..bee0a019a0e 100644 --- a/lib/Doctrine/DBAL/Schema/View.php +++ b/lib/Doctrine/DBAL/Schema/View.php @@ -10,7 +10,7 @@ class View extends AbstractAsset { /** @var string */ - private $_sql; + private $sql; /** * @param string $name @@ -19,7 +19,7 @@ class View extends AbstractAsset public function __construct($name, $sql) { $this->_setName($name); - $this->_sql = $sql; + $this->sql = $sql; } /** @@ -27,6 +27,6 @@ public function __construct($name, $sql) */ public function getSql() { - return $this->_sql; + return $this->sql; } }