Removed leading underscore from private class memeber names

parent 64939c35
This diff is collapsed.
...@@ -27,7 +27,7 @@ use function func_get_args; ...@@ -27,7 +27,7 @@ use function func_get_args;
class DB2Connection implements Connection, ServerInfoAwareConnection class DB2Connection implements Connection, ServerInfoAwareConnection
{ {
/** @var resource */ /** @var resource */
private $_conn = null; private $conn = null;
/** /**
* @param mixed[] $params * @param mixed[] $params
...@@ -42,11 +42,11 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -42,11 +42,11 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
$isPersistent = (isset($params['persistent']) && $params['persistent'] === true); $isPersistent = (isset($params['persistent']) && $params['persistent'] === true);
if ($isPersistent) { if ($isPersistent) {
$this->_conn = db2_pconnect($params['dbname'], $username, $password, $driverOptions); $this->conn = db2_pconnect($params['dbname'], $username, $password, $driverOptions);
} else { } 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()); throw new DB2Exception(db2_conn_errormsg());
} }
} }
...@@ -57,7 +57,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -57,7 +57,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
public function getServerVersion() public function getServerVersion()
{ {
/** @var stdClass $serverInfo */ /** @var stdClass $serverInfo */
$serverInfo = db2_server_info($this->_conn); $serverInfo = db2_server_info($this->conn);
return $serverInfo->DBMS_VER; return $serverInfo->DBMS_VER;
} }
...@@ -75,7 +75,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -75,7 +75,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/ */
public function prepare($sql) public function prepare($sql)
{ {
$stmt = @db2_prepare($this->_conn, $sql); $stmt = @db2_prepare($this->conn, $sql);
if (! $stmt) { if (! $stmt) {
throw new DB2Exception(db2_stmt_errormsg()); throw new DB2Exception(db2_stmt_errormsg());
} }
...@@ -115,7 +115,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -115,7 +115,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/ */
public function exec($statement) public function exec($statement)
{ {
$stmt = @db2_exec($this->_conn, $statement); $stmt = @db2_exec($this->conn, $statement);
if ($stmt === false) { if ($stmt === false) {
throw new DB2Exception(db2_stmt_errormsg()); throw new DB2Exception(db2_stmt_errormsg());
...@@ -129,7 +129,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -129,7 +129,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/ */
public function lastInsertId($name = null) public function lastInsertId($name = null)
{ {
return db2_last_insert_id($this->_conn); return db2_last_insert_id($this->conn);
} }
/** /**
...@@ -137,7 +137,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -137,7 +137,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/ */
public function beginTransaction() public function beginTransaction()
{ {
db2_autocommit($this->_conn, DB2_AUTOCOMMIT_OFF); db2_autocommit($this->conn, DB2_AUTOCOMMIT_OFF);
} }
/** /**
...@@ -145,10 +145,10 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -145,10 +145,10 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/ */
public function commit() public function commit()
{ {
if (! db2_commit($this->_conn)) { if (! db2_commit($this->conn)) {
throw new DB2Exception(db2_conn_errormsg($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 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -156,10 +156,10 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/ */
public function rollBack() public function rollBack()
{ {
if (! db2_rollback($this->_conn)) { if (! db2_rollback($this->conn)) {
throw new DB2Exception(db2_conn_errormsg($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 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -167,7 +167,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
*/ */
public function errorCode() public function errorCode()
{ {
return db2_conn_error($this->_conn); return db2_conn_error($this->conn);
} }
/** /**
...@@ -176,7 +176,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -176,7 +176,7 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
public function errorInfo() public function errorInfo()
{ {
return [ return [
0 => db2_conn_errormsg($this->_conn), 0 => db2_conn_errormsg($this->conn),
1 => $this->errorCode(), 1 => $this->errorCode(),
]; ];
} }
......
...@@ -40,10 +40,10 @@ use function strtolower; ...@@ -40,10 +40,10 @@ use function strtolower;
class DB2Statement implements IteratorAggregate, Statement class DB2Statement implements IteratorAggregate, Statement
{ {
/** @var resource */ /** @var resource */
private $_stmt; private $stmt;
/** @var mixed[] */ /** @var mixed[] */
private $_bindParam = []; private $bindParam = [];
/** @var string Name of the default class to instantiate when fetching class instances. */ /** @var string Name of the default class to instantiate when fetching class instances. */
private $defaultFetchClass = '\stdClass'; private $defaultFetchClass = '\stdClass';
...@@ -52,7 +52,7 @@ class DB2Statement implements IteratorAggregate, Statement ...@@ -52,7 +52,7 @@ class DB2Statement implements IteratorAggregate, Statement
private $defaultFetchClassCtorArgs = []; private $defaultFetchClassCtorArgs = [];
/** @var int */ /** @var int */
private $_defaultFetchMode = FetchMode::MIXED; private $defaultFetchMode = FetchMode::MIXED;
/** /**
* Indicates whether the statement is in the state when fetching results is possible * Indicates whether the statement is in the state when fetching results is possible
...@@ -66,7 +66,7 @@ class DB2Statement implements IteratorAggregate, Statement ...@@ -66,7 +66,7 @@ class DB2Statement implements IteratorAggregate, Statement
* *
* @var int[] * @var int[]
*/ */
static private $_typeMap = [ static private $typeMap = [
ParameterType::INTEGER => DB2_LONG, ParameterType::INTEGER => DB2_LONG,
ParameterType::STRING => DB2_CHAR, ParameterType::STRING => DB2_CHAR,
]; ];
...@@ -76,7 +76,7 @@ class DB2Statement implements IteratorAggregate, Statement ...@@ -76,7 +76,7 @@ class DB2Statement implements IteratorAggregate, Statement
*/ */
public function __construct($stmt) public function __construct($stmt)
{ {
$this->_stmt = $stmt; $this->stmt = $stmt;
} }
/** /**
...@@ -92,15 +92,15 @@ class DB2Statement implements IteratorAggregate, Statement ...@@ -92,15 +92,15 @@ class DB2Statement implements IteratorAggregate, Statement
*/ */
public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null) public function bindParam($column, &$variable, $type = ParameterType::STRING, $length = null)
{ {
$this->_bindParam[$column] =& $variable; $this->bindParam[$column] =& $variable;
if ($type && isset(self::$_typeMap[$type])) { if ($type && isset(self::$typeMap[$type])) {
$type = self::$_typeMap[$type]; $type = self::$typeMap[$type];
} else { } else {
$type = DB2_CHAR; $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()); throw new DB2Exception(db2_stmt_errormsg());
} }
...@@ -112,13 +112,13 @@ class DB2Statement implements IteratorAggregate, Statement ...@@ -112,13 +112,13 @@ class DB2Statement implements IteratorAggregate, Statement
*/ */
public function closeCursor() public function closeCursor()
{ {
if (! $this->_stmt) { if (! $this->stmt) {
return false; return false;
} }
$this->_bindParam = []; $this->bindParam = [];
if (! db2_free_result($this->_stmt)) { if (! db2_free_result($this->stmt)) {
return false; return false;
} }
...@@ -132,11 +132,11 @@ class DB2Statement implements IteratorAggregate, Statement ...@@ -132,11 +132,11 @@ class DB2Statement implements IteratorAggregate, Statement
*/ */
public function columnCount() public function columnCount()
{ {
if (! $this->_stmt) { if (! $this->stmt) {
return false; return false;
} }
return db2_num_fields($this->_stmt); return db2_num_fields($this->stmt);
} }
/** /**
...@@ -163,21 +163,21 @@ class DB2Statement implements IteratorAggregate, Statement ...@@ -163,21 +163,21 @@ class DB2Statement implements IteratorAggregate, Statement
*/ */
public function execute($params = null) public function execute($params = null)
{ {
if (! $this->_stmt) { if (! $this->stmt) {
return false; return false;
} }
if ($params === null) { if ($params === null) {
ksort($this->_bindParam); ksort($this->bindParam);
$params = []; $params = [];
foreach ($this->_bindParam as $column => $value) { foreach ($this->bindParam as $column => $value) {
$params[] = $value; $params[] = $value;
} }
} }
$retval = db2_execute($this->_stmt, $params); $retval = db2_execute($this->stmt, $params);
if ($retval === false) { if ($retval === false) {
throw new DB2Exception(db2_stmt_errormsg()); throw new DB2Exception(db2_stmt_errormsg());
...@@ -193,7 +193,7 @@ class DB2Statement implements IteratorAggregate, Statement ...@@ -193,7 +193,7 @@ class DB2Statement implements IteratorAggregate, Statement
*/ */
public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null) public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null)
{ {
$this->_defaultFetchMode = $fetchMode; $this->defaultFetchMode = $fetchMode;
$this->defaultFetchClass = $arg2 ?: $this->defaultFetchClass; $this->defaultFetchClass = $arg2 ?: $this->defaultFetchClass;
$this->defaultFetchClassCtorArgs = $arg3 ? (array) $arg3 : $this->defaultFetchClassCtorArgs; $this->defaultFetchClassCtorArgs = $arg3 ? (array) $arg3 : $this->defaultFetchClassCtorArgs;
...@@ -219,16 +219,16 @@ class DB2Statement implements IteratorAggregate, Statement ...@@ -219,16 +219,16 @@ class DB2Statement implements IteratorAggregate, Statement
return false; return false;
} }
$fetchMode = $fetchMode ?: $this->_defaultFetchMode; $fetchMode = $fetchMode ?: $this->defaultFetchMode;
switch ($fetchMode) { switch ($fetchMode) {
case FetchMode::COLUMN: case FetchMode::COLUMN:
return $this->fetchColumn(); return $this->fetchColumn();
case FetchMode::MIXED: case FetchMode::MIXED:
return db2_fetch_both($this->_stmt); return db2_fetch_both($this->stmt);
case FetchMode::ASSOCIATIVE: case FetchMode::ASSOCIATIVE:
return db2_fetch_assoc($this->_stmt); return db2_fetch_assoc($this->stmt);
case FetchMode::CUSTOM_OBJECT: case FetchMode::CUSTOM_OBJECT:
$className = $this->defaultFetchClass; $className = $this->defaultFetchClass;
...@@ -240,7 +240,7 @@ class DB2Statement implements IteratorAggregate, Statement ...@@ -240,7 +240,7 @@ class DB2Statement implements IteratorAggregate, Statement
$ctorArgs = $args[2] ?? []; $ctorArgs = $args[2] ?? [];
} }
$result = db2_fetch_object($this->_stmt); $result = db2_fetch_object($this->stmt);
if ($result instanceof stdClass) { if ($result instanceof stdClass) {
$result = $this->castObject($result, $className, $ctorArgs); $result = $this->castObject($result, $className, $ctorArgs);
...@@ -249,10 +249,10 @@ class DB2Statement implements IteratorAggregate, Statement ...@@ -249,10 +249,10 @@ class DB2Statement implements IteratorAggregate, Statement
return $result; return $result;
case FetchMode::NUMERIC: case FetchMode::NUMERIC:
return db2_fetch_array($this->_stmt); return db2_fetch_array($this->stmt);
case FetchMode::STANDARD_OBJECT: case FetchMode::STANDARD_OBJECT:
return db2_fetch_object($this->_stmt); return db2_fetch_object($this->stmt);
default: default:
throw new DB2Exception('Given Fetch-Style ' . $fetchMode . ' is not supported.'); throw new DB2Exception('Given Fetch-Style ' . $fetchMode . ' is not supported.');
...@@ -305,7 +305,7 @@ class DB2Statement implements IteratorAggregate, Statement ...@@ -305,7 +305,7 @@ class DB2Statement implements IteratorAggregate, Statement
*/ */
public function rowCount() public function rowCount()
{ {
return @db2_num_rows($this->_stmt) ? : 0; return @db2_num_rows($this->stmt) ? : 0;
} }
/** /**
......
...@@ -35,7 +35,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -35,7 +35,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
public const OPTION_FLAGS = 'flags'; public const OPTION_FLAGS = 'flags';
/** @var mysqli */ /** @var mysqli */
private $_conn; private $conn;
/** /**
* @param mixed[] $params * @param mixed[] $params
...@@ -59,7 +59,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -59,7 +59,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
$flags = $driverOptions[static::OPTION_FLAGS] ?? null; $flags = $driverOptions[static::OPTION_FLAGS] ?? null;
$this->_conn = mysqli_init(); $this->conn = mysqli_init();
$this->setSecureConnection($params); $this->setSecureConnection($params);
$this->setDriverOptions($driverOptions); $this->setDriverOptions($driverOptions);
...@@ -67,8 +67,8 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -67,8 +67,8 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
set_error_handler(static function () { set_error_handler(static function () {
}); });
try { try {
if (! $this->_conn->real_connect($params['host'], $username, $password, $dbname, $port, $socket, $flags)) { 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); throw new MysqliException($this->conn->connect_error, $this->conn->sqlstate ?? 'HY000', $this->conn->connect_errno);
} }
} finally { } finally {
restore_error_handler(); restore_error_handler();
...@@ -78,7 +78,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -78,7 +78,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
return; return;
} }
$this->_conn->set_charset($params['charset']); $this->conn->set_charset($params['charset']);
} }
/** /**
...@@ -90,7 +90,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -90,7 +90,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/ */
public function getWrappedResourceHandle() public function getWrappedResourceHandle()
{ {
return $this->_conn; return $this->conn;
} }
/** /**
...@@ -103,14 +103,14 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -103,14 +103,14 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/ */
public function getServerVersion() public function getServerVersion()
{ {
$serverInfos = $this->_conn->get_server_info(); $serverInfos = $this->conn->get_server_info();
if (stripos($serverInfos, 'mariadb') !== false) { if (stripos($serverInfos, 'mariadb') !== false) {
return $serverInfos; return $serverInfos;
} }
$majorVersion = floor($this->_conn->server_version / 10000); $majorVersion = floor($this->conn->server_version / 10000);
$minorVersion = floor(($this->_conn->server_version - $majorVersion * 10000) / 100); $minorVersion = floor(($this->conn->server_version - $majorVersion * 10000) / 100);
$patchVersion = floor($this->_conn->server_version - $majorVersion * 10000 - $minorVersion * 100); $patchVersion = floor($this->conn->server_version - $majorVersion * 10000 - $minorVersion * 100);
return $majorVersion . '.' . $minorVersion . '.' . $patchVersion; return $majorVersion . '.' . $minorVersion . '.' . $patchVersion;
} }
...@@ -128,7 +128,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -128,7 +128,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/ */
public function prepare($prepareString) public function prepare($prepareString)
{ {
return new MysqliStatement($this->_conn, $prepareString); return new MysqliStatement($this->conn, $prepareString);
} }
/** /**
...@@ -149,7 +149,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -149,7 +149,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/ */
public function quote($input, $type = ParameterType::STRING) public function quote($input, $type = ParameterType::STRING)
{ {
return "'" . $this->_conn->escape_string($input) . "'"; return "'" . $this->conn->escape_string($input) . "'";
} }
/** /**
...@@ -157,11 +157,11 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -157,11 +157,11 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/ */
public function exec($statement) public function exec($statement)
{ {
if ($this->_conn->query($statement) === false) { if ($this->conn->query($statement) === false) {
throw new MysqliException($this->_conn->error, $this->_conn->sqlstate, $this->_conn->errno); 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 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -169,7 +169,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/ */
public function lastInsertId($name = null) public function lastInsertId($name = null)
{ {
return $this->_conn->insert_id; return $this->conn->insert_id;
} }
/** /**
...@@ -177,7 +177,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -177,7 +177,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/ */
public function beginTransaction() public function beginTransaction()
{ {
$this->_conn->query('START TRANSACTION'); $this->conn->query('START TRANSACTION');
return true; return true;
} }
...@@ -187,7 +187,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -187,7 +187,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/ */
public function commit() public function commit()
{ {
return $this->_conn->commit(); return $this->conn->commit();
} }
/** /**
...@@ -195,7 +195,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -195,7 +195,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/ */
public function rollBack() public function rollBack()
{ {
return $this->_conn->rollback(); return $this->conn->rollback();
} }
/** /**
...@@ -203,7 +203,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -203,7 +203,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/ */
public function errorCode() public function errorCode()
{ {
return $this->_conn->errno; return $this->conn->errno;
} }
/** /**
...@@ -211,7 +211,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -211,7 +211,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/ */
public function errorInfo() public function errorInfo()
{ {
return $this->_conn->error; return $this->conn->error;
} }
/** /**
...@@ -249,17 +249,17 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -249,17 +249,17 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
); );
} }
if (@mysqli_options($this->_conn, $option, $value)) { if (@mysqli_options($this->conn, $option, $value)) {
continue; continue;
} }
$msg = sprintf($exceptionMsg, 'Failed to set', $option, $value); $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( throw new MysqliException(
$msg, $msg,
$this->_conn->sqlstate, $this->conn->sqlstate,
$this->_conn->errno $this->conn->errno
); );
} }
} }
...@@ -271,7 +271,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -271,7 +271,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
*/ */
public function ping() public function ping()
{ {
return $this->_conn->ping(); return $this->conn->ping();
} }
/** /**
...@@ -292,7 +292,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar ...@@ -292,7 +292,7 @@ class MysqliConnection implements Connection, PingableConnection, ServerInfoAwar
return; return;
} }
$this->_conn->ssl_set( $this->conn->ssl_set(
$params['ssl_key'] ?? null, $params['ssl_key'] ?? null,
$params['ssl_cert'] ?? null, $params['ssl_cert'] ?? null,
$params['ssl_ca'] ?? null, $params['ssl_ca'] ?? null,
......
...@@ -16,11 +16,11 @@ use Doctrine\DBAL\Schema\AbstractSchemaManager; ...@@ -16,11 +16,11 @@ use Doctrine\DBAL\Schema\AbstractSchemaManager;
class ConnectionEventArgs extends EventArgs class ConnectionEventArgs extends EventArgs
{ {
/** @var Connection */ /** @var Connection */
private $_connection; private $connection;
public function __construct(Connection $connection) public function __construct(Connection $connection)
{ {
$this->_connection = $connection; $this->connection = $connection;
} }
/** /**
...@@ -28,7 +28,7 @@ class ConnectionEventArgs extends EventArgs ...@@ -28,7 +28,7 @@ class ConnectionEventArgs extends EventArgs
*/ */
public function getConnection() public function getConnection()
{ {
return $this->_connection; return $this->connection;
} }
/** /**
...@@ -36,7 +36,7 @@ class ConnectionEventArgs extends EventArgs ...@@ -36,7 +36,7 @@ class ConnectionEventArgs extends EventArgs
*/ */
public function getDriver() public function getDriver()
{ {
return $this->_connection->getDriver(); return $this->connection->getDriver();
} }
/** /**
...@@ -44,7 +44,7 @@ class ConnectionEventArgs extends EventArgs ...@@ -44,7 +44,7 @@ class ConnectionEventArgs extends EventArgs
*/ */
public function getDatabasePlatform() public function getDatabasePlatform()
{ {
return $this->_connection->getDatabasePlatform(); return $this->connection->getDatabasePlatform();
} }
/** /**
...@@ -52,6 +52,6 @@ class ConnectionEventArgs extends EventArgs ...@@ -52,6 +52,6 @@ class ConnectionEventArgs extends EventArgs
*/ */
public function getSchemaManager() public function getSchemaManager()
{ {
return $this->_connection->getSchemaManager(); return $this->connection->getSchemaManager();
} }
} }
...@@ -20,14 +20,14 @@ class MysqlSessionInit implements EventSubscriber ...@@ -20,14 +20,14 @@ class MysqlSessionInit implements EventSubscriber
* *
* @var string * @var string
*/ */
private $_charset; private $charset;
/** /**
* The collation, or FALSE if no collation. * The collation, or FALSE if no collation.
* *
* @var string|bool * @var string|bool
*/ */
private $_collation; private $collation;
/** /**
* Configure Charset and Collation options of MySQL Client for each Connection. * Configure Charset and Collation options of MySQL Client for each Connection.
...@@ -37,8 +37,8 @@ class MysqlSessionInit implements EventSubscriber ...@@ -37,8 +37,8 @@ class MysqlSessionInit implements EventSubscriber
*/ */
public function __construct($charset = 'utf8', $collation = false) public function __construct($charset = 'utf8', $collation = false)
{ {
$this->_charset = $charset; $this->charset = $charset;
$this->_collation = $collation; $this->collation = $collation;
} }
/** /**
...@@ -46,8 +46,8 @@ class MysqlSessionInit implements EventSubscriber ...@@ -46,8 +46,8 @@ class MysqlSessionInit implements EventSubscriber
*/ */
public function postConnect(ConnectionEventArgs $args) public function postConnect(ConnectionEventArgs $args)
{ {
$collation = $this->_collation ? ' COLLATE ' . $this->_collation : ''; $collation = $this->collation ? ' COLLATE ' . $this->collation : '';
$args->getConnection()->executeUpdate('SET NAMES ' . $this->_charset . $collation); $args->getConnection()->executeUpdate('SET NAMES ' . $this->charset . $collation);
} }
/** /**
......
...@@ -16,22 +16,22 @@ use function is_array; ...@@ -16,22 +16,22 @@ use function is_array;
class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs
{ {
/** @var Column */ /** @var Column */
private $_column; private $column;
/** @var TableDiff */ /** @var TableDiff */
private $_tableDiff; private $tableDiff;
/** @var AbstractPlatform */ /** @var AbstractPlatform */
private $_platform; private $platform;
/** @var string[] */ /** @var string[] */
private $_sql = []; private $sql = [];
public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform) public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform)
{ {
$this->_column = $column; $this->column = $column;
$this->_tableDiff = $tableDiff; $this->tableDiff = $tableDiff;
$this->_platform = $platform; $this->platform = $platform;
} }
/** /**
...@@ -39,7 +39,7 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs ...@@ -39,7 +39,7 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs
*/ */
public function getColumn() public function getColumn()
{ {
return $this->_column; return $this->column;
} }
/** /**
...@@ -47,7 +47,7 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs ...@@ -47,7 +47,7 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs
*/ */
public function getTableDiff() public function getTableDiff()
{ {
return $this->_tableDiff; return $this->tableDiff;
} }
/** /**
...@@ -55,7 +55,7 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs ...@@ -55,7 +55,7 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs
*/ */
public function getPlatform() public function getPlatform()
{ {
return $this->_platform; return $this->platform;
} }
/** /**
...@@ -66,9 +66,9 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs ...@@ -66,9 +66,9 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs
public function addSql($sql) public function addSql($sql)
{ {
if (is_array($sql)) { if (is_array($sql)) {
$this->_sql = array_merge($this->_sql, $sql); $this->sql = array_merge($this->sql, $sql);
} else { } else {
$this->_sql[] = $sql; $this->sql[] = $sql;
} }
return $this; return $this;
...@@ -79,6 +79,6 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs ...@@ -79,6 +79,6 @@ class SchemaAlterTableAddColumnEventArgs extends SchemaEventArgs
*/ */
public function getSql() public function getSql()
{ {
return $this->_sql; return $this->sql;
} }
} }
...@@ -16,22 +16,22 @@ use function is_array; ...@@ -16,22 +16,22 @@ use function is_array;
class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs
{ {
/** @var ColumnDiff */ /** @var ColumnDiff */
private $_columnDiff; private $columnDiff;
/** @var TableDiff */ /** @var TableDiff */
private $_tableDiff; private $tableDiff;
/** @var AbstractPlatform */ /** @var AbstractPlatform */
private $_platform; private $platform;
/** @var string[] */ /** @var string[] */
private $_sql = []; private $sql = [];
public function __construct(ColumnDiff $columnDiff, TableDiff $tableDiff, AbstractPlatform $platform) public function __construct(ColumnDiff $columnDiff, TableDiff $tableDiff, AbstractPlatform $platform)
{ {
$this->_columnDiff = $columnDiff; $this->columnDiff = $columnDiff;
$this->_tableDiff = $tableDiff; $this->tableDiff = $tableDiff;
$this->_platform = $platform; $this->platform = $platform;
} }
/** /**
...@@ -39,7 +39,7 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs ...@@ -39,7 +39,7 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs
*/ */
public function getColumnDiff() public function getColumnDiff()
{ {
return $this->_columnDiff; return $this->columnDiff;
} }
/** /**
...@@ -47,7 +47,7 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs ...@@ -47,7 +47,7 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs
*/ */
public function getTableDiff() public function getTableDiff()
{ {
return $this->_tableDiff; return $this->tableDiff;
} }
/** /**
...@@ -55,7 +55,7 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs ...@@ -55,7 +55,7 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs
*/ */
public function getPlatform() public function getPlatform()
{ {
return $this->_platform; return $this->platform;
} }
/** /**
...@@ -66,9 +66,9 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs ...@@ -66,9 +66,9 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs
public function addSql($sql) public function addSql($sql)
{ {
if (is_array($sql)) { if (is_array($sql)) {
$this->_sql = array_merge($this->_sql, $sql); $this->sql = array_merge($this->sql, $sql);
} else { } else {
$this->_sql[] = $sql; $this->sql[] = $sql;
} }
return $this; return $this;
...@@ -79,6 +79,6 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs ...@@ -79,6 +79,6 @@ class SchemaAlterTableChangeColumnEventArgs extends SchemaEventArgs
*/ */
public function getSql() public function getSql()
{ {
return $this->_sql; return $this->sql;
} }
} }
...@@ -15,18 +15,18 @@ use function is_array; ...@@ -15,18 +15,18 @@ use function is_array;
class SchemaAlterTableEventArgs extends SchemaEventArgs class SchemaAlterTableEventArgs extends SchemaEventArgs
{ {
/** @var TableDiff */ /** @var TableDiff */
private $_tableDiff; private $tableDiff;
/** @var AbstractPlatform */ /** @var AbstractPlatform */
private $_platform; private $platform;
/** @var string[] */ /** @var string[] */
private $_sql = []; private $sql = [];
public function __construct(TableDiff $tableDiff, AbstractPlatform $platform) public function __construct(TableDiff $tableDiff, AbstractPlatform $platform)
{ {
$this->_tableDiff = $tableDiff; $this->tableDiff = $tableDiff;
$this->_platform = $platform; $this->platform = $platform;
} }
/** /**
...@@ -34,7 +34,7 @@ class SchemaAlterTableEventArgs extends SchemaEventArgs ...@@ -34,7 +34,7 @@ class SchemaAlterTableEventArgs extends SchemaEventArgs
*/ */
public function getTableDiff() public function getTableDiff()
{ {
return $this->_tableDiff; return $this->tableDiff;
} }
/** /**
...@@ -42,7 +42,7 @@ class SchemaAlterTableEventArgs extends SchemaEventArgs ...@@ -42,7 +42,7 @@ class SchemaAlterTableEventArgs extends SchemaEventArgs
*/ */
public function getPlatform() public function getPlatform()
{ {
return $this->_platform; return $this->platform;
} }
/** /**
...@@ -53,9 +53,9 @@ class SchemaAlterTableEventArgs extends SchemaEventArgs ...@@ -53,9 +53,9 @@ class SchemaAlterTableEventArgs extends SchemaEventArgs
public function addSql($sql) public function addSql($sql)
{ {
if (is_array($sql)) { if (is_array($sql)) {
$this->_sql = array_merge($this->_sql, $sql); $this->sql = array_merge($this->sql, $sql);
} else { } else {
$this->_sql[] = $sql; $this->sql[] = $sql;
} }
return $this; return $this;
...@@ -66,6 +66,6 @@ class SchemaAlterTableEventArgs extends SchemaEventArgs ...@@ -66,6 +66,6 @@ class SchemaAlterTableEventArgs extends SchemaEventArgs
*/ */
public function getSql() public function getSql()
{ {
return $this->_sql; return $this->sql;
} }
} }
...@@ -16,22 +16,22 @@ use function is_array; ...@@ -16,22 +16,22 @@ use function is_array;
class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs
{ {
/** @var Column */ /** @var Column */
private $_column; private $column;
/** @var TableDiff */ /** @var TableDiff */
private $_tableDiff; private $tableDiff;
/** @var AbstractPlatform */ /** @var AbstractPlatform */
private $_platform; private $platform;
/** @var string[] */ /** @var string[] */
private $_sql = []; private $sql = [];
public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform) public function __construct(Column $column, TableDiff $tableDiff, AbstractPlatform $platform)
{ {
$this->_column = $column; $this->column = $column;
$this->_tableDiff = $tableDiff; $this->tableDiff = $tableDiff;
$this->_platform = $platform; $this->platform = $platform;
} }
/** /**
...@@ -39,7 +39,7 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs ...@@ -39,7 +39,7 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs
*/ */
public function getColumn() public function getColumn()
{ {
return $this->_column; return $this->column;
} }
/** /**
...@@ -47,7 +47,7 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs ...@@ -47,7 +47,7 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs
*/ */
public function getTableDiff() public function getTableDiff()
{ {
return $this->_tableDiff; return $this->tableDiff;
} }
/** /**
...@@ -55,7 +55,7 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs ...@@ -55,7 +55,7 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs
*/ */
public function getPlatform() public function getPlatform()
{ {
return $this->_platform; return $this->platform;
} }
/** /**
...@@ -66,9 +66,9 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs ...@@ -66,9 +66,9 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs
public function addSql($sql) public function addSql($sql)
{ {
if (is_array($sql)) { if (is_array($sql)) {
$this->_sql = array_merge($this->_sql, $sql); $this->sql = array_merge($this->sql, $sql);
} else { } else {
$this->_sql[] = $sql; $this->sql[] = $sql;
} }
return $this; return $this;
...@@ -79,6 +79,6 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs ...@@ -79,6 +79,6 @@ class SchemaAlterTableRemoveColumnEventArgs extends SchemaEventArgs
*/ */
public function getSql() public function getSql()
{ {
return $this->_sql; return $this->sql;
} }
} }
...@@ -16,29 +16,29 @@ use function is_array; ...@@ -16,29 +16,29 @@ use function is_array;
class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
{ {
/** @var string */ /** @var string */
private $_oldColumnName; private $oldColumnName;
/** @var Column */ /** @var Column */
private $_column; private $column;
/** @var TableDiff */ /** @var TableDiff */
private $_tableDiff; private $tableDiff;
/** @var AbstractPlatform */ /** @var AbstractPlatform */
private $_platform; private $platform;
/** @var string[] */ /** @var string[] */
private $_sql = []; private $sql = [];
/** /**
* @param string $oldColumnName * @param string $oldColumnName
*/ */
public function __construct($oldColumnName, Column $column, TableDiff $tableDiff, AbstractPlatform $platform) public function __construct($oldColumnName, Column $column, TableDiff $tableDiff, AbstractPlatform $platform)
{ {
$this->_oldColumnName = $oldColumnName; $this->oldColumnName = $oldColumnName;
$this->_column = $column; $this->column = $column;
$this->_tableDiff = $tableDiff; $this->tableDiff = $tableDiff;
$this->_platform = $platform; $this->platform = $platform;
} }
/** /**
...@@ -46,7 +46,7 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs ...@@ -46,7 +46,7 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
*/ */
public function getOldColumnName() public function getOldColumnName()
{ {
return $this->_oldColumnName; return $this->oldColumnName;
} }
/** /**
...@@ -54,7 +54,7 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs ...@@ -54,7 +54,7 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
*/ */
public function getColumn() public function getColumn()
{ {
return $this->_column; return $this->column;
} }
/** /**
...@@ -62,7 +62,7 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs ...@@ -62,7 +62,7 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
*/ */
public function getTableDiff() public function getTableDiff()
{ {
return $this->_tableDiff; return $this->tableDiff;
} }
/** /**
...@@ -70,7 +70,7 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs ...@@ -70,7 +70,7 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
*/ */
public function getPlatform() public function getPlatform()
{ {
return $this->_platform; return $this->platform;
} }
/** /**
...@@ -81,9 +81,9 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs ...@@ -81,9 +81,9 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
public function addSql($sql) public function addSql($sql)
{ {
if (is_array($sql)) { if (is_array($sql)) {
$this->_sql = array_merge($this->_sql, $sql); $this->sql = array_merge($this->sql, $sql);
} else { } else {
$this->_sql[] = $sql; $this->sql[] = $sql;
} }
return $this; return $this;
...@@ -94,6 +94,6 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs ...@@ -94,6 +94,6 @@ class SchemaAlterTableRenameColumnEventArgs extends SchemaEventArgs
*/ */
public function getSql() public function getSql()
{ {
return $this->_sql; return $this->sql;
} }
} }
...@@ -14,23 +14,23 @@ use Doctrine\DBAL\Schema\Column; ...@@ -14,23 +14,23 @@ use Doctrine\DBAL\Schema\Column;
class SchemaColumnDefinitionEventArgs extends SchemaEventArgs class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
{ {
/** @var Column|null */ /** @var Column|null */
private $_column = null; private $column = null;
/** /**
* Raw column data as fetched from the database. * Raw column data as fetched from the database.
* *
* @var mixed[] * @var mixed[]
*/ */
private $_tableColumn; private $tableColumn;
/** @var string */ /** @var string */
private $_table; private $table;
/** @var string */ /** @var string */
private $_database; private $database;
/** @var Connection */ /** @var Connection */
private $_connection; private $connection;
/** /**
* @param mixed[] $tableColumn * @param mixed[] $tableColumn
...@@ -39,10 +39,10 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs ...@@ -39,10 +39,10 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/ */
public function __construct(array $tableColumn, $table, $database, Connection $connection) public function __construct(array $tableColumn, $table, $database, Connection $connection)
{ {
$this->_tableColumn = $tableColumn; $this->tableColumn = $tableColumn;
$this->_table = $table; $this->table = $table;
$this->_database = $database; $this->database = $database;
$this->_connection = $connection; $this->connection = $connection;
} }
/** /**
...@@ -53,7 +53,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs ...@@ -53,7 +53,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/ */
public function setColumn(?Column $column = null) public function setColumn(?Column $column = null)
{ {
$this->_column = $column; $this->column = $column;
return $this; return $this;
} }
...@@ -63,7 +63,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs ...@@ -63,7 +63,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/ */
public function getColumn() public function getColumn()
{ {
return $this->_column; return $this->column;
} }
/** /**
...@@ -71,7 +71,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs ...@@ -71,7 +71,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/ */
public function getTableColumn() public function getTableColumn()
{ {
return $this->_tableColumn; return $this->tableColumn;
} }
/** /**
...@@ -79,7 +79,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs ...@@ -79,7 +79,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/ */
public function getTable() public function getTable()
{ {
return $this->_table; return $this->table;
} }
/** /**
...@@ -87,7 +87,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs ...@@ -87,7 +87,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/ */
public function getDatabase() public function getDatabase()
{ {
return $this->_database; return $this->database;
} }
/** /**
...@@ -95,7 +95,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs ...@@ -95,7 +95,7 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/ */
public function getConnection() public function getConnection()
{ {
return $this->_connection; return $this->connection;
} }
/** /**
...@@ -103,6 +103,6 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs ...@@ -103,6 +103,6 @@ class SchemaColumnDefinitionEventArgs extends SchemaEventArgs
*/ */
public function getDatabasePlatform() public function getDatabasePlatform()
{ {
return $this->_connection->getDatabasePlatform(); return $this->connection->getDatabasePlatform();
} }
} }
...@@ -16,22 +16,22 @@ use function is_array; ...@@ -16,22 +16,22 @@ use function is_array;
class SchemaCreateTableColumnEventArgs extends SchemaEventArgs class SchemaCreateTableColumnEventArgs extends SchemaEventArgs
{ {
/** @var Column */ /** @var Column */
private $_column; private $column;
/** @var Table */ /** @var Table */
private $_table; private $table;
/** @var AbstractPlatform */ /** @var AbstractPlatform */
private $_platform; private $platform;
/** @var string[] */ /** @var string[] */
private $_sql = []; private $sql = [];
public function __construct(Column $column, Table $table, AbstractPlatform $platform) public function __construct(Column $column, Table $table, AbstractPlatform $platform)
{ {
$this->_column = $column; $this->column = $column;
$this->_table = $table; $this->table = $table;
$this->_platform = $platform; $this->platform = $platform;
} }
/** /**
...@@ -39,7 +39,7 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs ...@@ -39,7 +39,7 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs
*/ */
public function getColumn() public function getColumn()
{ {
return $this->_column; return $this->column;
} }
/** /**
...@@ -47,7 +47,7 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs ...@@ -47,7 +47,7 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs
*/ */
public function getTable() public function getTable()
{ {
return $this->_table; return $this->table;
} }
/** /**
...@@ -55,7 +55,7 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs ...@@ -55,7 +55,7 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs
*/ */
public function getPlatform() public function getPlatform()
{ {
return $this->_platform; return $this->platform;
} }
/** /**
...@@ -66,9 +66,9 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs ...@@ -66,9 +66,9 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs
public function addSql($sql) public function addSql($sql)
{ {
if (is_array($sql)) { if (is_array($sql)) {
$this->_sql = array_merge($this->_sql, $sql); $this->sql = array_merge($this->sql, $sql);
} else { } else {
$this->_sql[] = $sql; $this->sql[] = $sql;
} }
return $this; return $this;
...@@ -79,6 +79,6 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs ...@@ -79,6 +79,6 @@ class SchemaCreateTableColumnEventArgs extends SchemaEventArgs
*/ */
public function getSql() public function getSql()
{ {
return $this->_sql; return $this->sql;
} }
} }
...@@ -16,19 +16,19 @@ use function is_array; ...@@ -16,19 +16,19 @@ use function is_array;
class SchemaCreateTableEventArgs extends SchemaEventArgs class SchemaCreateTableEventArgs extends SchemaEventArgs
{ {
/** @var Table */ /** @var Table */
private $_table; private $table;
/** @var Column[] */ /** @var Column[] */
private $_columns; private $columns;
/** @var mixed[] */ /** @var mixed[] */
private $_options; private $options;
/** @var AbstractPlatform */ /** @var AbstractPlatform */
private $_platform; private $platform;
/** @var string[] */ /** @var string[] */
private $_sql = []; private $sql = [];
/** /**
* @param Column[] $columns * @param Column[] $columns
...@@ -36,10 +36,10 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs ...@@ -36,10 +36,10 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
*/ */
public function __construct(Table $table, array $columns, array $options, AbstractPlatform $platform) public function __construct(Table $table, array $columns, array $options, AbstractPlatform $platform)
{ {
$this->_table = $table; $this->table = $table;
$this->_columns = $columns; $this->columns = $columns;
$this->_options = $options; $this->options = $options;
$this->_platform = $platform; $this->platform = $platform;
} }
/** /**
...@@ -47,7 +47,7 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs ...@@ -47,7 +47,7 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
*/ */
public function getTable() public function getTable()
{ {
return $this->_table; return $this->table;
} }
/** /**
...@@ -55,7 +55,7 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs ...@@ -55,7 +55,7 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
*/ */
public function getColumns() public function getColumns()
{ {
return $this->_columns; return $this->columns;
} }
/** /**
...@@ -63,7 +63,7 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs ...@@ -63,7 +63,7 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
*/ */
public function getOptions() public function getOptions()
{ {
return $this->_options; return $this->options;
} }
/** /**
...@@ -71,7 +71,7 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs ...@@ -71,7 +71,7 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
*/ */
public function getPlatform() public function getPlatform()
{ {
return $this->_platform; return $this->platform;
} }
/** /**
...@@ -82,9 +82,9 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs ...@@ -82,9 +82,9 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
public function addSql($sql) public function addSql($sql)
{ {
if (is_array($sql)) { if (is_array($sql)) {
$this->_sql = array_merge($this->_sql, $sql); $this->sql = array_merge($this->sql, $sql);
} else { } else {
$this->_sql[] = $sql; $this->sql[] = $sql;
} }
return $this; return $this;
...@@ -95,6 +95,6 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs ...@@ -95,6 +95,6 @@ class SchemaCreateTableEventArgs extends SchemaEventArgs
*/ */
public function getSql() public function getSql()
{ {
return $this->_sql; return $this->sql;
} }
} }
...@@ -15,13 +15,13 @@ use function is_string; ...@@ -15,13 +15,13 @@ use function is_string;
class SchemaDropTableEventArgs extends SchemaEventArgs class SchemaDropTableEventArgs extends SchemaEventArgs
{ {
/** @var string|Table */ /** @var string|Table */
private $_table; private $table;
/** @var AbstractPlatform */ /** @var AbstractPlatform */
private $_platform; private $platform;
/** @var string|null */ /** @var string|null */
private $_sql = null; private $sql = null;
/** /**
* @param string|Table $table * @param string|Table $table
...@@ -34,8 +34,8 @@ class SchemaDropTableEventArgs extends SchemaEventArgs ...@@ -34,8 +34,8 @@ class SchemaDropTableEventArgs extends SchemaEventArgs
throw new InvalidArgumentException('SchemaDropTableEventArgs expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.'); throw new InvalidArgumentException('SchemaDropTableEventArgs expects $table parameter to be string or \Doctrine\DBAL\Schema\Table.');
} }
$this->_table = $table; $this->table = $table;
$this->_platform = $platform; $this->platform = $platform;
} }
/** /**
...@@ -43,7 +43,7 @@ class SchemaDropTableEventArgs extends SchemaEventArgs ...@@ -43,7 +43,7 @@ class SchemaDropTableEventArgs extends SchemaEventArgs
*/ */
public function getTable() public function getTable()
{ {
return $this->_table; return $this->table;
} }
/** /**
...@@ -51,7 +51,7 @@ class SchemaDropTableEventArgs extends SchemaEventArgs ...@@ -51,7 +51,7 @@ class SchemaDropTableEventArgs extends SchemaEventArgs
*/ */
public function getPlatform() public function getPlatform()
{ {
return $this->_platform; return $this->platform;
} }
/** /**
...@@ -61,7 +61,7 @@ class SchemaDropTableEventArgs extends SchemaEventArgs ...@@ -61,7 +61,7 @@ class SchemaDropTableEventArgs extends SchemaEventArgs
*/ */
public function setSql($sql) public function setSql($sql)
{ {
$this->_sql = $sql; $this->sql = $sql;
return $this; return $this;
} }
...@@ -71,6 +71,6 @@ class SchemaDropTableEventArgs extends SchemaEventArgs ...@@ -71,6 +71,6 @@ class SchemaDropTableEventArgs extends SchemaEventArgs
*/ */
public function getSql() public function getSql()
{ {
return $this->_sql; return $this->sql;
} }
} }
...@@ -12,14 +12,14 @@ use Doctrine\Common\EventArgs; ...@@ -12,14 +12,14 @@ use Doctrine\Common\EventArgs;
class SchemaEventArgs extends EventArgs class SchemaEventArgs extends EventArgs
{ {
/** @var bool */ /** @var bool */
private $_preventDefault = false; private $preventDefault = false;
/** /**
* @return \Doctrine\DBAL\Event\SchemaEventArgs * @return \Doctrine\DBAL\Event\SchemaEventArgs
*/ */
public function preventDefault() public function preventDefault()
{ {
$this->_preventDefault = true; $this->preventDefault = true;
return $this; return $this;
} }
...@@ -29,6 +29,6 @@ class SchemaEventArgs extends EventArgs ...@@ -29,6 +29,6 @@ class SchemaEventArgs extends EventArgs
*/ */
public function isDefaultPrevented() public function isDefaultPrevented()
{ {
return $this->_preventDefault; return $this->preventDefault;
} }
} }
...@@ -14,20 +14,20 @@ use Doctrine\DBAL\Schema\Index; ...@@ -14,20 +14,20 @@ use Doctrine\DBAL\Schema\Index;
class SchemaIndexDefinitionEventArgs extends SchemaEventArgs class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
{ {
/** @var Index|null */ /** @var Index|null */
private $_index = null; private $index = null;
/** /**
* Raw index data as fetched from the database. * Raw index data as fetched from the database.
* *
* @var mixed[] * @var mixed[]
*/ */
private $_tableIndex; private $tableIndex;
/** @var string */ /** @var string */
private $_table; private $table;
/** @var Connection */ /** @var Connection */
private $_connection; private $connection;
/** /**
* @param mixed[] $tableIndex * @param mixed[] $tableIndex
...@@ -35,9 +35,9 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs ...@@ -35,9 +35,9 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
*/ */
public function __construct(array $tableIndex, $table, Connection $connection) public function __construct(array $tableIndex, $table, Connection $connection)
{ {
$this->_tableIndex = $tableIndex; $this->tableIndex = $tableIndex;
$this->_table = $table; $this->table = $table;
$this->_connection = $connection; $this->connection = $connection;
} }
/** /**
...@@ -47,7 +47,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs ...@@ -47,7 +47,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
*/ */
public function setIndex(?Index $index = null) public function setIndex(?Index $index = null)
{ {
$this->_index = $index; $this->index = $index;
return $this; return $this;
} }
...@@ -57,7 +57,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs ...@@ -57,7 +57,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
*/ */
public function getIndex() public function getIndex()
{ {
return $this->_index; return $this->index;
} }
/** /**
...@@ -65,7 +65,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs ...@@ -65,7 +65,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
*/ */
public function getTableIndex() public function getTableIndex()
{ {
return $this->_tableIndex; return $this->tableIndex;
} }
/** /**
...@@ -73,7 +73,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs ...@@ -73,7 +73,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
*/ */
public function getTable() public function getTable()
{ {
return $this->_table; return $this->table;
} }
/** /**
...@@ -81,7 +81,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs ...@@ -81,7 +81,7 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
*/ */
public function getConnection() public function getConnection()
{ {
return $this->_connection; return $this->connection;
} }
/** /**
...@@ -89,6 +89,6 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs ...@@ -89,6 +89,6 @@ class SchemaIndexDefinitionEventArgs extends SchemaEventArgs
*/ */
public function getDatabasePlatform() public function getDatabasePlatform()
{ {
return $this->_connection->getDatabasePlatform(); return $this->connection->getDatabasePlatform();
} }
} }
...@@ -10,7 +10,7 @@ namespace Doctrine\DBAL\Schema; ...@@ -10,7 +10,7 @@ namespace Doctrine\DBAL\Schema;
class View extends AbstractAsset class View extends AbstractAsset
{ {
/** @var string */ /** @var string */
private $_sql; private $sql;
/** /**
* @param string $name * @param string $name
...@@ -19,7 +19,7 @@ class View extends AbstractAsset ...@@ -19,7 +19,7 @@ class View extends AbstractAsset
public function __construct($name, $sql) public function __construct($name, $sql)
{ {
$this->_setName($name); $this->_setName($name);
$this->_sql = $sql; $this->sql = $sql;
} }
/** /**
...@@ -27,6 +27,6 @@ class View extends AbstractAsset ...@@ -27,6 +27,6 @@ class View extends AbstractAsset
*/ */
public function getSql() public function getSql()
{ {
return $this->_sql; return $this->sql;
} }
} }
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