diff --git a/index.php b/index.php
index 87c77d2f74..a5a8ea20fa 100644
--- a/index.php
+++ b/index.php
@@ -49,7 +49,7 @@ if ($routeInfo[0] === Dispatcher::NOT_FOUND) {
$response->setHttpResponseCode(404);
Message::error(sprintf(
__('Error 404! The page %s was not found.'),
- '' . ($route) . ''
+ '' . $route . ''
))->display();
} elseif ($routeInfo[0] === Dispatcher::METHOD_NOT_ALLOWED) {
/** @var Response $response */
diff --git a/libraries/classes/Config.php b/libraries/classes/Config.php
index 67d78d27fc..ac632ae68e 100644
--- a/libraries/classes/Config.php
+++ b/libraries/classes/Config.php
@@ -1530,7 +1530,7 @@ class Config
*/
public function getCookieName(string $cookieName): string
{
- return $cookieName . ( ($this->isHttps()) ? '_https' : '' );
+ return $cookieName . ( $this->isHttps() ? '_https' : '' );
}
/**
diff --git a/libraries/classes/Console.php b/libraries/classes/Console.php
index edc4c81d07..02ab28cad4 100644
--- a/libraries/classes/Console.php
+++ b/libraries/classes/Console.php
@@ -132,7 +132,7 @@ class Console
*/
public function getDisplay(): string
{
- if ((! $this->_isAjax) && $this->_isEnabled) {
+ if (! $this->_isAjax && $this->_isEnabled) {
$cfgBookmark = Bookmark::getParams(
$GLOBALS['cfg']['Server']['user']
);
diff --git a/libraries/classes/Controllers/ErrorReportController.php b/libraries/classes/Controllers/ErrorReportController.php
index 892194c803..a84bda8e24 100644
--- a/libraries/classes/Controllers/ErrorReportController.php
+++ b/libraries/classes/Controllers/ErrorReportController.php
@@ -81,7 +81,7 @@ class ErrorReportController extends AbstractController
$_SESSION['prev_error_subm_time'] = time();
$_SESSION['error_subm_count'] = (
isset($_SESSION['error_subm_count'])
- ? ($_SESSION['error_subm_count'] + 1)
+ ? $_SESSION['error_subm_count'] + 1
: 0
);
}
diff --git a/libraries/classes/Controllers/GisDataEditorController.php b/libraries/classes/Controllers/GisDataEditorController.php
index d96d695f9a..c8f5b8c7ef 100644
--- a/libraries/classes/Controllers/GisDataEditorController.php
+++ b/libraries/classes/Controllers/GisDataEditorController.php
@@ -52,7 +52,7 @@ class GisDataEditorController extends AbstractController
$gis_data['gis_type'] = mb_strtoupper($_POST['type']);
}
if (isset($_POST['value']) && trim($_POST['value']) != '') {
- $start = (substr($_POST['value'], 0, 1) == "'") ? 1 : 0;
+ $start = substr($_POST['value'], 0, 1) == "'" ? 1 : 0;
$gis_data['gis_type'] = mb_substr(
$_POST['value'],
$start,
@@ -77,7 +77,7 @@ class GisDataEditorController extends AbstractController
}
// Generate Well Known Text
- $srid = (isset($gis_data['srid']) && $gis_data['srid'] != '') ? $gis_data['srid'] : 0;
+ $srid = isset($gis_data['srid']) && $gis_data['srid'] != '' ? $gis_data['srid'] : 0;
$wkt = $gis_obj->generateWkt($gis_data, 0);
$wkt_with_zero = $gis_obj->generateWkt($gis_data, 0, '0');
$result = "'" . $wkt . "'," . $srid;
diff --git a/libraries/classes/Controllers/ImportStatusController.php b/libraries/classes/Controllers/ImportStatusController.php
index d97acb9988..f07d7692a9 100644
--- a/libraries/classes/Controllers/ImportStatusController.php
+++ b/libraries/classes/Controllers/ImportStatusController.php
@@ -62,7 +62,7 @@ class ImportStatusController
// reopen session
session_start();
- if ((time() - $timestamp) > $maximumTime) {
+ if (time() - $timestamp > $maximumTime) {
$_SESSION['Import_message']['message'] = Message::error(
__('Could not load the progress of the import.')
)->getDisplay();
diff --git a/libraries/classes/Controllers/Server/Status/VariablesController.php b/libraries/classes/Controllers/Server/Status/VariablesController.php
index f2e56ac79e..8328a182e8 100644
--- a/libraries/classes/Controllers/Server/Status/VariablesController.php
+++ b/libraries/classes/Controllers/Server/Status/VariablesController.php
@@ -178,11 +178,11 @@ class VariablesController extends AbstractController
// depends on Key_read_requests
// normally lower then 1:0.01
'Key_reads' => isset($this->data->status['Key_read_requests'])
- ? (0.01 * $this->data->status['Key_read_requests']) : 0,
+ ? 0.01 * $this->data->status['Key_read_requests'] : 0,
// depends on Key_write_requests
// normally nearly 1:1
'Key_writes' => isset($this->data->status['Key_write_requests'])
- ? (0.9 * $this->data->status['Key_write_requests']) : 0,
+ ? 0.9 * $this->data->status['Key_write_requests'] : 0,
'Key_buffer_fraction' => 0.5,
diff --git a/libraries/classes/Database/Designer/Common.php b/libraries/classes/Database/Designer/Common.php
index 85b03c9112..c90af35d38 100644
--- a/libraries/classes/Database/Designer/Common.php
+++ b/libraries/classes/Database/Designer/Common.php
@@ -55,7 +55,7 @@ class Common
public function getTablesInfo(string $db = null, string $table = null): array
{
$designerTables = [];
- $db = ($db === null) ? $GLOBALS['db'] : $db;
+ $db = $db === null ? $GLOBALS['db'] : $db;
// seems to be needed later
$this->dbi->selectDb($db);
if ($db === null && $table === null) {
@@ -67,7 +67,7 @@ class Common
foreach ($tables as $one_table) {
$DF = $this->relation->getDisplayField($db, $one_table['TABLE_NAME']);
$DF = is_string($DF) ? $DF : '';
- $DF = ($DF !== '') ? $DF : null;
+ $DF = $DF !== '' ? $DF : null;
$designerTables[] = new DesignerTable(
$db,
$one_table['TABLE_NAME'],
@@ -313,7 +313,7 @@ class Common
DatabaseInterface::CONNECT_CONTROL,
DatabaseInterface::QUERY_STORE
);
- return ( is_array($page_name) && isset($page_name[0]) ) ? $page_name[0] : null;
+ return is_array($page_name) && isset($page_name[0]) ? $page_name[0] : null;
}
/**
diff --git a/libraries/classes/Database/Search.php b/libraries/classes/Database/Search.php
index cebc492e14..072959d285 100644
--- a/libraries/classes/Database/Search.php
+++ b/libraries/classes/Database/Search.php
@@ -227,8 +227,8 @@ class Search
$allColumns = $this->dbi->getColumns($GLOBALS['db'], $table);
$likeClauses = [];
// Based on search type, decide like/regex & '%'/''
- $like_or_regex = (($this->criteriaSearchType == 5) ? 'REGEXP' : 'LIKE');
- $automatic_wildcard = (($this->criteriaSearchType < 4) ? '%' : '');
+ $like_or_regex = ($this->criteriaSearchType == 5 ? 'REGEXP' : 'LIKE');
+ $automatic_wildcard = ($this->criteriaSearchType < 4 ? '%' : '');
// For "as regular expression" (search option 5), LIKE won't be used
// Usage example: If user is searching for a literal $ in a regexp search,
// they should enter \$ as the value.
@@ -236,9 +236,9 @@ class Search
$this->criteriaSearchString
);
// Extract search words or pattern
- $search_words = (($this->criteriaSearchType > 2)
+ $search_words = $this->criteriaSearchType > 2
? [$criteriaSearchStringEscaped]
- : explode(' ', $criteriaSearchStringEscaped));
+ : explode(' ', $criteriaSearchStringEscaped);
foreach ($search_words as $search_word) {
// Eliminates empty values
diff --git a/libraries/classes/DatabaseInterface.php b/libraries/classes/DatabaseInterface.php
index 720bd2642b..3404cce537 100644
--- a/libraries/classes/DatabaseInterface.php
+++ b/libraries/classes/DatabaseInterface.php
@@ -1685,7 +1685,7 @@ class DatabaseInterface implements DbalInterface
// return false if result is empty or false
// or requested row is larger than rows in result
- if ($this->numRows($result) < ($row_number + 1)) {
+ if ($this->numRows($result) < $row_number + 1) {
return $value;
}
diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php
index 0c07a6d0be..1cbc5c961f 100644
--- a/libraries/classes/Display/Results.php
+++ b/libraries/classes/Display/Results.php
@@ -1009,10 +1009,10 @@ class Results
$buttons_html .= $this->_getTableNavigationButton(
'>>',
_pgettext('Last page', 'End'),
- @((ceil(
+ @(ceil(
$this->__get('unlim_num_rows')
/ $_SESSION['tmpval']['max_rows']
- ) - 1) * $maxRows),
+ ) - 1) * $maxRows,
$html_sql_query,
false,
$onsubmit,
@@ -2491,7 +2491,7 @@ class Results
while ($row = $GLOBALS['dbi']->fetchRow($dt_result)) {
// add repeating headers
if (($row_no != 0) && ($_SESSION['tmpval']['repeat_cells'] != 0)
- && ! ($row_no % $_SESSION['tmpval']['repeat_cells'])
+ && ! $row_no % $_SESSION['tmpval']['repeat_cells']
) {
$table_body_html .= $this->_getRepeatingHeaders(
$display_params
diff --git a/libraries/classes/Export.php b/libraries/classes/Export.php
index 6424f373f6..2832bf0f96 100644
--- a/libraries/classes/Export.php
+++ b/libraries/classes/Export.php
@@ -731,7 +731,7 @@ class Export
$size = $this->dbi->fetchValue($query);
//Converting the size to MB
- $size = ($size / 1024) / 1024;
+ $size = $size / 1024 / 1024;
if ($size > $table_size) {
continue;
}
diff --git a/libraries/classes/Font.php b/libraries/classes/Font.php
index 169a265e24..052922a778 100644
--- a/libraries/classes/Font.php
+++ b/libraries/classes/Font.php
@@ -194,14 +194,14 @@ class Font
$count = 0;
foreach ($charLists as $charList) {
- $count += ((mb_strlen($text)
+ $count += (mb_strlen($text)
- mb_strlen(str_replace($charList['chars'], '', $text))
- ) * $charList['modifier']);
+ ) * $charList['modifier'];
}
$text = str_replace(' ', '', $text);//remove the " "'s
//all other chars
- $count += (mb_strlen(preg_replace('/[a-z0-9]/i', '', $text)) * 0.3);
+ $count += mb_strlen(preg_replace('/[a-z0-9]/i', '', $text)) * 0.3;
$modifier = 1;
$font = mb_strtolower($font);
diff --git a/libraries/classes/Gis/GisLineString.php b/libraries/classes/Gis/GisLineString.php
index 5ca2df997e..ac5acc2858 100644
--- a/libraries/classes/Gis/GisLineString.php
+++ b/libraries/classes/Gis/GisLineString.php
@@ -296,11 +296,11 @@ class GisLineString extends GisGeometry
}
$wkt = 'LINESTRING(';
for ($i = 0; $i < $no_of_points; $i++) {
- $wkt .= ((isset($gis_data[$index]['LINESTRING'][$i]['x'])
- && trim((string) $gis_data[$index]['LINESTRING'][$i]['x']) != '')
+ $wkt .= (isset($gis_data[$index]['LINESTRING'][$i]['x'])
+ && trim((string) $gis_data[$index]['LINESTRING'][$i]['x']) != ''
? $gis_data[$index]['LINESTRING'][$i]['x'] : $empty)
- . ' ' . ((isset($gis_data[$index]['LINESTRING'][$i]['y'])
- && trim((string) $gis_data[$index]['LINESTRING'][$i]['y']) != '')
+ . ' ' . (isset($gis_data[$index]['LINESTRING'][$i]['y'])
+ && trim((string) $gis_data[$index]['LINESTRING'][$i]['y']) != ''
? $gis_data[$index]['LINESTRING'][$i]['y'] : $empty) . ',';
}
diff --git a/libraries/classes/Gis/GisMultiLineString.php b/libraries/classes/Gis/GisMultiLineString.php
index 40ff2ee18e..9135bb2935 100644
--- a/libraries/classes/Gis/GisMultiLineString.php
+++ b/libraries/classes/Gis/GisMultiLineString.php
@@ -335,11 +335,11 @@ class GisMultiLineString extends GisGeometry
}
$wkt .= '(';
for ($j = 0; $j < $no_of_points; $j++) {
- $wkt .= ((isset($data_row[$i][$j]['x'])
- && trim((string) $data_row[$i][$j]['x']) != '')
+ $wkt .= (isset($data_row[$i][$j]['x'])
+ && trim((string) $data_row[$i][$j]['x']) != ''
? $data_row[$i][$j]['x'] : $empty)
- . ' ' . ((isset($data_row[$i][$j]['y'])
- && trim((string) $data_row[$i][$j]['y']) != '')
+ . ' ' . (isset($data_row[$i][$j]['y'])
+ && trim((string) $data_row[$i][$j]['y']) != ''
? $data_row[$i][$j]['y'] : $empty) . ',';
}
$wkt
diff --git a/libraries/classes/Gis/GisMultiPoint.php b/libraries/classes/Gis/GisMultiPoint.php
index 6f759b8dd0..73c9870646 100644
--- a/libraries/classes/Gis/GisMultiPoint.php
+++ b/libraries/classes/Gis/GisMultiPoint.php
@@ -297,11 +297,11 @@ class GisMultiPoint extends GisGeometry
}
$wkt = 'MULTIPOINT(';
for ($i = 0; $i < $no_of_points; $i++) {
- $wkt .= ((isset($gis_data[$index]['MULTIPOINT'][$i]['x'])
- && trim((string) $gis_data[$index]['MULTIPOINT'][$i]['x']) != '')
+ $wkt .= (isset($gis_data[$index]['MULTIPOINT'][$i]['x'])
+ && trim((string) $gis_data[$index]['MULTIPOINT'][$i]['x']) != ''
? $gis_data[$index]['MULTIPOINT'][$i]['x'] : '')
- . ' ' . ((isset($gis_data[$index]['MULTIPOINT'][$i]['y'])
- && trim((string) $gis_data[$index]['MULTIPOINT'][$i]['y']) != '')
+ . ' ' . (isset($gis_data[$index]['MULTIPOINT'][$i]['y'])
+ && trim((string) $gis_data[$index]['MULTIPOINT'][$i]['y']) != ''
? $gis_data[$index]['MULTIPOINT'][$i]['y'] : '') . ',';
}
diff --git a/libraries/classes/Gis/GisMultiPolygon.php b/libraries/classes/Gis/GisMultiPolygon.php
index c432367a55..416a889030 100644
--- a/libraries/classes/Gis/GisMultiPolygon.php
+++ b/libraries/classes/Gis/GisMultiPolygon.php
@@ -406,11 +406,11 @@ class GisMultiPolygon extends GisGeometry
}
$wkt .= '(';
for ($j = 0; $j < $no_of_points; $j++) {
- $wkt .= ((isset($data_row[$k][$i][$j]['x'])
- && trim((string) $data_row[$k][$i][$j]['x']) != '')
+ $wkt .= (isset($data_row[$k][$i][$j]['x'])
+ && trim((string) $data_row[$k][$i][$j]['x']) != ''
? $data_row[$k][$i][$j]['x'] : $empty)
- . ' ' . ((isset($data_row[$k][$i][$j]['y'])
- && trim((string) $data_row[$k][$i][$j]['y']) != '')
+ . ' ' . (isset($data_row[$k][$i][$j]['y'])
+ && trim((string) $data_row[$k][$i][$j]['y']) != ''
? $data_row[$k][$i][$j]['y'] : $empty) . ',';
}
$wkt
diff --git a/libraries/classes/Gis/GisPoint.php b/libraries/classes/Gis/GisPoint.php
index ce9966cd1a..9066143fcd 100644
--- a/libraries/classes/Gis/GisPoint.php
+++ b/libraries/classes/Gis/GisPoint.php
@@ -300,12 +300,12 @@ class GisPoint extends GisGeometry
public function generateWkt(array $gis_data, $index, $empty = '')
{
return 'POINT('
- . ((isset($gis_data[$index]['POINT']['x'])
- && trim((string) $gis_data[$index]['POINT']['x']) != '')
+ . (isset($gis_data[$index]['POINT']['x'])
+ && trim((string) $gis_data[$index]['POINT']['x']) != ''
? $gis_data[$index]['POINT']['x'] : '')
. ' '
- . ((isset($gis_data[$index]['POINT']['y'])
- && trim((string) $gis_data[$index]['POINT']['y']) != '')
+ . (isset($gis_data[$index]['POINT']['y'])
+ && trim((string) $gis_data[$index]['POINT']['y']) != ''
? $gis_data[$index]['POINT']['y'] : '') . ')';
}
diff --git a/libraries/classes/Gis/GisPolygon.php b/libraries/classes/Gis/GisPolygon.php
index 42c3412cb9..c8d8b88ae2 100644
--- a/libraries/classes/Gis/GisPolygon.php
+++ b/libraries/classes/Gis/GisPolygon.php
@@ -357,11 +357,11 @@ class GisPolygon extends GisGeometry
}
$wkt .= '(';
for ($j = 0; $j < $no_of_points; $j++) {
- $wkt .= ((isset($gis_data[$index]['POLYGON'][$i][$j]['x'])
- && trim((string) $gis_data[$index]['POLYGON'][$i][$j]['x']) != '')
+ $wkt .= (isset($gis_data[$index]['POLYGON'][$i][$j]['x'])
+ && trim((string) $gis_data[$index]['POLYGON'][$i][$j]['x']) != ''
? $gis_data[$index]['POLYGON'][$i][$j]['x'] : $empty)
- . ' ' . ((isset($gis_data[$index]['POLYGON'][$i][$j]['y'])
- && trim((string) $gis_data[$index]['POLYGON'][$i][$j]['y']) != '')
+ . ' ' . (isset($gis_data[$index]['POLYGON'][$i][$j]['y'])
+ && trim((string) $gis_data[$index]['POLYGON'][$i][$j]['y']) != ''
? $gis_data[$index]['POLYGON'][$i][$j]['y'] : $empty) . ',';
}
$wkt
diff --git a/libraries/classes/Gis/GisVisualization.php b/libraries/classes/Gis/GisVisualization.php
index 943d8aba9f..c5e8c0987a 100644
--- a/libraries/classes/Gis/GisVisualization.php
+++ b/libraries/classes/Gis/GisVisualization.php
@@ -341,7 +341,7 @@ class GisVisualization
{
$img = $this->_svg();
$this->_toFile($file_name, 'image/svg+xml', 'svg');
- echo($img);
+ echo$img;
}
/**
@@ -606,9 +606,9 @@ class GisVisualization
// scale the visualization
$x_ratio = ($min_max['maxX'] - $min_max['minX']) / $plot_width;
$y_ratio = ($min_max['maxY'] - $min_max['minY']) / $plot_height;
- $ratio = ($x_ratio > $y_ratio) ? $x_ratio : $y_ratio;
+ $ratio = $x_ratio > $y_ratio ? $x_ratio : $y_ratio;
- $scale = ($ratio != 0) ? (1 / $ratio) : 1;
+ $scale = $ratio != 0 ? 1 / $ratio : 1;
if ($x_ratio < $y_ratio) {
// center horizontally
diff --git a/libraries/classes/Html/Forms/Fields/DropDownUploadFileBlock.php b/libraries/classes/Html/Forms/Fields/DropDownUploadFileBlock.php
index adfaa24b8e..2c46c1155c 100644
--- a/libraries/classes/Html/Forms/Fields/DropDownUploadFileBlock.php
+++ b/libraries/classes/Html/Forms/Fields/DropDownUploadFileBlock.php
@@ -54,7 +54,7 @@ class DropDownUploadFileBlock implements FieldGenerator
$matcher = '@\.(' . $extensions . ')(\.('
. $fileListing->supportedDecompressions() . '))?$@';
- $active = (isset($GLOBALS['timeout_passed'], $GLOBALS['local_import_file']) && $GLOBALS['timeout_passed'])
+ $active = isset($GLOBALS['timeout_passed'], $GLOBALS['local_import_file']) && $GLOBALS['timeout_passed']
? $GLOBALS['local_import_file']
: '';
diff --git a/libraries/classes/Html/Generator.php b/libraries/classes/Html/Generator.php
index 0de5fd7d2b..0423dc271d 100644
--- a/libraries/classes/Html/Generator.php
+++ b/libraries/classes/Html/Generator.php
@@ -324,7 +324,7 @@ class Generator
'div_for_slider_effect',
[
'id' => $id,
- 'initial_sliders_state' => ($overrideDefault != null) ? $overrideDefault
+ 'initial_sliders_state' => $overrideDefault != null ? $overrideDefault
: $GLOBALS['cfg']['InitialSlidersState'],
'message' => $message,
]
@@ -658,7 +658,7 @@ class Generator
$pos = $_SESSION['tmpval']['pos'];
} else {
$number_of_line = (int) $_REQUEST['unlim_num_rows'];
- $pos = ((ceil($number_of_line / $rows) - 1) * $rows);
+ $pos = (ceil($number_of_line / $rows) - 1) * $rows;
$_SESSION['tmpval']['pos'] = $pos;
}
diff --git a/libraries/classes/Import.php b/libraries/classes/Import.php
index 976494be8e..5342ae8e5a 100644
--- a/libraries/classes/Import.php
+++ b/libraries/classes/Import.php
@@ -67,7 +67,7 @@ class Import
} elseif ($timeout_passed) {
return true;
/* 5 in next row might be too much */
- } elseif ((time() - $timestamp) > ($maximum_time - 5)) {
+ } elseif (time() - $timestamp > $maximum_time - 5) {
$timeout_passed = true;
return true;
}
@@ -472,10 +472,10 @@ class Import
if ($num == 0) {
// use 'Z' if column number is 0,
// this is necessary because A-Z has no 'zero'
- $col_name .= mb_chr(($A + 26) - 1);
+ $col_name .= mb_chr($A + 26 - 1);
} else {
// convert column number to ASCII character
- $col_name .= mb_chr(($A + $num) - 1);
+ $col_name .= mb_chr($A + $num - 1);
}
return $col_name;
@@ -506,7 +506,7 @@ class Import
$column_number = 0;
for ($i = 0; $i < $num_chars; ++$i) {
// read string from back to front
- $char_pos = ($num_chars - 1) - $i;
+ $char_pos = $num_chars - 1 - $i;
// convert capital character to ASCII value
// and subtract 64 to get corresponding decimal value
@@ -570,7 +570,7 @@ class Import
{
$curr_size = mb_strlen($cell);
$decPos = mb_strpos($cell, '.');
- $decPrecision = ($curr_size - 1) - $decPos;
+ $decPrecision = $curr_size - 1 - $decPos;
$m = $curr_size - 1;
$d = $decPrecision;
@@ -686,8 +686,8 @@ class Import
/* New val if M or D is greater than current largest */
if ($size[self::M] > $oldM || $size[self::D] > $oldD) {
/* Take the largest of both types */
- return (string) ((($size[self::M] > $oldM) ? $size[self::M] : $oldM)
- . ',' . (($size[self::D] > $oldD) ? $size[self::D] : $oldD));
+ return (string) (($size[self::M] > $oldM ? $size[self::M] : $oldM)
+ . ',' . ($size[self::D] > $oldD ? $size[self::D] : $oldD));
}
return $last_cumulative_size;
@@ -1080,7 +1080,7 @@ class Import
$tempSQLStr .= '(' . $size . ')';
}
- if ($j != (count($tables[$i][self::COL_NAMES]) - 1)) {
+ if ($j != count($tables[$i][self::COL_NAMES]) - 1) {
$tempSQLStr .= ', ';
}
}
@@ -1114,7 +1114,7 @@ class Import
for ($m = 0; $m < $num_cols; ++$m) {
$tempSQLStr .= Util::backquote($tables[$i][self::COL_NAMES][$m]);
- if ($m != ($num_cols - 1)) {
+ if ($m != $num_cols - 1) {
$tempSQLStr .= ', ';
}
}
@@ -1151,11 +1151,11 @@ class Import
$tempSQLStr .= $is_varchar ? "'" : '';
}
- if ($k != ($num_cols - 1)) {
+ if ($k != $num_cols - 1) {
$tempSQLStr .= ', ';
}
- if ($col_count == ($num_cols - 1)) {
+ if ($col_count == $num_cols - 1) {
$col_count = 0;
} else {
$col_count++;
@@ -1167,7 +1167,7 @@ class Import
$tempSQLStr .= ')';
- if ($j != ($num_rows - 1)) {
+ if ($j != $num_rows - 1) {
$tempSQLStr .= ",\n ";
}
diff --git a/libraries/classes/IpAllowDeny.php b/libraries/classes/IpAllowDeny.php
index 9fa4326e3f..046c97265b 100644
--- a/libraries/classes/IpAllowDeny.php
+++ b/libraries/classes/IpAllowDeny.php
@@ -199,7 +199,7 @@ class IpAllowDeny
$origval = hexdec($orig);
// OR it with (2^flexbits)-1, with flexbits limited to 4 at a time
- $newval = $origval | (pow(2, min(4, $flexbits)) - 1);
+ $newval = $origval | pow(2, min(4, $flexbits)) - 1;
// Convert it back to a hexadecimal character
$new = dechex($newval);
diff --git a/libraries/classes/Linter.php b/libraries/classes/Linter.php
index 34247ced5b..2694978ea4 100644
--- a/libraries/classes/Linter.php
+++ b/libraries/classes/Linter.php
@@ -51,7 +51,7 @@ class Linter
// first byte of the third character. The fourth and the last one
// (which is actually a new line) aren't going to be processed at
// all.
- $len = ($str instanceof UtfString) ?
+ $len = $str instanceof UtfString ?
$str->length() : strlen($str);
$lines = [0];
diff --git a/libraries/classes/Operations.php b/libraries/classes/Operations.php
index cdbef41137..ee51dc823f 100644
--- a/libraries/classes/Operations.php
+++ b/libraries/classes/Operations.php
@@ -1321,7 +1321,7 @@ class Operations
* old versions of MySQL/MariaDB must be returning something or not empty.
* This patch is to support newer MySQL/MariaDB while also for backward compatibilities.
*/
- if (( ('Barracuda' == $innodb_file_format) || ($innodb_file_format == '') )
+ if (('Barracuda' == $innodb_file_format) || ($innodb_file_format == '')
&& $innodbEnginePlugin->supportsFilePerTable()
) {
$possible_row_formats['INNODB']['DYNAMIC'] = 'DYNAMIC';
diff --git a/libraries/classes/Plugins/Export/ExportHtmlword.php b/libraries/classes/Plugins/Export/ExportHtmlword.php
index d3e77f8cb7..7f8ec71ec9 100644
--- a/libraries/classes/Plugins/Export/ExportHtmlword.php
+++ b/libraries/classes/Plugins/Export/ExportHtmlword.php
@@ -653,7 +653,7 @@ class ExportHtmlword extends ExportPlugin
. htmlspecialchars($col_alias) . $fmt_post . '';
$definition .= '