Skip to content

Commit

Permalink
fix(qa) apply PHP71Migration rule
Browse files Browse the repository at this point in the history
  • Loading branch information
connorhu committed Feb 6, 2024
1 parent 4f17c3b commit f244334
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/Hook.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function hookWhere($params)
$e = explode('.', $name);

if (2 == count($e)) {
list($alias, $column) = $e;
[$alias, $column] = $e;

$map = $this->query->getQueryComponent($alias);
$table = $map['table'];
Expand Down Expand Up @@ -189,7 +189,7 @@ public function hookOrderby($params)
$e = explode('.', $e[0]);

if (2 == count($e)) {
list($alias, $column) = $e;
[$alias, $column] = $e;

$map = $this->query->getQueryComponent($alias);
$table = $map['table'];
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/Import/Mssql.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function listTableColumns($table)
$val = array_change_key_case($val, CASE_LOWER);

if (strstr($val['type_name'], ' ')) {
list($type, $identity) = explode(' ', $val['type_name']);
[$type, $identity] = explode(' ', $val['type_name']);
} else {
$type = $val['type_name'];
$identity = '';
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ public function parsePdoDsn($dsn)
unset($e2[0]);
$value = implode('=', $e2);
} else {
list($key, $value) = $e2;
[$key, $value] = $e2;
}
$parts[$key] = $value;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/Migration.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ protected function _doMigrateStep($direction, $num)
$changes = array_reverse($changes);
}
foreach ($changes as $value) {
list($type, $change) = $value;
[$type, $change] = $value;
$funcName = 'process'.Doctrine_Inflector::classify($type);
if (method_exists($this->_process, $funcName)) {
try {
Expand Down
6 changes: 3 additions & 3 deletions lib/Doctrine/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ public function parseSubquery($subquery)
public function processPendingSubqueries()
{
foreach ($this->_pendingSubqueries as $value) {
list($dql, $alias) = $value;
[$dql, $alias] = $value;

$subquery = $this->createSubquery();

Expand Down Expand Up @@ -911,7 +911,7 @@ public function processPendingAggregates()
{
// iterate trhough all aggregates
foreach ($this->_pendingAggregates as $aggregate) {
list($expression, $components, $alias) = $aggregate;
[$expression, $components, $alias] = $aggregate;

$tableAliases = [];

Expand Down Expand Up @@ -1594,7 +1594,7 @@ private function _isOrderedByJoinedColumn()
if (false === strpos($part, '.')) {
continue;
}
list($tableAlias, $columnName) = explode('.', $part);
[$tableAlias, $columnName] = explode('.', $part);
if ($tableAlias != $mainTableAlias) {
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions lib/Doctrine/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,7 @@ public function find()

// Check for possible cross-access
if (!is_array($name) && false !== strpos($name, '/')) {
list($ns, $m) = explode('/', $name);
[$ns, $m] = explode('/', $name);
}

// Define query to be used
Expand Down Expand Up @@ -2150,7 +2150,7 @@ public function validateUniques(Doctrine_Record $record)
$validator->invoker = $record;

foreach ($this->_uniques as $unique) {
list($fields, $options) = $unique;
[$fields, $options] = $unique;
$validator->args = $options;
$validator->field = $fields;
$values = [];
Expand Down
2 changes: 1 addition & 1 deletion tests/Ticket/2251TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function testEmptyStringLengthSQLExport()

$conn = Doctrine_Manager::getInstance()->connection($dbh, $driver);

list($sql) = $conn->export->exportSortedClassesSql(['Ticket_2251_TestStringLength'], false);
[$sql] = $conn->export->exportSortedClassesSql(['Ticket_2251_TestStringLength'], false);

$this->assertEqual($sql, $expected[$driver]);

Expand Down
2 changes: 1 addition & 1 deletion tests/Ticket/2334TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function testMSSQLUnsignedInt()

$conn = Doctrine_Manager::getInstance()->connection($dbh, 'mssql');

list($sql) = $conn->export->exportSortedClassesSql(['Ticket_2334_TestMSSQLUnsignedInt'], false);
[$sql] = $conn->export->exportSortedClassesSql(['Ticket_2334_TestMSSQLUnsignedInt'], false);

$this->assertEqual($sql, 'CREATE TABLE test_string_length (id INT NOT NULL identity, test_int BIGINT NULL, PRIMARY KEY([id]))');

Expand Down

0 comments on commit f244334

Please sign in to comment.