diff --git a/core/CronArchive.php b/core/CronArchive.php
index 0bccc810156..9a4f9576c71 100644
--- a/core/CronArchive.php
+++ b/core/CronArchive.php
@@ -1406,13 +1406,13 @@ private function hasReachedMaxConcurrentArchivers()
foreach ($processes as $process) {
if (strpos($process, ' core:archive') !== false &&
strpos($process, 'console ') !== false &&
- (!$instanceId
- || strpos($process, '--matomo-domain=' . $instanceId) !== false
- || strpos($process, '--matomo-domain="' . $instanceId . '"') !== false
- || strpos($process, '--matomo-domain=\'' . $instanceId . "'") !== false
- || strpos($process, '--piwik-domain=' . $instanceId) !== false
- || strpos($process, '--piwik-domain="' . $instanceId . '"') !== false
- || strpos($process, '--piwik-domain=\'' . $instanceId . "'") !== false)) {
+ (!$instanceId ||
+ strpos($process, '--matomo-domain=' . $instanceId) !== false ||
+ strpos($process, '--matomo-domain="' . $instanceId . '"') !== false ||
+ strpos($process, '--matomo-domain=\'' . $instanceId . "'") !== false ||
+ strpos($process, '--piwik-domain=' . $instanceId) !== false ||
+ strpos($process, '--piwik-domain="' . $instanceId . '"') !== false ||
+ strpos($process, '--piwik-domain=\'' . $instanceId . "'") !== false)) {
$numRunning++;
}
}
diff --git a/core/Nonce.php b/core/Nonce.php
index 28e5d5c308c..f8978e00e59 100644
--- a/core/Nonce.php
+++ b/core/Nonce.php
@@ -137,8 +137,8 @@ public static function verifyNonceWithErrorMessage($id, $cnonce, $allowedReferre
// validate origin
$origin = self::getOrigin();
if (!empty($origin) &&
- ($origin == 'null'
- || !in_array($origin, self::getAcceptableOrigins()))
+ ($origin == 'null' ||
+ !in_array($origin, self::getAcceptableOrigins()))
) {
return Piwik::translate('Login_InvalidNonceOrigin') . $additionalErrors;
}
diff --git a/core/Period/Range.php b/core/Period/Range.php
index a28728c4ef7..1d78277fa7c 100644
--- a/core/Period/Range.php
+++ b/core/Period/Range.php
@@ -379,9 +379,9 @@ protected function processOptimalSubperiods($startDate, $endDate)
$endOfPeriod = $endOfMonth;
} // If end of this week is later than end date, we use days
elseif ($this->isEndOfWeekLaterThanEndDate($endDate, $endOfWeek) &&
- ($endOfWeek->isEarlier($this->today)
- || $startOfWeek->toString() != $startDate->toString()
- || $endDate->isEarlier($this->today))
+ ($endOfWeek->isEarlier($this->today) ||
+ $startOfWeek->toString() != $startDate->toString() ||
+ $endDate->isEarlier($this->today))
) {
$this->fillArraySubPeriods($startDate, $endDate, 'day');
break 1;
diff --git a/core/Plugin/Visualization.php b/core/Plugin/Visualization.php
index dba4cb0f140..034fe63f2ae 100644
--- a/core/Plugin/Visualization.php
+++ b/core/Plugin/Visualization.php
@@ -727,8 +727,8 @@ protected function getClientSideParametersToSet()
if ($this->dataTable &&
// Set doesn't have the method
- !($this->dataTable instanceof DataTable\Map)
- && empty($javascriptVariablesToSet['totalRows'])
+ !($this->dataTable instanceof DataTable\Map) &&
+ empty($javascriptVariablesToSet['totalRows'])
) {
$javascriptVariablesToSet['totalRows'] =
$this->dataTable->getMetadata(DataTable::TOTAL_ROWS_BEFORE_LIMIT_METADATA_NAME) ?: $this->dataTable->getRowsCount();
diff --git a/core/ReportRenderer/Pdf.php b/core/ReportRenderer/Pdf.php
index 84e0612683c..4e52ec8aabc 100644
--- a/core/ReportRenderer/Pdf.php
+++ b/core/ReportRenderer/Pdf.php
@@ -256,9 +256,9 @@ private function paintReportHeader()
$rowCount = $reportHasData ? $this->report->getRowsCount() + self::TABLE_HEADER_ROW_COUNT : self::NO_DATA_ROW_COUNT;
// Only a page break before if the current report has some data
- if ($reportHasData &&
+ if ($reportHasData
// and
- (
+ && (
// it is the first report
$this->currentPage == 0
// or, it is a graph-only report and it is the first of a series of self::MAX_GRAPH_REPORTS
diff --git a/core/Updates/4.0.0-b1.php b/core/Updates/4.0.0-b1.php
index 1f0847d7236..04a1ac7bdd3 100644
--- a/core/Updates/4.0.0-b1.php
+++ b/core/Updates/4.0.0-b1.php
@@ -269,9 +269,9 @@ public static function ensureCorePluginsThatWereMovedToMarketplaceCanBeUpdated()
$pluginDir = Manager::getPluginDirectory($plugin);
if (is_dir($pluginDir) &&
- file_exists($pluginDir . '/' . $plugin . '.php')
- && !file_exists($pluginDir . '/plugin.json')
- && is_writable($pluginDir)) {
+ file_exists($pluginDir . '/' . $plugin . '.php') &&
+ !file_exists($pluginDir . '/plugin.json') &&
+ is_writable($pluginDir)) {
file_put_contents($pluginDir . '/plugin.json', '{
"name": "' . $plugin . '",
"description": "' . $plugin . '",
diff --git a/phpcs.xml b/phpcs.xml
index 5279bc150a7..8938cc73dbd 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -31,7 +31,6 @@
-