Merge pull request #14610 from carusogabriel/null-coalesce-operator
Use Null Coalesce Operator
This commit is contained in:
commit
44273a3fec
@ -47,7 +47,7 @@ class BrowseForeignersTest extends TestCase
|
||||
$method = $class->getMethod($name);
|
||||
$method->setAccessible(true);
|
||||
return $method->invokeArgs(
|
||||
$object !== null ? $object : $this->browseForeigners,
|
||||
$object ?? $this->browseForeigners,
|
||||
$params
|
||||
);
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ class CentralColumnsTest extends TestCase
|
||||
$method = $class->getMethod($name);
|
||||
$method->setAccessible(true);
|
||||
return $method->invokeArgs(
|
||||
$object !== null ? $object : $this->centralColumns,
|
||||
$object ?? $this->centralColumns,
|
||||
$params
|
||||
);
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ class InsertEditTest extends TestCase
|
||||
$method = $class->getMethod($name);
|
||||
$method->setAccessible(true);
|
||||
return $method->invokeArgs(
|
||||
$object !== null ? $object : $this->insertEdit,
|
||||
$object ?? $this->insertEdit,
|
||||
$params
|
||||
);
|
||||
}
|
||||
|
||||
@ -1764,7 +1764,7 @@ class ExportSqlTest extends PmaTestCase
|
||||
$GLOBALS['sql_views_as_tables'] = false;
|
||||
$GLOBALS['sql_include_comments'] = true;
|
||||
$GLOBALS['crlf'] = "\n";
|
||||
$oldVal = isset($GLOBALS['sql_compatibility']) ? $GLOBALS['sql_compatibility'] : '';
|
||||
$oldVal = $GLOBALS['sql_compatibility'] ?? '';
|
||||
$GLOBALS['sql_compatibility'] = 'NONE';
|
||||
$GLOBALS['sql_backquotes'] = true;
|
||||
|
||||
|
||||
@ -1116,7 +1116,7 @@ class RoutinesTest extends TestCase
|
||||
$errors = [];
|
||||
$this->routines->setGlobals();
|
||||
|
||||
$old_dbi = isset($GLOBALS['dbi']) ? $GLOBALS['dbi'] : null;
|
||||
$old_dbi = $GLOBALS['dbi'] ?? null;
|
||||
$dbi = $this->getMockBuilder('PhpMyAdmin\DatabaseInterface')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
@ -2115,7 +2115,7 @@ class UtilTest extends PmaTestCase
|
||||
*/
|
||||
public function testLinkOrButton(array $params, $limit, $match)
|
||||
{
|
||||
$restore = isset($GLOBALS['cfg']['LinkLengthLimit']) ? $GLOBALS['cfg']['LinkLengthLimit'] : 1000;
|
||||
$restore = $GLOBALS['cfg']['LinkLengthLimit'] ?? 1000;
|
||||
$GLOBALS['cfg']['LinkLengthLimit'] = $limit;
|
||||
try {
|
||||
$result = call_user_func_array(
|
||||
|
||||
@ -47,7 +47,7 @@ class HttpRequestTest extends PmaTestCase
|
||||
$method = $class->getMethod($name);
|
||||
$method->setAccessible(true);
|
||||
return $method->invokeArgs(
|
||||
$object !== null ? $object : $this->httpRequest,
|
||||
$object ?? $this->httpRequest,
|
||||
$params
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user