✓>');
diff --git a/plugins/GeoIp2/Controller.php b/plugins/GeoIp2/Controller.php
index 9a66c885bbf..e908e9a3bb0 100644
--- a/plugins/GeoIp2/Controller.php
+++ b/plugins/GeoIp2/Controller.php
@@ -150,7 +150,10 @@ public function downloadMissingGeoIpDb()
// download part of the file
$result = Http::downloadChunk(
- $url, $outputPath, Common::getRequestVar('continue', true, 'int'));
+ $url,
+ $outputPath,
+ Common::getRequestVar('continue', true, 'int')
+ );
// if the file is done
if ($result['current_size'] >= $result['expected_file_size']) {
diff --git a/plugins/GeoIp2/GeoIP2AutoUpdater.php b/plugins/GeoIp2/GeoIP2AutoUpdater.php
index b4129c9e11d..e33fc735ca3 100644
--- a/plugins/GeoIp2/GeoIP2AutoUpdater.php
+++ b/plugins/GeoIp2/GeoIP2AutoUpdater.php
@@ -232,8 +232,10 @@ public static function unzipDownloadedFile($path, $dbType, $url, $unlink = false
$content = $unzip->listContent();
if (empty($content)) {
- throw new Exception(Piwik::translate('GeoIp2_CannotListContent',
- array("'$path'", $unzip->errorInfo())));
+ throw new Exception(Piwik::translate(
+ 'GeoIp2_CannotListContent',
+ array("'$path'", $unzip->errorInfo())
+ ));
}
$fileToExtract = null;
@@ -249,16 +251,20 @@ public static function unzipDownloadedFile($path, $dbType, $url, $unlink = false
}
if ($fileToExtract === null) {
- throw new Exception(Piwik::translate('GeoIp2_CannotFindGeoIPDatabaseInArchive',
- array("'$path'")));
+ throw new Exception(Piwik::translate(
+ 'GeoIp2_CannotFindGeoIPDatabaseInArchive',
+ array("'$path'")
+ ));
}
// extract JUST the .dat file
$unzipped = $unzip->extractInString($fileToExtract);
if (empty($unzipped)) {
- throw new Exception(Piwik::translate('GeoIp2_CannotUnzipGeoIPFile',
- array("'$path'", $unzip->errorInfo())));
+ throw new Exception(Piwik::translate(
+ 'GeoIp2_CannotUnzipGeoIPFile',
+ array("'$path'", $unzip->errorInfo())
+ ));
}
$dbFilename = basename($fileToExtract);
@@ -285,8 +291,10 @@ public static function unzipDownloadedFile($path, $dbType, $url, $unlink = false
$success = $unzip->extract($outputPath);
if ($success !== true) {
- throw new Exception(Piwik::translate('General_CannotUnzipFile',
- array("'$path'", $unzip->errorInfo())));
+ throw new Exception(Piwik::translate(
+ 'General_CannotUnzipFile',
+ array("'$path'", $unzip->errorInfo())
+ ));
}
if ($isDbIpUnknownDbType) {
@@ -578,7 +586,8 @@ public static function getMissingDatabases()
// if a database of the type does not exist, but there's a url to update, then
// a database is missing
$path = LocationProviderGeoIp2::getPathToGeoIpDatabase(
- LocationProviderGeoIp2::$dbNames[$key]);
+ LocationProviderGeoIp2::$dbNames[$key]
+ );
if ($path === false) {
$result[] = $key;
}
diff --git a/plugins/GeoIp2/GeoIp2.php b/plugins/GeoIp2/GeoIp2.php
index 273cffeacdd..4eb29a052c1 100644
--- a/plugins/GeoIp2/GeoIp2.php
+++ b/plugins/GeoIp2/GeoIp2.php
@@ -82,7 +82,10 @@ public function getClientSideTranslationKeys(&$translationKeys)
*/
public function installationFormInit(FormDefaultSettings $form)
{
- $form->addElement('checkbox', 'setup_geoip2', null,
+ $form->addElement(
+ 'checkbox',
+ 'setup_geoip2',
+ null,
[
'content' => ' ' . Piwik::translate('GeoIp2_AutomaticSetup')
]
@@ -116,8 +119,11 @@ public function installationFormSubmit(FormDefaultSettings $form)
// otherwise ensure it will be run soonish as scheduled task
if ($cliMulti->supportsAsync()) {
$phpCli = new CliMulti\CliPhp();
- $command = sprintf('%s %s/console core:run-scheduled-tasks --force "Piwik\Plugins\GeoIp2\GeoIP2AutoUpdater.update" > /dev/null 2>&1 &',
- $phpCli->findPhpBinary(), PIWIK_INCLUDE_PATH);
+ $command = sprintf(
+ '%s %s/console core:run-scheduled-tasks --force "Piwik\Plugins\GeoIp2\GeoIP2AutoUpdater.update" > /dev/null 2>&1 &',
+ $phpCli->findPhpBinary(),
+ PIWIK_INCLUDE_PATH
+ );
shell_exec($command);
} else {
/** @var Scheduler $scheduler */
diff --git a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php
index 1841c12cd52..03baef50c1d 100644
--- a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php
+++ b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php
@@ -432,8 +432,10 @@ public function getInfo()
$desc = Piwik::translate('GeoIp2_LocationProviderDesc_Php') . '
';
if (extension_loaded('maxminddb')) {
- $desc .= Piwik::translate('GeoIp2_LocationProviderDesc_Php_WithExtension',
- array('', ''));
+ $desc .= Piwik::translate(
+ 'GeoIp2_LocationProviderDesc_Php_WithExtension',
+ array('', '')
+ );
}
$installDocs = ''
diff --git a/plugins/GeoIp2/LocationProvider/GeoIp2/ServerModule.php b/plugins/GeoIp2/LocationProvider/GeoIp2/ServerModule.php
index 07658e43556..16a7721a95a 100644
--- a/plugins/GeoIp2/LocationProvider/GeoIp2/ServerModule.php
+++ b/plugins/GeoIp2/LocationProvider/GeoIp2/ServerModule.php
@@ -220,8 +220,10 @@ public function getInfo()
. '
'
. Piwik::translate('GeoIp2_GeoIPLocationProviderDesc_ServerBasedAnonWarn')
. '
'
- . Piwik::translate('GeoIp2_LocationProviderDesc_ServerModule2',
- array('', '', '', ''));
+ . Piwik::translate(
+ 'GeoIp2_LocationProviderDesc_ServerModule2',
+ array('', '', '', '')
+ );
$installDocs =
''
diff --git a/plugins/Goals/API.php b/plugins/Goals/API.php
index 6c0c12df7ff..7cc4fb10628 100644
--- a/plugins/Goals/API.php
+++ b/plugins/Goals/API.php
@@ -541,8 +541,10 @@ public function get($idSite, $period, $date, $segment = false, $idGoal = false,
} finally {
\Piwik\Plugin\Archiver::$ARCHIVE_DEPENDENT = $startingArchiveDependent;
}
- $tableSegmented->filter('Piwik\Plugins\Goals\DataTable\Filter\AppendNameToColumnNames',
- array($appendToMetricName));
+ $tableSegmented->filter(
+ 'Piwik\Plugins\Goals\DataTable\Filter\AppendNameToColumnNames',
+ array($appendToMetricName)
+ );
if (!isset($table)) {
$table = $tableSegmented;
@@ -779,11 +781,19 @@ protected function getGoalSpecificDataTable($recordName, $idSite, $period, $date
public function getDaysToConversion($idSite, $period, $date, $segment = false, $idGoal = false)
{
$dataTable = $this->getGoalSpecificDataTable(
- Archiver::DAYS_UNTIL_CONV_RECORD_NAME, $idSite, $period, $date, $segment, $idGoal);
+ Archiver::DAYS_UNTIL_CONV_RECORD_NAME,
+ $idSite,
+ $period,
+ $date,
+ $segment,
+ $idGoal
+ );
$dataTable->queueFilter('Sort', array('label', 'asc', true, false));
$dataTable->queueFilter(
- 'BeautifyRangeLabels', array(Piwik::translate('Intl_OneDay'), Piwik::translate('Intl_NDays')));
+ 'BeautifyRangeLabels',
+ array(Piwik::translate('Intl_OneDay'), Piwik::translate('Intl_NDays'))
+ );
return $dataTable;
}
@@ -804,11 +814,19 @@ public function getDaysToConversion($idSite, $period, $date, $segment = false, $
public function getVisitsUntilConversion($idSite, $period, $date, $segment = false, $idGoal = false)
{
$dataTable = $this->getGoalSpecificDataTable(
- Archiver::VISITS_UNTIL_RECORD_NAME, $idSite, $period, $date, $segment, $idGoal);
+ Archiver::VISITS_UNTIL_RECORD_NAME,
+ $idSite,
+ $period,
+ $date,
+ $segment,
+ $idGoal
+ );
$dataTable->queueFilter('Sort', array('label', 'asc', true, false));
$dataTable->queueFilter(
- 'BeautifyRangeLabels', array(Piwik::translate('General_OneVisit'), Piwik::translate('General_NVisits')));
+ 'BeautifyRangeLabels',
+ array(Piwik::translate('General_OneVisit'), Piwik::translate('General_NVisits'))
+ );
return $dataTable;
}
@@ -830,8 +848,14 @@ protected function enrichItemsTableWithViewMetrics($dataTable, $recordName, $idS
}
// Enrich the datatable with Product/Categories views, and conversion rates
- $customVariables = \Piwik\Plugins\CustomVariables\API::getInstance()->getCustomVariables($idSite, $period, $date, $segment, $expanded = false,
- $_leavePiwikCoreVariables = true);
+ $customVariables = \Piwik\Plugins\CustomVariables\API::getInstance()->getCustomVariables(
+ $idSite,
+ $period,
+ $date,
+ $segment,
+ $expanded = false,
+ $_leavePiwikCoreVariables = true
+ );
$mapping = array(
'Goals_ItemsSku' => '_pks',
'Goals_ItemsName' => '_pkn',