Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-10-08 09:31:49 +0400
committermattab <matthieu.aubry@gmail.com>2013-10-08 09:31:49 +0400
commit84eba85074891bfa6a718ae413a1d87ced4f28ca (patch)
tree6df358670aba14da2883dd68434b326edc6a50fe
parent1fa8da9b963e99e08c829fe6491e8ccf2d1054e2 (diff)
Applying phpstorm code style PSR refs #3771
-rw-r--r--plugins/API/API.php4
-rw-r--r--plugins/API/RowEvolution.php14
-rw-r--r--plugins/Actions/API.php22
-rw-r--r--plugins/Actions/Actions.php16
-rw-r--r--plugins/Actions/ArchivingHelper.php2
-rwxr-xr-xplugins/Annotations/API.php4
-rwxr-xr-xplugins/Annotations/AnnotationList.php2
-rwxr-xr-xplugins/Annotations/Controller.php1
-rw-r--r--plugins/AnonymizeIP/AnonymizeIP.php2
-rw-r--r--plugins/CoreAdminHome/Controller.php3
-rw-r--r--plugins/CoreConsole/GenerateApi.php14
-rw-r--r--plugins/CoreConsole/GenerateController.php14
-rw-r--r--plugins/CoreConsole/GeneratePlugin.php34
-rw-r--r--plugins/CoreConsole/GeneratePluginBase.php2
-rw-r--r--plugins/CoreConsole/RunTests.php6
-rw-r--r--plugins/CoreConsole/templates/controller/Controller.php1
-rw-r--r--plugins/CoreHome/CoreHome.php8
-rw-r--r--plugins/CorePluginsAdmin/Controller.php62
-rw-r--r--plugins/CorePluginsAdmin/CorePluginsAdmin.php12
-rw-r--r--plugins/CorePluginsAdmin/Marketplace.php9
-rw-r--r--plugins/CorePluginsAdmin/MarketplaceApiClient.php16
-rw-r--r--plugins/CorePluginsAdmin/PluginInstaller.php14
-rw-r--r--plugins/CoreVisualizations/CoreVisualizations.php8
-rw-r--r--plugins/CoreVisualizations/JqplotDataGenerator.php4
-rw-r--r--plugins/CoreVisualizations/JqplotDataGenerator/Chart.php8
-rw-r--r--plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php14
-rw-r--r--plugins/CoreVisualizations/Visualizations/Cloud.php12
-rw-r--r--plugins/CoreVisualizations/Visualizations/HtmlTable.php88
-rw-r--r--plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php2
-rw-r--r--plugins/CoreVisualizations/Visualizations/HtmlTable/Goals.php2
-rw-r--r--plugins/CoreVisualizations/Visualizations/JqplotGraph.php44
-rw-r--r--plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php4
-rw-r--r--plugins/CoreVisualizations/Visualizations/JqplotGraph/Pie.php2
-rw-r--r--plugins/CustomVariables/API.php8
-rw-r--r--plugins/CustomVariables/Archiver.php4
-rw-r--r--plugins/DBStats/DBStats.php10
-rw-r--r--plugins/DevicesDetection/DevicesDetection.php24
-rw-r--r--plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php218
-rw-r--r--plugins/DevicesDetection/functions.php13
-rw-r--r--plugins/ExamplePlugin/config/local.config.php16
-rw-r--r--plugins/ExampleUI/API.php4
-rw-r--r--plugins/ExampleUI/Controller.php12
-rw-r--r--plugins/ExampleUI/CustomDataTable.php10
-rw-r--r--plugins/Goals/Goals.php24
-rw-r--r--plugins/ImageGraph/API.php2
-rw-r--r--plugins/ImageGraph/ImageGraph.php2
-rw-r--r--plugins/ImageGraph/StaticGraph.php2
-rw-r--r--plugins/ImageGraph/StaticGraph/Evolution.php1
-rw-r--r--plugins/ImageGraph/StaticGraph/HorizontalBar.php17
-rw-r--r--plugins/ImageGraph/StaticGraph/Pie.php1
-rw-r--r--plugins/ImageGraph/StaticGraph/VerticalBar.php1
-rw-r--r--plugins/Installation/Controller.php4
-rw-r--r--plugins/Installation/FormDatabaseSetup.php4
-rw-r--r--plugins/Installation/FormFirstWebsiteSetup.php1
-rw-r--r--plugins/Installation/Installation.php2
-rw-r--r--plugins/LanguagesManager/API.php20
-rw-r--r--plugins/LanguagesManager/LanguagesManager.php2
-rw-r--r--plugins/Live/API.php42
-rw-r--r--plugins/Live/Controller.php60
-rw-r--r--plugins/Live/Live.php6
-rw-r--r--plugins/Login/Controller.php10
-rw-r--r--plugins/Login/Login.php8
-rw-r--r--plugins/MobileMessaging/API.php5
-rw-r--r--plugins/MobileMessaging/MobileMessaging.php6
-rw-r--r--plugins/MobileMessaging/ReportRenderer/Sms.php32
-rwxr-xr-xplugins/MultiSites/API.php4
-rw-r--r--plugins/MultiSites/MultiSites.php1
-rw-r--r--plugins/Overlay/Controller.php10
-rwxr-xr-xplugins/PrivacyManager/LogDataPurger.php2
-rw-r--r--plugins/PrivacyManager/PrivacyManager.php2
-rwxr-xr-xplugins/PrivacyManager/ReportsPurger.php2
-rw-r--r--plugins/Provider/Provider.php2
-rw-r--r--plugins/Provider/functions.php8
-rw-r--r--plugins/Referrers/API.php6
-rw-r--r--plugins/Referrers/Archiver.php34
-rw-r--r--plugins/Referrers/Controller.php4
-rw-r--r--plugins/Referrers/Referrers.php78
-rw-r--r--plugins/SEO/RankChecker.php2
-rw-r--r--plugins/ScheduledReports/ScheduledReports.php40
-rw-r--r--plugins/SegmentEditor/API.php18
-rw-r--r--plugins/SegmentEditor/SegmentEditor.php1
-rw-r--r--plugins/SitesManager/API.php24
-rw-r--r--plugins/UserCountry/API.php10
-rw-r--r--plugins/UserCountry/Controller.php4
-rwxr-xr-xplugins/UserCountry/GeoIPAutoUpdater.php4
-rwxr-xr-xplugins/UserCountry/LocationProvider/GeoIp.php4
-rwxr-xr-xplugins/UserCountry/LocationProvider/GeoIp/Pecl.php8
-rwxr-xr-xplugins/UserCountry/LocationProvider/GeoIp/ServerBased.php10
-rw-r--r--plugins/UserCountry/UserCountry.php24
-rw-r--r--plugins/UserCountryMap/Controller.php52
-rw-r--r--plugins/UserSettings/UserSettings.php116
-rw-r--r--plugins/UserSettings/functions.php6
-rw-r--r--plugins/UsersManager/API.php8
-rw-r--r--plugins/VisitFrequency/API.php8
-rw-r--r--plugins/VisitTime/API.php8
-rw-r--r--plugins/VisitTime/VisitTime.php68
-rw-r--r--plugins/VisitorInterest/VisitorInterest.php46
-rw-r--r--plugins/VisitsSummary/API.php2
98 files changed, 828 insertions, 809 deletions
diff --git a/plugins/API/API.php b/plugins/API/API.php
index 4fb8ee1ec0..e571d71ab0 100644
--- a/plugins/API/API.php
+++ b/plugins/API/API.php
@@ -156,7 +156,9 @@ class API
'segment' => 'visitorType',
'acceptedValues' => 'new, returning, returningCustomer' . ". " . Piwik_Translate('General_VisitTypeExample', '"&segment=visitorType==returning,visitorType==returningCustomer"'),
'sqlSegment' => 'log_visit.visitor_returning',
- 'sqlFilter' => function($type) { return $type == "new" ? 0 : ($type == "returning" ? 1 : 2); }
+ 'sqlFilter' => function ($type) {
+ return $type == "new" ? 0 : ($type == "returning" ? 1 : 2);
+ }
);
$segments[] = array(
'type' => 'metric',
diff --git a/plugins/API/RowEvolution.php b/plugins/API/RowEvolution.php
index acd1254acc..67070f4f7a 100644
--- a/plugins/API/RowEvolution.php
+++ b/plugins/API/RowEvolution.php
@@ -79,7 +79,7 @@ class RowEvolution
}
/**
- * @param array $labels
+ * @param array $labels
* @param DataTable\Map $dataTable
* @return mixed
*/
@@ -99,8 +99,8 @@ class RowEvolution
}
/**
- * @param DataTable\Map $dataTable
- * @param array $labels
+ * @param DataTable\Map $dataTable
+ * @param array $labels
* @return array
*/
protected function getLabelsFromDataTable($dataTable, $labels)
@@ -186,10 +186,10 @@ class RowEvolution
}
/**
- * @param Row $row
- * @param string $apiModule
- * @param string $apiAction
- * @param bool $labelUseAbsoluteUrl
+ * @param Row $row
+ * @param string $apiModule
+ * @param string $apiAction
+ * @param bool $labelUseAbsoluteUrl
* @return bool|string
*/
private function getRowUrlForEvolutionLabel($row, $apiModule, $apiAction, $labelUseAbsoluteUrl)
diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php
index 14cbfaeb74..e9c9d4c810 100644
--- a/plugins/Actions/API.php
+++ b/plugins/Actions/API.php
@@ -15,11 +15,11 @@ use Piwik\Archive;
use Piwik\Common;
use Piwik\DataTable;
use Piwik\Date;
-use Piwik\Metrics;
+use Piwik\Metrics;
use Piwik\Piwik;
-use Piwik\Plugins\CustomVariables\API as APICustomVariables;
+use Piwik\Plugins\CustomVariables\API as APICustomVariables;
use Piwik\Tracker\Action;
/**
@@ -119,11 +119,11 @@ class API
}
/**
- * @param int $idSite
- * @param string $period
- * @param Date $date
- * @param bool $segment
- * @param bool $expanded
+ * @param int $idSite
+ * @param string $period
+ * @param Date $date
+ * @param bool $segment
+ * @param bool $expanded
* @param bool|int $idSubtable
* @param bool|int $depth
*
@@ -181,7 +181,9 @@ class API
// Keep only pages which are following site search
$dataTable->filter('ColumnCallbackDeleteRow', array(
'nb_hits_following_search',
- function($value) { return $value > 0; }
+ function ($value) {
+ return $value > 0;
+ }
));
}
@@ -321,7 +323,9 @@ class API
$dataTable->filter('ColumnCallbackDeleteRow',
array(
Metrics::INDEX_SITE_SEARCH_HAS_NO_RESULT,
- function($value) { return $value >= 1; }
+ function ($value) {
+ return $value >= 1;
+ }
));
$dataTable->deleteRow(DataTable::ID_SUMMARY_ROW);
$dataTable->deleteColumn(Metrics::INDEX_SITE_SEARCH_HAS_NO_RESULT);
diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php
index a33153df27..f97c1333a4 100644
--- a/plugins/Actions/Actions.php
+++ b/plugins/Actions/Actions.php
@@ -54,7 +54,7 @@ class Actions extends \Piwik\Plugin
public function getListHooksRegistered()
{
$hooks = array(
- 'ArchiveProcessor.Day.compute' => 'archiveDay',
+ 'ArchiveProcessor.Day.compute' => 'archiveDay',
'ArchiveProcessor.Period.compute' => 'archivePeriod',
'WidgetsList.addWidgets' => 'addWidgets',
'Menu.Reporting.addItems' => 'addMenus',
@@ -76,7 +76,7 @@ class Actions extends \Piwik\Plugin
{
$jsFiles[] = "plugins/Actions/javascripts/actionsDataTable.js";
}
-
+
public function getSegmentsMetadata(&$segments)
{
$sqlFilter = array($this, 'getIdActionFromSegment');
@@ -673,7 +673,7 @@ class Actions extends \Piwik\Plugin
if (ViewDataTable::shouldLoadExpanded()) {
$result['visualization_properties']['table']['show_expanded'] = true;
-
+
$result['filters'][] = function ($dataTable) {
Actions::setDataTableRowLevels($dataTable);
};
@@ -876,17 +876,17 @@ class Actions extends \Piwik\Plugin
public function getDisplayPropertiesForSiteSearchCategories()
{
return array(
- 'translations' => array(
+ 'translations' => array(
'label' => Piwik_Translate('Actions_ColumnSearchCategory'),
'nb_visits' => Piwik_Translate('Actions_ColumnSearches'),
'nb_pages_per_search' => Piwik_Translate('Actions_ColumnPagesPerSearch')
),
- 'columns_to_display' => array('label', 'nb_visits', 'nb_pages_per_search'),
- 'show_table_all_columns' => false,
- 'show_bar_chart' => false,
+ 'columns_to_display' => array('label', 'nb_visits', 'nb_pages_per_search'),
+ 'show_table_all_columns' => false,
+ 'show_bar_chart' => false,
'visualization_properties' => array(
'table' => array(
- 'disable_row_evolution' => false,
+ 'disable_row_evolution' => false,
)
)
);
diff --git a/plugins/Actions/ArchivingHelper.php b/plugins/Actions/ArchivingHelper.php
index 8c08171f31..fae4380d68 100644
--- a/plugins/Actions/ArchivingHelper.php
+++ b/plugins/Actions/ArchivingHelper.php
@@ -506,7 +506,7 @@ class ArchivingHelper
{
return new Row(array(
Row::COLUMNS =>
- array('label' => DataTable::LABEL_SUMMARY_ROW) + self::getDefaultRowColumns()
+ array('label' => DataTable::LABEL_SUMMARY_ROW) + self::getDefaultRowColumns()
));
}
}
diff --git a/plugins/Annotations/API.php b/plugins/Annotations/API.php
index d574ebd76d..6f4b603b79 100755
--- a/plugins/Annotations/API.php
+++ b/plugins/Annotations/API.php
@@ -12,9 +12,9 @@ namespace Piwik\Plugins\Annotations;
use Exception;
use Piwik\Date;
+
use Piwik\Period;
use Piwik\Period\Range;
-
use Piwik\Piwik;
use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Evolution as EvolutionViz;
use Piwik\ViewDataTable;
@@ -308,7 +308,7 @@ class API
* @param string|bool $date The start date of the period (or the date range of a range
* period).
* @param string $period The period type ('day', 'week', 'month', 'year' or 'range').
- * @param bool|int $lastN Whether to include the last N periods in the range or not.
+ * @param bool|int $lastN Whether to include the last N periods in the range or not.
* Ignored if period == range.
*
* @return Date[] array of Date objects or array(false, false)
diff --git a/plugins/Annotations/AnnotationList.php b/plugins/Annotations/AnnotationList.php
index 93b38f0b6b..9f114608e6 100755
--- a/plugins/Annotations/AnnotationList.php
+++ b/plugins/Annotations/AnnotationList.php
@@ -421,7 +421,7 @@ class AnnotationList
public static function canUserAddNotesFor($idSite)
{
return Piwik::isUserHasViewAccess($idSite)
- && !Piwik::isUserIsAnonymous($idSite);
+ && !Piwik::isUserIsAnonymous($idSite);
}
/**
diff --git a/plugins/Annotations/Controller.php b/plugins/Annotations/Controller.php
index e31c0b7044..2cfe7d04ba 100755
--- a/plugins/Annotations/Controller.php
+++ b/plugins/Annotations/Controller.php
@@ -11,7 +11,6 @@
namespace Piwik\Plugins\Annotations;
use Piwik\API\Request;
-
use Piwik\Common;
use Piwik\View;
diff --git a/plugins/AnonymizeIP/AnonymizeIP.php b/plugins/AnonymizeIP/AnonymizeIP.php
index 1339b76e49..6996119091 100644
--- a/plugins/AnonymizeIP/AnonymizeIP.php
+++ b/plugins/AnonymizeIP/AnonymizeIP.php
@@ -55,7 +55,7 @@ class AnonymizeIP extends \Piwik\Plugin
public static function applyIPMask($ip, $maskLength)
{
// IPv4 or mapped IPv4 in IPv6
- if(IP::isIPv4($ip)) {
+ if (IP::isIPv4($ip)) {
$i = Common::strlen($ip);
if ($maskLength > $i) {
$maskLength = $i;
diff --git a/plugins/CoreAdminHome/Controller.php b/plugins/CoreAdminHome/Controller.php
index 7479da39f4..77ed3e8f95 100644
--- a/plugins/CoreAdminHome/Controller.php
+++ b/plugins/CoreAdminHome/Controller.php
@@ -72,8 +72,7 @@ class Controller extends \Piwik\Controller\Admin
$directoryWritable = is_writable(PIWIK_DOCUMENT_ROOT . '/misc/user/');
$logoFilesWriteable = is_writeable(PIWIK_DOCUMENT_ROOT . '/misc/user/logo.png')
&& is_writeable(PIWIK_DOCUMENT_ROOT . '/misc/user/logo.svg')
- && is_writeable(PIWIK_DOCUMENT_ROOT . '/misc/user/logo-header.png');
- ;
+ && is_writeable(PIWIK_DOCUMENT_ROOT . '/misc/user/logo-header.png');;
$view->logosWriteable = ($logoFilesWriteable || $directoryWritable) && ini_get('file_uploads') == 1;
$trustedHosts = array();
diff --git a/plugins/CoreConsole/GenerateApi.php b/plugins/CoreConsole/GenerateApi.php
index 1760c6ca3e..f9d68db421 100644
--- a/plugins/CoreConsole/GenerateApi.php
+++ b/plugins/CoreConsole/GenerateApi.php
@@ -23,8 +23,8 @@ class GenerateApi extends GeneratePluginBase
protected function configure()
{
$this->setName('generate:api')
- ->setDescription('Adds an API to an existing plugin')
- ->addOption('pluginname', null, InputOption::VALUE_REQUIRED, 'The name of an existing plugin which does not have an API yet');
+ ->setDescription('Adds an API to an existing plugin')
+ ->addOption('pluginname', null, InputOption::VALUE_REQUIRED, 'The name of an existing plugin which does not have an API yet');
}
protected function execute(InputInterface $input, OutputInterface $output)
@@ -34,10 +34,10 @@ class GenerateApi extends GeneratePluginBase
$this->copyTemplateToPlugin('api', $pluginName);
$this->writeSuccessMessage($output, array(
- sprintf('API.php for %s generated.', $pluginName),
- 'You can now start adding API methods',
- 'Enjoy!'
- ));
+ sprintf('API.php for %s generated.', $pluginName),
+ 'You can now start adding API methods',
+ 'Enjoy!'
+ ));
}
/**
@@ -61,7 +61,7 @@ class GenerateApi extends GeneratePluginBase
$pluginName = $input->getOption('pluginname');
if (empty($pluginName)) {
- $dialog = $this->getHelperSet()->get('dialog');
+ $dialog = $this->getHelperSet()->get('dialog');
$pluginName = $dialog->askAndValidate($output, 'Enter the name of your plugin: ', $validate, false, null, $pluginNames);
} else {
$validate($pluginName);
diff --git a/plugins/CoreConsole/GenerateController.php b/plugins/CoreConsole/GenerateController.php
index bedbbbd174..f62a49d195 100644
--- a/plugins/CoreConsole/GenerateController.php
+++ b/plugins/CoreConsole/GenerateController.php
@@ -23,8 +23,8 @@ class GenerateController extends GeneratePluginBase
protected function configure()
{
$this->setName('generate:controller')
- ->setDescription('Adds a Controller to an existing plugin')
- ->addOption('pluginname', null, InputOption::VALUE_REQUIRED, 'The name of an existing plugin which does not have a Controller yet');
+ ->setDescription('Adds a Controller to an existing plugin')
+ ->addOption('pluginname', null, InputOption::VALUE_REQUIRED, 'The name of an existing plugin which does not have a Controller yet');
}
protected function execute(InputInterface $input, OutputInterface $output)
@@ -34,10 +34,10 @@ class GenerateController extends GeneratePluginBase
$this->copyTemplateToPlugin('controller', $pluginName);
$this->writeSuccessMessage($output, array(
- sprintf('Controller for %s generated.', $pluginName),
- 'You can now start adding Controller actions',
- 'Enjoy!'
- ));
+ sprintf('Controller for %s generated.', $pluginName),
+ 'You can now start adding Controller actions',
+ 'Enjoy!'
+ ));
}
/**
@@ -61,7 +61,7 @@ class GenerateController extends GeneratePluginBase
$pluginName = $input->getOption('pluginname');
if (empty($pluginName)) {
- $dialog = $this->getHelperSet()->get('dialog');
+ $dialog = $this->getHelperSet()->get('dialog');
$pluginName = $dialog->askAndValidate($output, 'Enter the name of your plugin: ', $validate, false, null, $pluginNames);
} else {
$validate($pluginName);
diff --git a/plugins/CoreConsole/GeneratePlugin.php b/plugins/CoreConsole/GeneratePlugin.php
index 1dbe50a2fc..6ec8cfd995 100644
--- a/plugins/CoreConsole/GeneratePlugin.php
+++ b/plugins/CoreConsole/GeneratePlugin.php
@@ -26,20 +26,20 @@ class GeneratePlugin extends GeneratePluginBase
protected function configure()
{
$this->setName('generate:plugin')
- ->setAliases(array('generate:theme'))
- ->setDescription('Generates a new plugin/theme including all needed files')
- ->addOption('name', null, InputOption::VALUE_REQUIRED, 'Plugin name ([a-Z0-9_-])')
- ->addOption('description', null, InputOption::VALUE_REQUIRED, 'Plugin description, max 150 characters')
- ->addOption('pluginversion', null, InputOption::VALUE_OPTIONAL, 'Plugin version')
- ->addOption('full', null, InputOption::VALUE_OPTIONAL, 'If a value is set, an API and a Controller will be created as well. Option is only available for creating plugins, not for creating themes.');
+ ->setAliases(array('generate:theme'))
+ ->setDescription('Generates a new plugin/theme including all needed files')
+ ->addOption('name', null, InputOption::VALUE_REQUIRED, 'Plugin name ([a-Z0-9_-])')
+ ->addOption('description', null, InputOption::VALUE_REQUIRED, 'Plugin description, max 150 characters')
+ ->addOption('pluginversion', null, InputOption::VALUE_OPTIONAL, 'Plugin version')
+ ->addOption('full', null, InputOption::VALUE_OPTIONAL, 'If a value is set, an API and a Controller will be created as well. Option is only available for creating plugins, not for creating themes.');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
- $isTheme = $this->isTheme($input);
- $pluginName = $this->getPluginName($input, $output);
+ $isTheme = $this->isTheme($input);
+ $pluginName = $this->getPluginName($input, $output);
$description = $this->getPluginDescription($input, $output);
- $version = $this->getPluginVersion($input, $output);
+ $version = $this->getPluginVersion($input, $output);
$createFullPlugin = !$isTheme && $this->getCreateFullPlugin($input, $output);
$this->generatePluginFolder($pluginName);
@@ -53,9 +53,9 @@ class GeneratePlugin extends GeneratePluginBase
}
$this->writeSuccessMessage($output, array(
- sprintf('%s %s %s generated.', $isTheme ? 'Theme' : 'Plugin', $pluginName, $version),
- 'Enjoy!'
- ));
+ sprintf('%s %s %s generated.', $isTheme ? 'Theme' : 'Plugin', $pluginName, $version),
+ 'Enjoy!'
+ ));
if ($createFullPlugin) {
$this->executePluginCommand($output, 'generate:api', $pluginName);
@@ -65,7 +65,7 @@ class GeneratePlugin extends GeneratePluginBase
private function executePluginCommand(OutputInterface $output, $commandName, $pluginName)
{
- $command = $this->getApplication()->find($commandName);
+ $command = $this->getApplication()->find($commandName);
$arguments = array(
'command' => $commandName,
'--pluginname' => $pluginName
@@ -153,7 +153,7 @@ class GeneratePlugin extends GeneratePluginBase
$pluginName = $input->getOption('name');
if (empty($pluginName)) {
- $dialog = $this->getHelperSet()->get('dialog');
+ $dialog = $this->getHelperSet()->get('dialog');
$pluginName = $dialog->askAndValidate($output, 'Enter a plugin name: ', $validate);
} else {
$validate($pluginName);
@@ -186,7 +186,7 @@ class GeneratePlugin extends GeneratePluginBase
$description = $input->getOption('description');
if (empty($description)) {
- $dialog = $this->getHelperSet()->get('dialog');
+ $dialog = $this->getHelperSet()->get('dialog');
$description = $dialog->askAndValidate($output, 'Enter a plugin description: ', $validate);
} else {
$validate($description);
@@ -205,7 +205,7 @@ class GeneratePlugin extends GeneratePluginBase
$version = $input->getOption('pluginversion');
if (is_null($version)) {
- $dialog = $this->getHelperSet()->get('dialog');
+ $dialog = $this->getHelperSet()->get('dialog');
$version = $dialog->ask($output, 'Enter a plugin version number (default to 0.1.0): ', '0.1.0');
}
@@ -223,7 +223,7 @@ class GeneratePlugin extends GeneratePluginBase
if (is_null($full)) {
$dialog = $this->getHelperSet()->get('dialog');
- $full = $dialog->askConfirmation($output, 'Shall we also create an API and a Controller? (y/N)', false);
+ $full = $dialog->askConfirmation($output, 'Shall we also create an API and a Controller? (y/N)', false);
}
return !empty($full);
diff --git a/plugins/CoreConsole/GeneratePluginBase.php b/plugins/CoreConsole/GeneratePluginBase.php
index 220e24030c..9f0b86e244 100644
--- a/plugins/CoreConsole/GeneratePluginBase.php
+++ b/plugins/CoreConsole/GeneratePluginBase.php
@@ -44,7 +44,7 @@ class GeneratePluginBase extends Command
}
/**
- * @param string $templateName eg. 'controller' or 'api'
+ * @param string $templateName eg. 'controller' or 'api'
* @param string $pluginName
*/
protected function copyTemplateToPlugin($templateName, $pluginName)
diff --git a/plugins/CoreConsole/RunTests.php b/plugins/CoreConsole/RunTests.php
index 052af2ac9d..4176ab1dcc 100644
--- a/plugins/CoreConsole/RunTests.php
+++ b/plugins/CoreConsole/RunTests.php
@@ -33,11 +33,11 @@ class RunTests extends Command
protected function execute(InputInterface $input, OutputInterface $output)
{
$options = $input->getOption('options');
- $group = $input->getArgument('group');
+ $group = $input->getArgument('group');
if (!empty($group)) {
- $groups = explode(',', $group);
- $groups = array_map('ucfirst', $groups);
+ $groups = explode(',', $group);
+ $groups = array_map('ucfirst', $groups);
$options = '--group ' . implode(',', $groups) . ' ' . $options;
}
diff --git a/plugins/CoreConsole/templates/controller/Controller.php b/plugins/CoreConsole/templates/controller/Controller.php
index 05895dec11..c27a7de9bb 100644
--- a/plugins/CoreConsole/templates/controller/Controller.php
+++ b/plugins/CoreConsole/templates/controller/Controller.php
@@ -9,6 +9,7 @@
* @package PLUGINNAME
*/
namespace Piwik\Plugins\PLUGINNAME;
+
use Piwik\View;
/**
diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php
index 23e276791f..e89f2e0eb7 100644
--- a/plugins/CoreHome/CoreHome.php
+++ b/plugins/CoreHome/CoreHome.php
@@ -24,10 +24,10 @@ class CoreHome extends \Piwik\Plugin
public function getListHooksRegistered()
{
return array(
- 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
- 'AssetManager.getJavaScriptFiles' => 'getJsFiles',
- 'WidgetsList.addWidgets' => 'addWidgets',
- 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys'
+ 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
+ 'AssetManager.getJavaScriptFiles' => 'getJsFiles',
+ 'WidgetsList.addWidgets' => 'addWidgets',
+ 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys'
);
}
diff --git a/plugins/CorePluginsAdmin/Controller.php b/plugins/CorePluginsAdmin/Controller.php
index 7e32b924ad..5814ee25d5 100644
--- a/plugins/CorePluginsAdmin/Controller.php
+++ b/plugins/CorePluginsAdmin/Controller.php
@@ -25,13 +25,13 @@ use Piwik\View;
*/
class Controller extends \Piwik\Controller\Admin
{
- const UPDATE_NONCE = 'CorePluginsAdmin.updatePlugin';
- const INSTALL_NONCE = 'CorePluginsAdmin.installPlugin';
- const ACTIVATE_NONCE = 'CorePluginsAdmin.activatePlugin';
+ const UPDATE_NONCE = 'CorePluginsAdmin.updatePlugin';
+ const INSTALL_NONCE = 'CorePluginsAdmin.installPlugin';
+ const ACTIVATE_NONCE = 'CorePluginsAdmin.activatePlugin';
const DEACTIVATE_NONCE = 'CorePluginsAdmin.deactivatePlugin';
- const UNINSTALL_NONCE = 'CorePluginsAdmin.uninstallPlugin';
+ const UNINSTALL_NONCE = 'CorePluginsAdmin.uninstallPlugin';
- private $validSortMethods = array('popular', 'newest', 'alpha');
+ private $validSortMethods = array('popular', 'newest', 'alpha');
private $defaultSortMethod = 'popular';
private function createUpdateOrInstallView($template, $nonceName)
@@ -51,7 +51,7 @@ class Controller extends \Piwik\Controller\Admin
return $view;
}
- $marketplace = new Marketplace();
+ $marketplace = new Marketplace();
$view->plugin = $marketplace->getPluginInfo($pluginName);
return $view;
@@ -99,13 +99,13 @@ class Controller extends \Piwik\Controller\Admin
$view = $this->configureView('@CorePluginsAdmin/uploadPlugin');
$pluginInstaller = new PluginInstaller('uploaded');
- $pluginMetadata = $pluginInstaller->installOrUpdatePluginFromFile($file);
+ $pluginMetadata = $pluginInstaller->installOrUpdatePluginFromFile($file);
- $view->nonce = Nonce::getNonce(static::ACTIVATE_NONCE);
+ $view->nonce = Nonce::getNonce(static::ACTIVATE_NONCE);
$view->plugin = array(
- 'name' => $pluginMetadata->name,
- 'version' => $pluginMetadata->version,
- 'isTheme' => !empty($pluginMetadata->theme),
+ 'name' => $pluginMetadata->name,
+ 'version' => $pluginMetadata->version,
+ 'isTheme' => !empty($pluginMetadata->theme),
'isActivated' => PluginsManager::getInstance()->isPluginActivated($pluginMetadata->name)
);
@@ -119,7 +119,7 @@ class Controller extends \Piwik\Controller\Admin
$view = $this->configureView('@CorePluginsAdmin/pluginDetails');
try {
- $marketplace = new Marketplace();
+ $marketplace = new Marketplace();
$view->plugin = $marketplace->getPluginInfo($pluginName);
} catch (\Exception $e) {
$view->errorMessage = $e->getMessage();
@@ -131,7 +131,7 @@ class Controller extends \Piwik\Controller\Admin
private function createBrowsePluginsOrThemesView($template, $themesOnly)
{
$query = Common::getRequestVar('query', '', 'string', $_POST);
- $sort = Common::getRequestVar('sort', $this->defaultSortMethod, 'string');
+ $sort = Common::getRequestVar('sort', $this->defaultSortMethod, 'string');
if (!in_array($sort, $this->validSortMethods)) {
$sort = $this->defaultSortMethod;
@@ -139,14 +139,14 @@ class Controller extends \Piwik\Controller\Admin
$view = $this->configureView('@CorePluginsAdmin/' . $template);
- $marketplace = new Marketplace();
+ $marketplace = new Marketplace();
$view->plugins = $marketplace->searchPlugins($query, $sort, $themesOnly);
- $view->query = $query;
- $view->sort = $sort;
+ $view->query = $query;
+ $view->sort = $sort;
$view->installNonce = Nonce::getNonce(static::INSTALL_NONCE);
- $view->updateNonce = Nonce::getNonce(static::UPDATE_NONCE);
- $view->isSuperUser = Piwik::isUserIsSuperUser();
+ $view->updateNonce = Nonce::getNonce(static::UPDATE_NONCE);
+ $view->isSuperUser = Piwik::isUserIsSuperUser();
return $view;
}
@@ -167,7 +167,7 @@ class Controller extends \Piwik\Controller\Admin
{
$view = $this->configureView('@CorePluginsAdmin/extend');
$view->installNonce = Nonce::getNonce(static::INSTALL_NONCE);
- $view->isSuperUser = Piwik::isUserIsSuperUser();
+ $view->isSuperUser = Piwik::isUserIsSuperUser();
echo $view->render();
}
@@ -176,7 +176,7 @@ class Controller extends \Piwik\Controller\Admin
{
Piwik::checkUserIsSuperUser();
- $activated = Common::getRequestVar('activated', false, 'integer', $_GET);
+ $activated = Common::getRequestVar('activated', false, 'integer', $_GET);
$pluginName = Common::getRequestVar('pluginName', '', 'string');
$view = $this->configureView('@CorePluginsAdmin/' . $template);
@@ -186,11 +186,11 @@ class Controller extends \Piwik\Controller\Admin
$view->activatedPluginName = $pluginName;
}
- $view->updateNonce = Nonce::getNonce(static::UPDATE_NONCE);
- $view->activateNonce = Nonce::getNonce(static::ACTIVATE_NONCE);
- $view->uninstallNonce = Nonce::getNonce(static::UNINSTALL_NONCE);
+ $view->updateNonce = Nonce::getNonce(static::UPDATE_NONCE);
+ $view->activateNonce = Nonce::getNonce(static::ACTIVATE_NONCE);
+ $view->uninstallNonce = Nonce::getNonce(static::UNINSTALL_NONCE);
$view->deactivateNonce = Nonce::getNonce(static::DEACTIVATE_NONCE);
- $view->pluginsInfo = $this->getPluginsInfo($themesOnly);
+ $view->pluginsInfo = $this->getPluginsInfo($themesOnly);
$users = \Piwik\Plugins\UsersManager\API::getInstance()->getUsers();
$view->otherUsersCount = count($users) - 1;
@@ -233,11 +233,11 @@ class Controller extends \Piwik\Controller\Admin
foreach ($plugins as $pluginName => &$plugin) {
if (!isset($plugin['info'])) {
- $description = '<strong><em>'
- . Piwik_Translate('CorePluginsAdmin_PluginNotCompatibleWith', array($pluginName, self::getPiwikVersion()))
- . '</strong> <br/> '
- . Piwik_Translate('CorePluginsAdmin_PluginAskDevToUpdate')
- . '</em>';
+ $description = '<strong><em>'
+ . Piwik_Translate('CorePluginsAdmin_PluginNotCompatibleWith', array($pluginName, self::getPiwikVersion()))
+ . '</strong> <br/> '
+ . Piwik_Translate('CorePluginsAdmin_PluginAskDevToUpdate')
+ . '</em>';
$plugin['info'] = array(
'description' => $description,
'version' => Piwik_Translate('General_Unknown'),
@@ -249,7 +249,7 @@ class Controller extends \Piwik\Controller\Admin
$pluginsFiltered = $this->keepPluginsOrThemes($themesOnly, $plugins);
return $pluginsFiltered;
}
-
+
protected function keepPluginsOrThemes($themesOnly, $plugins)
{
$pluginsFiltered = array();
@@ -319,7 +319,7 @@ class Controller extends \Piwik\Controller\Admin
public function uninstall($redirectAfter = true)
{
- $pluginName = $this->initPluginModification(static::UNINSTALL_NONCE);
+ $pluginName = $this->initPluginModification(static::UNINSTALL_NONCE);
$uninstalled = \Piwik\PluginsManager::getInstance()->uninstallPlugin($pluginName);
diff --git a/plugins/CorePluginsAdmin/CorePluginsAdmin.php b/plugins/CorePluginsAdmin/CorePluginsAdmin.php
index 3dc96467ac..f5aa54aed2 100644
--- a/plugins/CorePluginsAdmin/CorePluginsAdmin.php
+++ b/plugins/CorePluginsAdmin/CorePluginsAdmin.php
@@ -26,10 +26,10 @@ class CorePluginsAdmin extends \Piwik\Plugin
public function getListHooksRegistered()
{
return array(
- 'Menu.Admin.addItems' => 'addMenu',
- 'AssetManager.getJavaScriptFiles' => 'getJsFiles',
- 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
- 'TaskScheduler.getScheduledTasks' => 'getScheduledTasks',
+ 'Menu.Admin.addItems' => 'addMenu',
+ 'AssetManager.getJavaScriptFiles' => 'getJsFiles',
+ 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
+ 'TaskScheduler.getScheduledTasks' => 'getScheduledTasks',
'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys'
);
}
@@ -56,12 +56,12 @@ class CorePluginsAdmin extends \Piwik\Plugin
function addMenu()
{
$pluginsUpdateMessage = '';
- $themesUpdateMessage = '';
+ $themesUpdateMessage = '';
if (Piwik::isUserIsSuperUser()) {
$marketplace = new Marketplace();
$pluginsHavingUpdate = $marketplace->getPluginsHavingUpdate($themesOnly = false);
- $themesHavingUpdate = $marketplace->getPluginsHavingUpdate($themesOnly = true);
+ $themesHavingUpdate = $marketplace->getPluginsHavingUpdate($themesOnly = true);
if (!empty($pluginsHavingUpdate)) {
$pluginsUpdateMessage = sprintf(' (%d)', count($pluginsHavingUpdate));
diff --git a/plugins/CorePluginsAdmin/Marketplace.php b/plugins/CorePluginsAdmin/Marketplace.php
index 7540a3df19..efdb890fd3 100644
--- a/plugins/CorePluginsAdmin/Marketplace.php
+++ b/plugins/CorePluginsAdmin/Marketplace.php
@@ -48,8 +48,8 @@ class Marketplace
foreach ($plugins as &$plugin) {
$plugin['canBeUpdated'] = $this->hasPluginUpdate($plugin);
- $plugin['isInstalled'] = PluginsManager::getInstance()->isPluginLoaded($plugin['name']);
- $plugin['lastUpdated'] = Date::factory($plugin['lastUpdated'])->getLocalized($dateFormat);
+ $plugin['isInstalled'] = PluginsManager::getInstance()->isPluginLoaded($plugin['name']);
+ $plugin['lastUpdated'] = Date::factory($plugin['lastUpdated'])->getLocalized($dateFormat);
}
return $plugins;
@@ -93,10 +93,11 @@ class Marketplace
foreach ($loadedPlugins as $loadedPlugin) {
if (!empty($updatePlugin['name'])
- && $loadedPlugin->getPluginName() == $updatePlugin['name']) {
+ && $loadedPlugin->getPluginName() == $updatePlugin['name']
+ ) {
$updatePlugin['currentVersion'] = $loadedPlugin->getVersion();
- $updatePlugin['isActivated'] = $pluginManager->isPluginActivated($updatePlugin['name']);
+ $updatePlugin['isActivated'] = $pluginManager->isPluginActivated($updatePlugin['name']);
break;
}
}
diff --git a/plugins/CorePluginsAdmin/MarketplaceApiClient.php b/plugins/CorePluginsAdmin/MarketplaceApiClient.php
index 76499675f6..a8049b681d 100644
--- a/plugins/CorePluginsAdmin/MarketplaceApiClient.php
+++ b/plugins/CorePluginsAdmin/MarketplaceApiClient.php
@@ -9,8 +9,8 @@
* @package CorePluginsAdmin
*/
namespace Piwik\Plugins\CorePluginsAdmin;
-use Piwik\CacheFile;
+use Piwik\CacheFile;
use Piwik\Http;
use Piwik\PluginsManager;
use Piwik\Version;
@@ -71,7 +71,7 @@ class MarketplaceApiClient
$params = array();
foreach ($plugins as $plugin) {
- $pluginName = $plugin->getPluginName();
+ $pluginName = $plugin->getPluginName();
if (!PluginsManager::getInstance()->isPluginBundledWithCore($pluginName)) {
$params[] = array('name' => $plugin->getPluginName(), 'version' => $plugin->getVersion());
}
@@ -90,7 +90,7 @@ class MarketplaceApiClient
/**
* @param \Piwik\Plugin[] $plugins
- * @param bool $themesOnly
+ * @param bool $themesOnly
* @return array
*/
public function getInfoOfPluginsHavingUpdate($plugins, $themesOnly)
@@ -135,18 +135,18 @@ class MarketplaceApiClient
private function fetch($action, $params)
{
ksort($params);
- $query = http_build_query($params);
+ $query = http_build_query($params);
$result = $this->getCachedResult($action, $query);
if (false === $result) {
$endpoint = $this->domain . '/api/1.0/';
- $url = sprintf('%s%s?%s', $endpoint, $action, $query);
+ $url = sprintf('%s%s?%s', $endpoint, $action, $query);
$response = Http::sendHttpRequest($url, static::HTTP_REQUEST_TIMEOUT);
- $result = json_decode($response, true);
+ $result = json_decode($response, true);
if (is_null($result)) {
$message = sprintf('There was an error reading the response from the Marketplace: %s. Please try again later.',
- substr($response, 0, 50));
+ substr($response, 0, 50));
throw new MarketplaceApiException($message);
}
@@ -193,7 +193,7 @@ class MarketplaceApiClient
}
$latestVersion = array_pop($plugin['versions']);
- $downloadUrl = $latestVersion['download'];
+ $downloadUrl = $latestVersion['download'];
return $this->domain . $downloadUrl . '?coreVersion=' . Version::VERSION;
}
diff --git a/plugins/CorePluginsAdmin/PluginInstaller.php b/plugins/CorePluginsAdmin/PluginInstaller.php
index 10d7b454bd..b517b91b73 100644
--- a/plugins/CorePluginsAdmin/PluginInstaller.php
+++ b/plugins/CorePluginsAdmin/PluginInstaller.php
@@ -9,8 +9,8 @@
* @package CorePluginsAdmin
*/
namespace Piwik\Plugins\CorePluginsAdmin;
-use Piwik\Filechecks;
+use Piwik\Filechecks;
use Piwik\Filesystem;
use Piwik\SettingsPiwik;
use Piwik\Unzip;
@@ -22,7 +22,7 @@ use Piwik\Unzip;
class PluginInstaller
{
const PATH_TO_DOWNLOAD = '/tmp/latest/plugins/';
- const PATH_TO_EXTRACT = '/plugins/';
+ const PATH_TO_EXTRACT = '/plugins/';
private $pluginName;
@@ -33,7 +33,7 @@ class PluginInstaller
public function installOrUpdatePluginFromMarketplace()
{
- $tmpPluginZip = PIWIK_USER_PATH . self::PATH_TO_DOWNLOAD . $this->pluginName . '.zip';
+ $tmpPluginZip = PIWIK_USER_PATH . self::PATH_TO_DOWNLOAD . $this->pluginName . '.zip';
$tmpPluginFolder = PIWIK_USER_PATH . self::PATH_TO_DOWNLOAD . $this->pluginName;
$tmpPluginZip = SettingsPiwik::rewriteTmpPathWithHostname($tmpPluginZip);
@@ -87,7 +87,7 @@ class PluginInstaller
} catch (\Exception $e) {
try {
- $downloadUrl = $marketplace->getDownloadUrl($this->pluginName);
+ $downloadUrl = $marketplace->getDownloadUrl($this->pluginName);
$errorMessage = sprintf('Failed to download plugin from %s: %s', $downloadUrl, $e->getMessage());
} catch (\Exception $ex) {
@@ -144,7 +144,7 @@ class PluginInstaller
if (!preg_match('/^[a-zA-Z0-9_-]+$/', $metadata->name)) {
throw new PluginInstallerException('The plugin name specified in plugin.json contains illegal characters. ' .
- 'Plugin name can only contain following characters: [a-zA-Z0-9-_].');
+ 'Plugin name can only contain following characters: [a-zA-Z0-9-_].');
}
if (empty($metadata->version)) {
@@ -201,7 +201,7 @@ class PluginInstaller
}
$from = $tmpPluginFolder . DIRECTORY_SEPARATOR . $firstSubFolder;
- $to = $tmpPluginFolder . DIRECTORY_SEPARATOR . $this->pluginName;
+ $to = $tmpPluginFolder . DIRECTORY_SEPARATOR . $this->pluginName;
rename($from, $to);
}
@@ -238,7 +238,7 @@ class PluginInstaller
private function makeSurePluginNameIsValid()
{
try {
- $marketplace = new MarketplaceApiClient();
+ $marketplace = new MarketplaceApiClient();
$pluginDetails = $marketplace->getPluginInfo($this->pluginName);
} catch (\Exception $e) {
throw new PluginInstallerException($e->getMessage());
diff --git a/plugins/CoreVisualizations/CoreVisualizations.php b/plugins/CoreVisualizations/CoreVisualizations.php
index bc175aa36b..06db725f51 100644
--- a/plugins/CoreVisualizations/CoreVisualizations.php
+++ b/plugins/CoreVisualizations/CoreVisualizations.php
@@ -28,10 +28,10 @@ class CoreVisualizations extends \Piwik\Plugin
public function getListHooksRegistered()
{
return array(
- 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
- 'AssetManager.getJavaScriptFiles' => 'getJsFiles',
- 'Visualization.addVisualizations' => 'getAvailableDataTableVisualizations',
- 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys'
+ 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
+ 'AssetManager.getJavaScriptFiles' => 'getJsFiles',
+ 'Visualization.addVisualizations' => 'getAvailableDataTableVisualizations',
+ 'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys'
);
}
diff --git a/plugins/CoreVisualizations/JqplotDataGenerator.php b/plugins/CoreVisualizations/JqplotDataGenerator.php
index 73eba01367..7c1a638f9a 100644
--- a/plugins/CoreVisualizations/JqplotDataGenerator.php
+++ b/plugins/CoreVisualizations/JqplotDataGenerator.php
@@ -13,8 +13,8 @@ namespace Piwik\Plugins\CoreVisualizations;
use Exception;
use Piwik\Common;
-use Piwik\DataTable;
+use Piwik\DataTable;
use Piwik\Metrics;
use Piwik\Plugins\CoreVisualizations\JqplotDataGenerator\Chart;
@@ -61,7 +61,7 @@ class JqplotDataGenerator
/**
* Constructor.
*
- * @param array $properties
+ * @param array $properties
* @param string $graphType
*
* @internal param \Piwik\ViewDataTable\Visualization\ $visualization
diff --git a/plugins/CoreVisualizations/JqplotDataGenerator/Chart.php b/plugins/CoreVisualizations/JqplotDataGenerator/Chart.php
index 9590c7ef04..902cbf7f5e 100644
--- a/plugins/CoreVisualizations/JqplotDataGenerator/Chart.php
+++ b/plugins/CoreVisualizations/JqplotDataGenerator/Chart.php
@@ -63,7 +63,9 @@ class Chart
'internalLabel' => $label
);
- array_walk($data, function(&$v) { $v = (float)$v; });
+ array_walk($data, function (&$v) {
+ $v = (float)$v;
+ });
$this->data[] = & $data;
}
}
@@ -110,11 +112,11 @@ class Chart
// See http://www.jqplot.com/docs/files/jqPlotOptions-txt.html
$data = array(
- 'params' => array(
+ 'params' => array(
'axes' => &$this->axes,
'series' => &$this->series
),
- 'data' => &$this->data
+ 'data' => &$this->data
);
return $data;
diff --git a/plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php b/plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php
index 3b1eeccab8..342bd1bdb0 100644
--- a/plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php
+++ b/plugins/CoreVisualizations/JqplotDataGenerator/Evolution.php
@@ -47,9 +47,9 @@ class Evolution extends JqplotDataGenerator
// if rows to display are not specified, default to all rows (TODO: perhaps this should be done elsewhere?)
$rowsToDisplay = $this->properties['visualization_properties']->rows_to_display
- ?: array_unique($dataTable->getColumn('label'))
- ?: array(false) // make sure that a series is plotted even if there is no data
- ;
+ ? : array_unique($dataTable->getColumn('label'))
+ ? : array(false) // make sure that a series is plotted even if there is no data
+ ;
// collect series data to show. each row-to-display/column-to-display permutation creates a series.
$allSeriesData = array();
@@ -93,9 +93,9 @@ class Evolution extends JqplotDataGenerator
}
$link = 'index.php?' .
Url::getQueryStringFromParameters(array(
- 'module' => 'CoreHome',
- 'action' => 'index',
- ) + $parameters)
+ 'module' => 'CoreHome',
+ 'action' => 'index',
+ ) + $parameters)
. $hash;
$axisXOnClick[] = $link;
}
@@ -118,7 +118,7 @@ class Evolution extends JqplotDataGenerator
if ($row === false) {
$seriesData[] = 0;
} else {
- $seriesData[] = $row->getColumn($columnName) ?: 0;
+ $seriesData[] = $row->getColumn($columnName) ? : 0;
}
}
return $seriesData;
diff --git a/plugins/CoreVisualizations/Visualizations/Cloud.php b/plugins/CoreVisualizations/Visualizations/Cloud.php
index 36b98c3816..13ea33feac 100644
--- a/plugins/CoreVisualizations/Visualizations/Cloud.php
+++ b/plugins/CoreVisualizations/Visualizations/Cloud.php
@@ -27,11 +27,11 @@ use Piwik\ViewDataTable\Visualization;
class Cloud extends Visualization
{
const ID = 'cloud';
-
+
/**
* Whether to display the logo assocatied with a DataTable row (stored as 'logo' row metadata)
* instead of the label in Tag Clouds.
- *
+ *
* Default value: false
*/
const DISPLAY_LOGO_INSTEAD_OF_LABEL = 'display_logo_instead_of_label';
@@ -53,7 +53,7 @@ class Cloud extends Visualization
if ($dataTable->getRowsCount() == 0) {
return;
}
-
+
$columnToDisplay = isset($view->columns_to_display[1]) ? $view->columns_to_display[1] : 'nb_visits';
$labelMetadata = array();
@@ -85,10 +85,10 @@ class Cloud extends Visualization
public static function getDefaultPropertyValues()
{
return array(
- 'show_offset_information' => false,
+ 'show_offset_information' => false,
'show_exclude_low_population' => false,
- 'show_limit_control' => false,
- 'visualization_properties' => array(
+ 'show_limit_control' => false,
+ 'visualization_properties' => array(
'cloud' => array(
'display_logo_instead_of_label' => false,
)
diff --git a/plugins/CoreVisualizations/Visualizations/HtmlTable.php b/plugins/CoreVisualizations/Visualizations/HtmlTable.php
index a15274e40f..223c1fb9d4 100644
--- a/plugins/CoreVisualizations/Visualizations/HtmlTable.php
+++ b/plugins/CoreVisualizations/Visualizations/HtmlTable.php
@@ -34,7 +34,7 @@ class HtmlTable extends Visualization
/**
* If this property is set to true, subtables will be shown as embedded in the original table.
* If false, subtables will be shown as whole tables between rows.
- *
+ *
* Default value: false
*/
const SHOW_EMBEDDED_SUBTABLE = 'show_embedded_subtable';
@@ -42,7 +42,7 @@ class HtmlTable extends Visualization
/**
* Controls whether the entire DataTable should be rendered (including subtables) or just one
* specific table in the tree.
- *
+ *
* Default value: false
*/
const SHOW_EXPANDED = 'show_expanded';
@@ -50,7 +50,7 @@ class HtmlTable extends Visualization
/**
* When showing an expanded datatable, this property controls whether rows with subtables are
* replaced with their subtables, or if they are shown alongside their subtables.
- *
+ *
* Default value: false
*/
const REPLACE_ROW_WITH_SUBTABLE = 'replace_row_with_subtable';
@@ -59,7 +59,7 @@ class HtmlTable extends Visualization
* Controls whether any DataTable Row Action icons are shown. If true, no icons are shown.
*
* @see also self::DISABLE_ROW_EVOLUTION
- *
+ *
* Default value: false
*/
const DISABLE_ROW_ACTIONS = 'disable_row_actions';
@@ -68,7 +68,7 @@ class HtmlTable extends Visualization
* Controls whether the row evolution DataTable Row Action icon is shown or not.
*
* @see also self::DISABLE_ROW_ACTIONS
- *
+ *
* Default value: false
*/
const DISABLE_ROW_EVOLUTION = 'disable_row_evolution';
@@ -77,7 +77,7 @@ class HtmlTable extends Visualization
* If true, the 'label', 'nb_visits', 'nb_uniq_visitors' (if present), 'nb_actions',
* 'nb_actions_per_visit', 'avg_time_on_site', 'bounce_rate' and 'conversion_rate' (if
* goals view is not allowed) are displayed.
- *
+ *
* Default value: false
*/
const SHOW_EXTRA_COLUMNS = 'show_extra_columns';
@@ -85,7 +85,7 @@ class HtmlTable extends Visualization
/**
* If true, conversions for each existing goal will be displayed for the visits in
* each row.
- *
+ *
* Default value: false
*/
const SHOW_GOALS_COLUMNS = 'show_goals_columns';
@@ -95,7 +95,7 @@ class HtmlTable extends Visualization
* 'show_goals_columns' property is also true.
*
* @see also self::SHOW_GOALS_COLUMNS
- *
+ *
* Default value: false
*/
const DISABLE_SUBTABLE_IN_GOALS_VIEW = 'disable_subtable_when_show_goals';
@@ -104,16 +104,16 @@ class HtmlTable extends Visualization
* Controls whether the summary row is displayed on every page of the datatable view or not.
* If false, the summary row will be treated as the last row of the dataset and will only visible
* when viewing the last rows.
- *
+ *
* Default value: false
*/
const KEEP_SUMMARY_ROW = 'keep_summary_row';
/**
* If true, the summary row will be colored differently than all other DataTable rows.
- *
+ *
* @see also self::KEEP_SUMMARY_ROW
- *
+ *
* Default value: false
*/
const HIGHLIGHT_SUMMARY_ROW = 'highlight_summary_row';
@@ -172,20 +172,20 @@ class HtmlTable extends Visualization
public static function getDefaultPropertyValues()
{
$defaults = array(
- 'enable_sort' => true,
- 'datatable_js_type' => 'DataTable',
- 'filter_limit' => Config::getInstance()->General['datatable_default_limit'],
+ 'enable_sort' => true,
+ 'datatable_js_type' => 'DataTable',
+ 'filter_limit' => Config::getInstance()->General['datatable_default_limit'],
'visualization_properties' => array(
'table' => array(
- 'disable_row_evolution' => false,
- 'disable_row_actions' => false,
- 'show_extra_columns' => false,
- 'show_goals_columns' => false,
+ 'disable_row_evolution' => false,
+ 'disable_row_actions' => false,
+ 'show_extra_columns' => false,
+ 'show_goals_columns' => false,
'disable_subtable_when_show_goals' => false,
- 'keep_summary_row' => false,
- 'highlight_summary_row' => false,
- 'show_expanded' => false,
- 'show_embedded_subtable' => false
+ 'keep_summary_row' => false,
+ 'highlight_summary_row' => false,
+ 'show_expanded' => false,
+ 'show_embedded_subtable' => false
),
),
);
@@ -236,10 +236,10 @@ class HtmlTable extends Visualization
$view->show_exclude_low_population = true;
$view->show_goals = true;
$view->translations += array(
- 'nb_conversions' => Piwik_Translate('Goals_ColumnConversions'),
- 'conversion_rate' => Piwik_Translate('General_ColumnConversionRate'),
- 'revenue' => Piwik_Translate('General_ColumnRevenue'),
- 'revenue_per_visit' => Piwik_Translate('General_ColumnValuePerVisit'),
+ 'nb_conversions' => Piwik_Translate('Goals_ColumnConversions'),
+ 'conversion_rate' => Piwik_Translate('General_ColumnConversionRate'),
+ 'revenue' => Piwik_Translate('General_ColumnRevenue'),
+ 'revenue_per_visit' => Piwik_Translate('General_ColumnValuePerVisit'),
);
$view->metrics_documentation['nb_visits'] = Piwik_Translate('Goals_ColumnVisits');
@@ -270,14 +270,16 @@ class HtmlTable extends Visualization
'AddColumnsProcessedMetricsGoal', array($ignore = true, $idGoal), $priority = true);
// prettify columns
- $setRatePercent = function ($rate, $thang = false) { return $rate == 0 ? "0%" : $rate; };
+ $setRatePercent = function ($rate, $thang = false) {
+ return $rate == 0 ? "0%" : $rate;
+ };
foreach ($view->columns_to_display as $columnName) {
if (strpos($columnName, 'conversion_rate') !== false) {
$view->filters[] = array('ColumnCallbackReplace', array($columnName, $setRatePercent));
}
}
- $formatPercent = function ($value) use($idSite) {
+ $formatPercent = function ($value) use ($idSite) {
return MetricsFormatter::getPrettyMoney(sprintf("%.1f", $value), $idSite);
};
@@ -288,7 +290,9 @@ class HtmlTable extends Visualization
}
// this ensures that the value is set to zero for all rows where the value was not set (no conversion)
- $identityFunction = function ($value) { return $value; };
+ $identityFunction = function ($value) {
+ return $value;
+ };
foreach ($view->columns_to_display as $columnName) {
if (!$this->isRevenueColumn($columnName)) {
$view->filters[] = array('ColumnCallbackReplace', array($columnName, $identityFunction));
@@ -341,7 +345,7 @@ class HtmlTable extends Visualization
$view->columns_to_display[] = $column;
$view->translations[$column] = Piwik_Translate('Goals_ConversionRate', $goal['name']);
$view->metrics_documentation[$column]
- = Piwik_Translate('Goals_ColumnConversionRateDocumentation', $goal['quoted_name'] ?: $goal['name']);
+ = Piwik_Translate('Goals_ColumnConversionRateDocumentation', $goal['quoted_name'] ? : $goal['name']);
}
$view->columns_to_display[] = 'revenue_per_visit';
@@ -382,23 +386,23 @@ class HtmlTable extends Visualization
// set translations & metric docs for goal specific metrics
foreach ($idGoals as $idGoal) {
$goalName = $allGoals[$idGoal]['name'];
- $quotedGoalName = $allGoals[$idGoal]['quoted_name'] ?: $goalName;
+ $quotedGoalName = $allGoals[$idGoal]['quoted_name'] ? : $goalName;
$view->translations += array(
- 'goal_' . $idGoal . '_nb_conversions' => Piwik_Translate('Goals_Conversions', $goalName),
- 'goal_' . $idGoal . '_conversion_rate' => Piwik_Translate('Goals_ConversionRate', $goalName),
- 'goal_' . $idGoal . '_revenue' =>
- Piwik_Translate('%s ' . Piwik_Translate('General_ColumnRevenue'), $goalName),
+ 'goal_' . $idGoal . '_nb_conversions' => Piwik_Translate('Goals_Conversions', $goalName),
+ 'goal_' . $idGoal . '_conversion_rate' => Piwik_Translate('Goals_ConversionRate', $goalName),
+ 'goal_' . $idGoal . '_revenue' =>
+ Piwik_Translate('%s ' . Piwik_Translate('General_ColumnRevenue'), $goalName),
'goal_' . $idGoal . '_revenue_per_visit' =>
- Piwik_Translate('%s ' . Piwik_Translate('General_ColumnValuePerVisit'), $goalName),
+ Piwik_Translate('%s ' . Piwik_Translate('General_ColumnValuePerVisit'), $goalName),
);
$view->metrics_documentation += array(
- 'goal_' . $idGoal . '_nb_conversions' => Piwik_Translate('Goals_ColumnConversionsDocumentation', $quotedGoalName),
- 'goal_' . $idGoal . '_conversion_rate' => Piwik_Translate('Goals_ColumnConversionRateDocumentation', $quotedGoalName),
- 'goal_' . $idGoal . '_revenue' => Piwik_Translate('Goals_ColumnRevenueDocumentation', $quotedGoalName),
+ 'goal_' . $idGoal . '_nb_conversions' => Piwik_Translate('Goals_ColumnConversionsDocumentation', $quotedGoalName),
+ 'goal_' . $idGoal . '_conversion_rate' => Piwik_Translate('Goals_ColumnConversionRateDocumentation', $quotedGoalName),
+ 'goal_' . $idGoal . '_revenue' => Piwik_Translate('Goals_ColumnRevenueDocumentation', $quotedGoalName),
'goal_' . $idGoal . '_revenue_per_visit' =>
- Piwik_Translate('Goals_ColumnRevenuePerVisitDocumentation', Piwik_Translate('Goals_EcommerceAndGoalsMenu')),
+ Piwik_Translate('Goals_ColumnRevenuePerVisitDocumentation', Piwik_Translate('Goals_EcommerceAndGoalsMenu')),
);
}
@@ -413,8 +417,8 @@ class HtmlTable extends Visualization
// add the ecommerce goal if ecommerce is enabled for the site
if (Site::isEcommerceEnabledFor($idSite)) {
$ecommerceGoal = array(
- 'idgoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER,
- 'name' => Piwik_Translate('Goals_EcommerceOrder'),
+ 'idgoal' => Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER,
+ 'name' => Piwik_Translate('Goals_EcommerceOrder'),
'quoted_name' => false
);
$allGoals[$ecommerceGoal['idgoal']] = $ecommerceGoal;
diff --git a/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php b/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php
index 20d31e8270..57e3dcef95 100644
--- a/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php
+++ b/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php
@@ -22,7 +22,7 @@ class AllColumns extends HtmlTable
/**
* Constructor.
- *
+ *
* @param \Piwik\ViewDataTable $view
*/
public function __construct($view)
diff --git a/plugins/CoreVisualizations/Visualizations/HtmlTable/Goals.php b/plugins/CoreVisualizations/Visualizations/HtmlTable/Goals.php
index e6dd8abbc3..138478fce0 100644
--- a/plugins/CoreVisualizations/Visualizations/HtmlTable/Goals.php
+++ b/plugins/CoreVisualizations/Visualizations/HtmlTable/Goals.php
@@ -22,7 +22,7 @@ class Goals extends HtmlTable
/**
* Constructor.
- *
+ *
* @param \Piwik\ViewDataTable $view
*/
public function __construct($view)
diff --git a/plugins/CoreVisualizations/Visualizations/JqplotGraph.php b/plugins/CoreVisualizations/Visualizations/JqplotGraph.php
index 42a2fcf1f6..e283920774 100644
--- a/plugins/CoreVisualizations/Visualizations/JqplotGraph.php
+++ b/plugins/CoreVisualizations/Visualizations/JqplotGraph.php
@@ -27,25 +27,25 @@ class JqplotGraph extends Graph
/**
* The name of the JavaScript class to use as this graph's external series toggle. The class
* must be a subclass of JQPlotExternalSeriesToggle.
- *
+ *
* @see self::EXTERNAL_SERIES_TOGGLE_SHOW_ALL
- *
+ *
* Default value: false
*/
const EXTERNAL_SERIES_TOGGLE = 'external_series_toggle';
/**
* Whether the graph should show all loaded series upon initial display.
- *
+ *
* @see self::EXTERNAL_SERIES_TOGGLE
- *
+ *
* Default value: false
*/
const EXTERNAL_SERIES_TOGGLE_SHOW_ALL = 'external_series_toggle_show_all';
/**
* The number of x-axis ticks for each x-axis label.
- *
+ *
* Default: 2
*/
const X_AXIS_STEP_SIZE = 'x_axis_step_size';
@@ -59,13 +59,13 @@ class JqplotGraph extends Graph
/**
* Constructor.
- *
+ *
* @param \Piwik\ViewDataTable $view
*/
public function __construct($view)
{
parent::__construct($view, $template = "@CoreVisualizations/_dataTableViz_jqplotGraph.twig");
-
+
// do not sort if sorted column was initially "label" or eg. it would make "Visits by Server time" not pretty
if ($view->filter_sort_column != 'label') {
$columns = $view->columns_to_display;
@@ -82,27 +82,27 @@ class JqplotGraph extends Graph
/**
* Returns an array mapping property names with default values for this visualization.
- *
+ *
* @return array
*/
public static function getDefaultPropertyValues()
{
$result = parent::getDefaultPropertyValues();
return array_merge_recursive($result, array(
- 'show_offset_information' => false,
- 'show_pagination_control' => false,
- 'show_exclude_low_population' => false,
- 'show_search' => false,
- 'show_export_as_image_icon' => true,
- 'y_axis_unit' => '',
- 'visualization_properties' => array(
- 'jqplot_graph' => array(
- 'external_series_toggle' => false,
- 'external_series_toggle_show_all' => false,
- 'x_axis_step_size' => 2
- )
- )
- ));
+ 'show_offset_information' => false,
+ 'show_pagination_control' => false,
+ 'show_exclude_low_population' => false,
+ 'show_search' => false,
+ 'show_export_as_image_icon' => true,
+ 'y_axis_unit' => '',
+ 'visualization_properties' => array(
+ 'jqplot_graph' => array(
+ 'external_series_toggle' => false,
+ 'external_series_toggle_show_all' => false,
+ 'x_axis_step_size' => 2
+ )
+ )
+ ));
}
public function getGraphData($dataTable, $properties)
diff --git a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php
index 7520025143..e125f6e757 100644
--- a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php
+++ b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php
@@ -28,13 +28,13 @@ class Evolution extends JqplotGraph
/**
* Whether to show a line graph or a bar graph.
- *
+ *
* Default value: true
*/
const SHOW_LINE_GRAPH = 'show_line_graph';
public static $clientSideProperties = array('show_line_graph');
-
+
public static $overridableProperties = array('show_line_graph');
public function __construct($view)
diff --git a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Pie.php b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Pie.php
index b051439d3d..e9bffcbe73 100644
--- a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Pie.php
+++ b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Pie.php
@@ -33,7 +33,7 @@ class Pie extends JqplotGraph
if ($metricColumn == 'label') {
$metricColumn = next($view->columns_to_display);
}
- $view->columns_to_display = array($metricColumn ?: 'nb_visits');
+ $view->columns_to_display = array($metricColumn ? : 'nb_visits');
};
}
diff --git a/plugins/CustomVariables/API.php b/plugins/CustomVariables/API.php
index 1420d43802..5bd918f14d 100644
--- a/plugins/CustomVariables/API.php
+++ b/plugins/CustomVariables/API.php
@@ -112,10 +112,10 @@ class API
// Hack Ecommerce product price tracking to display correctly
$dataTable->renameColumn('price_viewed', 'price');
}
- $dataTable->queueFilter('ColumnCallbackReplace', array('label', function($label) {
- return $label == \Piwik\Plugins\CustomVariables\Archiver::LABEL_CUSTOM_VALUE_NOT_DEFINED
- ? Piwik_Translate('General_NotDefined', Piwik_Translate('CustomVariables_ColumnCustomVariableValue'))
- : $label;
+ $dataTable->queueFilter('ColumnCallbackReplace', array('label', function ($label) {
+ return $label == \Piwik\Plugins\CustomVariables\Archiver::LABEL_CUSTOM_VALUE_NOT_DEFINED
+ ? Piwik_Translate('General_NotDefined', Piwik_Translate('CustomVariables_ColumnCustomVariableValue'))
+ : $label;
}));
return $dataTable;
}
diff --git a/plugins/CustomVariables/Archiver.php b/plugins/CustomVariables/Archiver.php
index 0c5cfea0a6..dff481db66 100644
--- a/plugins/CustomVariables/Archiver.php
+++ b/plugins/CustomVariables/Archiver.php
@@ -13,8 +13,8 @@ namespace Piwik\Plugins\CustomVariables;
use Piwik\Common;
use Piwik\Config;
use Piwik\DataAccess\LogAggregator;
-use Piwik\DataArray;
+use Piwik\DataArray;
use Piwik\Metrics;
use Piwik\PluginsArchiver;
use Piwik\Tracker;
@@ -86,7 +86,7 @@ class Archiver extends PluginsArchiver
protected function getSelectAveragePrice()
{
return LogAggregator::getSqlRevenue("AVG(log_link_visit_action.custom_var_v2)")
- . " as `" . Metrics::INDEX_ECOMMERCE_ITEM_PRICE_VIEWED . "`";
+ . " as `" . Metrics::INDEX_ECOMMERCE_ITEM_PRICE_VIEWED . "`";
}
protected function aggregateFromVisits($query, $keyField, $valueField)
diff --git a/plugins/DBStats/DBStats.php b/plugins/DBStats/DBStats.php
index 34427e8e0e..7a042565b6 100644
--- a/plugins/DBStats/DBStats.php
+++ b/plugins/DBStats/DBStats.php
@@ -11,8 +11,8 @@
namespace Piwik\Plugins\DBStats;
use Piwik\Common;
-use Piwik\Date;
+use Piwik\Date;
use Piwik\Piwik;
use Piwik\ScheduledTask;
use Piwik\ScheduledTime\Weekly;
@@ -149,7 +149,7 @@ class DBStats extends \Piwik\Plugin
$result['title'] = Piwik_Translate('DBStats_MetricTables');
$result['related_reports'] = array(
- 'DBStats.getMetricDataSummaryByYear' => Piwik_Translate('DBStats_MetricDataByYear')
+ 'DBStats.getMetricDataSummaryByYear' => Piwik_Translate('DBStats_MetricDataByYear')
);
return $result;
@@ -163,8 +163,8 @@ class DBStats extends \Piwik\Plugin
$result['translations']['label'] = Piwik_Translate('CoreHome_PeriodYear');
$result['title'] = Piwik_Translate('DBStats_MetricDataByYear');
- $result['related_reports'] = array(
- 'DBStats.getMetricDataSummary' => Piwik_Translate('DBStats_MetricTables')
+ $result['related_reports'] = array(
+ 'DBStats.getMetricDataSummary' => Piwik_Translate('DBStats_MetricTables')
);
return $result;
@@ -193,7 +193,7 @@ class DBStats extends \Piwik\Plugin
$result['translations']['label'] = Piwik_Translate('CoreHome_PeriodYear');
$result['title'] = Piwik_Translate('DBStats_ReportDataByYear');
$result['related_reports'] = array(
- 'DBStats.getReportDataSummary' => Piwik_Translate('DBStats_ReportTables')
+ 'DBStats.getReportDataSummary' => Piwik_Translate('DBStats_ReportTables')
);
return $result;
diff --git a/plugins/DevicesDetection/DevicesDetection.php b/plugins/DevicesDetection/DevicesDetection.php
index 9fe65c7951..a2f2c60de3 100644
--- a/plugins/DevicesDetection/DevicesDetection.php
+++ b/plugins/DevicesDetection/DevicesDetection.php
@@ -13,8 +13,8 @@ namespace Piwik\Plugins\DevicesDetection;
use Exception;
use Piwik\ArchiveProcessor;
-use Piwik\Common;
+use Piwik\Common;
use Piwik\Config;
use Piwik\Db;
use Piwik\WidgetsList;
@@ -335,9 +335,9 @@ class DevicesDetection extends \Piwik\Plugin
return array(
'show_search' => false,
'show_exclude_low_population' => false,
- 'translations' => array('label' => Piwik_Translate("DevicesDetection_dataTableLabelSystemFamily")),
- 'title' => Piwik_Translate('DevicesDetection_OperatingSystemFamilies'),
- 'related_reports' => $this->getOsRelatedReports()
+ 'translations' => array('label' => Piwik_Translate("DevicesDetection_dataTableLabelSystemFamily")),
+ 'title' => Piwik_Translate('DevicesDetection_OperatingSystemFamilies'),
+ 'related_reports' => $this->getOsRelatedReports()
);
}
@@ -346,9 +346,9 @@ class DevicesDetection extends \Piwik\Plugin
return array(
'show_search' => false,
'show_exclude_low_population' => false,
- 'translations' => array('label' => Piwik_Translate("DevicesDetection_dataTableLabelSystemVersion")),
- 'title' => Piwik_Translate('DevicesDetection_OperatingSystemVersions'),
- 'related_reports' => $this->getOsRelatedReports()
+ 'translations' => array('label' => Piwik_Translate("DevicesDetection_dataTableLabelSystemVersion")),
+ 'title' => Piwik_Translate('DevicesDetection_OperatingSystemVersions'),
+ 'related_reports' => $this->getOsRelatedReports()
);
}
@@ -357,9 +357,9 @@ class DevicesDetection extends \Piwik\Plugin
return array(
'show_search' => false,
'show_exclude_low_population' => false,
- 'translations' => array('label' => Piwik_Translate("DevicesDetection_dataTableLabelBrowserFamily")),
- 'title' => Piwik_Translate('DevicesDetection_BrowsersFamily'),
- 'related_reports' => $this->getBrowserRelatedReports()
+ 'translations' => array('label' => Piwik_Translate("DevicesDetection_dataTableLabelBrowserFamily")),
+ 'title' => Piwik_Translate('DevicesDetection_BrowsersFamily'),
+ 'related_reports' => $this->getBrowserRelatedReports()
);
}
@@ -368,8 +368,8 @@ class DevicesDetection extends \Piwik\Plugin
return array(
'show_search' => false,
'show_exclude_low_population' => false,
- 'translations' => array('label' => Piwik_Translate("DevicesDetection_dataTableLabelBrowserVersion")),
- 'related_reports' => $this->getBrowserRelatedReports()
+ 'translations' => array('label' => Piwik_Translate("DevicesDetection_dataTableLabelBrowserVersion")),
+ 'related_reports' => $this->getBrowserRelatedReports()
);
}
diff --git a/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php b/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php
index a8ec8e2204..aea7f6bfc1 100644
--- a/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php
+++ b/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php
@@ -10,11 +10,11 @@
* @package DevicesDetection
*/
//yml parser
-require_once(PIWIK_INCLUDE_PATH.'/libs/spyc.php');
+require_once(PIWIK_INCLUDE_PATH . '/libs/spyc.php');
class UserAgentParserEnhanced
{
- public static $deviceTypes = array( 'desktop', 'smartphone', 'tablet', 'feature phone', 'console', 'tv', 'car browser' );
+ public static $deviceTypes = array('desktop', 'smartphone', 'tablet', 'feature phone', 'console', 'tv', 'car browser');
public static $deviceBrands = array(
'AC' => 'Acer',
@@ -124,118 +124,118 @@ class UserAgentParserEnhanced
'ZT' => 'ZTE',
);
public static $osShorts = array(
- 'AIX' => 'AIX',
- 'Android' => 'AND',
- 'Apple TV' => 'ATV',
- 'Arch Linux' => 'ARL',
- 'BackTrack' => 'BTR',
- 'Bada' => 'SBA',
- 'BlackBerry OS' => 'BLB',
+ 'AIX' => 'AIX',
+ 'Android' => 'AND',
+ 'Apple TV' => 'ATV',
+ 'Arch Linux' => 'ARL',
+ 'BackTrack' => 'BTR',
+ 'Bada' => 'SBA',
+ 'BlackBerry OS' => 'BLB',
'BlackBerry Tablet OS' => 'QNX',
- 'Bot' => 'BOT',
- 'Brew' => 'BMP',
- 'CentOS' => 'CES',
- 'Chrome OS' => 'COS',
- 'Debian' => 'DEB',
- 'DragonFly' => 'DFB',
- 'Fedora' => 'FED',
- 'Firefox OS' => 'FOS',
- 'FreeBSD' => 'BSD',
- 'Gentoo' => 'GNT',
- 'Google TV' => 'GTV',
- 'HP-UX' => 'HPX',
- 'IRIX' => 'IRI',
- 'Knoppix' => 'KNO',
- 'Kubuntu' => 'KBT',
- 'Linux' => 'LIN',
- 'Lubuntu' => 'LBT',
- 'Mac' => 'MAC',
- 'Mandriva' => 'MDR',
- 'MeeGo' => 'SMG',
- 'Mint' => 'MIN',
- 'NetBSD' => 'NBS',
- 'Nintendo' => 'WII',
- 'Nintendo Mobile' => 'NDS',
- 'OS/2' => 'OS2',
- 'OSF1' => 'T64',
- 'OpenBSD' => 'OBS',
- 'PlayStation' => 'PSP',
- 'PlayStation 3' => 'PS3',
- 'Presto' => 'PRS',
- 'Puppy' => 'PPY',
- 'Red Hat' => 'RHT',
- 'SUSE' => 'SSE',
- 'Slackware' => 'SLW',
- 'Solaris' => 'SOS',
- 'Syllable' => 'SYL',
- 'Symbian' => 'SYM',
- 'Symbian OS' => 'SYS',
+ 'Bot' => 'BOT',
+ 'Brew' => 'BMP',
+ 'CentOS' => 'CES',
+ 'Chrome OS' => 'COS',
+ 'Debian' => 'DEB',
+ 'DragonFly' => 'DFB',
+ 'Fedora' => 'FED',
+ 'Firefox OS' => 'FOS',
+ 'FreeBSD' => 'BSD',
+ 'Gentoo' => 'GNT',
+ 'Google TV' => 'GTV',
+ 'HP-UX' => 'HPX',
+ 'IRIX' => 'IRI',
+ 'Knoppix' => 'KNO',
+ 'Kubuntu' => 'KBT',
+ 'Linux' => 'LIN',
+ 'Lubuntu' => 'LBT',
+ 'Mac' => 'MAC',
+ 'Mandriva' => 'MDR',
+ 'MeeGo' => 'SMG',
+ 'Mint' => 'MIN',
+ 'NetBSD' => 'NBS',
+ 'Nintendo' => 'WII',
+ 'Nintendo Mobile' => 'NDS',
+ 'OS/2' => 'OS2',
+ 'OSF1' => 'T64',
+ 'OpenBSD' => 'OBS',
+ 'PlayStation' => 'PSP',
+ 'PlayStation 3' => 'PS3',
+ 'Presto' => 'PRS',
+ 'Puppy' => 'PPY',
+ 'Red Hat' => 'RHT',
+ 'SUSE' => 'SSE',
+ 'Slackware' => 'SLW',
+ 'Solaris' => 'SOS',
+ 'Syllable' => 'SYL',
+ 'Symbian' => 'SYM',
+ 'Symbian OS' => 'SYS',
'Symbian OS Series 40' => 'S40',
'Symbian OS Series 60' => 'S60',
- 'Symbian^3' => 'SY3',
- 'Talkatone' => 'TKT',
- 'Tizen' => 'TIZ',
- 'Ubuntu' => 'UBT',
- 'WebTV' => 'WTV',
- 'WinWAP' => 'WWP',
- 'Windows' => 'WIN',
- 'Windows 2000' => 'W2K',
- 'Windows 3.1' => 'W31',
- 'Windows 7' => 'WI7',
- 'Windows 8' => 'WI8',
- 'Windows 95' => 'W95',
- 'Windows 98' => 'W98',
- 'Windows CE' => 'WCE',
- 'Windows ME' => 'WME',
- 'Windows Mobile' => 'WMO',
- 'Windows NT' => 'WNT',
- 'Windows Phone' => 'WPH',
- 'Windows RT' => 'WRT',
- 'Windows Server 2003' => 'WS3',
- 'Windows Vista' => 'WVI',
- 'Windows XP' => 'WXP',
- 'Xbox' => 'XBX',
- 'Xubuntu' => 'XBT',
- 'YunOs' => 'YNS',
- 'iOS' => 'IOS',
- 'palmOS' => 'POS',
- 'webOS' => 'WOS'
+ 'Symbian^3' => 'SY3',
+ 'Talkatone' => 'TKT',
+ 'Tizen' => 'TIZ',
+ 'Ubuntu' => 'UBT',
+ 'WebTV' => 'WTV',
+ 'WinWAP' => 'WWP',
+ 'Windows' => 'WIN',
+ 'Windows 2000' => 'W2K',
+ 'Windows 3.1' => 'W31',
+ 'Windows 7' => 'WI7',
+ 'Windows 8' => 'WI8',
+ 'Windows 95' => 'W95',
+ 'Windows 98' => 'W98',
+ 'Windows CE' => 'WCE',
+ 'Windows ME' => 'WME',
+ 'Windows Mobile' => 'WMO',
+ 'Windows NT' => 'WNT',
+ 'Windows Phone' => 'WPH',
+ 'Windows RT' => 'WRT',
+ 'Windows Server 2003' => 'WS3',
+ 'Windows Vista' => 'WVI',
+ 'Windows XP' => 'WXP',
+ 'Xbox' => 'XBX',
+ 'Xubuntu' => 'XBT',
+ 'YunOs' => 'YNS',
+ 'iOS' => 'IOS',
+ 'palmOS' => 'POS',
+ 'webOS' => 'WOS'
);
protected static $desktopOsArray = array('IBM', 'Linux', 'Mac', 'Unix', 'Windows');
public static $osFamilies = array(
- 'Android' => array('AND'),
- 'Apple TV' => array('ATV'),
- 'BlackBerry' => array('BLB'),
- 'Bot' => array('BOT'),
- 'Brew' => array('BMP'),
- 'Chrome OS' => array('COS'),
- 'Firefox OS' => array('FOS'),
- 'Gaming Console' => array('WII', 'PS3'),
- 'Google TV' => array('GTV'),
- 'IBM' => array('OS2'),
- 'iOS' => array('IOS'),
- 'Linux' => array('LIN', 'ARL', 'DEB', 'KNO', 'MIN', 'UBT', 'KBT', 'XBT', 'LBT', 'FED', 'RHT', 'MDR', 'GNT', 'SLW', 'SSE', 'PPY', 'CES', 'BTR', 'YNS', 'PRS'),
- 'Mac' => array('MAC'),
+ 'Android' => array('AND'),
+ 'Apple TV' => array('ATV'),
+ 'BlackBerry' => array('BLB'),
+ 'Bot' => array('BOT'),
+ 'Brew' => array('BMP'),
+ 'Chrome OS' => array('COS'),
+ 'Firefox OS' => array('FOS'),
+ 'Gaming Console' => array('WII', 'PS3'),
+ 'Google TV' => array('GTV'),
+ 'IBM' => array('OS2'),
+ 'iOS' => array('IOS'),
+ 'Linux' => array('LIN', 'ARL', 'DEB', 'KNO', 'MIN', 'UBT', 'KBT', 'XBT', 'LBT', 'FED', 'RHT', 'MDR', 'GNT', 'SLW', 'SSE', 'PPY', 'CES', 'BTR', 'YNS', 'PRS'),
+ 'Mac' => array('MAC'),
'Mobile Gaming Console' => array('PSP', 'NDS', 'XBX'),
- 'Other Mobile' => array('WOS', 'POS', 'QNX', 'SBA', 'TIZ'),
- 'Simulator' => array('TKT', 'WWP'),
- 'Symbian' => array('SYM', 'SYS', 'SY3', 'S60', 'S40', 'SMG'),
- 'Unix' => array('SOS', 'AIX', 'HPX', 'BSD', 'NBS', 'OBS', 'DFB', 'SYL', 'IRI', 'T64'),
- 'WebTV' => array('WTV'),
- 'Windows' => array('WI8', 'WI7', 'WVI', 'WS3', 'WXP', 'W2K', 'WNT', 'WME', 'W98', 'W95', 'WRT', 'W31', 'WIN'),
- 'Windows Mobile' => array('WPH', 'WMO', 'WCE')
+ 'Other Mobile' => array('WOS', 'POS', 'QNX', 'SBA', 'TIZ'),
+ 'Simulator' => array('TKT', 'WWP'),
+ 'Symbian' => array('SYM', 'SYS', 'SY3', 'S60', 'S40', 'SMG'),
+ 'Unix' => array('SOS', 'AIX', 'HPX', 'BSD', 'NBS', 'OBS', 'DFB', 'SYL', 'IRI', 'T64'),
+ 'WebTV' => array('WTV'),
+ 'Windows' => array('WI8', 'WI7', 'WVI', 'WS3', 'WXP', 'W2K', 'WNT', 'WME', 'W98', 'W95', 'WRT', 'W31', 'WIN'),
+ 'Windows Mobile' => array('WPH', 'WMO', 'WCE')
);
public static $browserFamilies = array(
- 'Android Browser' => array('AN'),
+ 'Android Browser' => array('AN'),
'BlackBerry Browser' => array('BB'),
- 'Chrome' => array('CH', 'CM', 'CI', 'CF', 'CR', 'RM'),
- 'Firefox' => array('FF', 'FE', 'SX', 'FB', 'PX', 'MB'),
- 'Internet Explorer' => array('IE', 'IM'),
- 'Konqueror' => array('KO'),
- 'NetFront' => array('NF'),
- 'Nokia Browser' => array('NB'),
- 'Opera' => array('OP', 'OM', 'OI'),
- 'Safari' => array('SF', 'MF')
+ 'Chrome' => array('CH', 'CM', 'CI', 'CF', 'CR', 'RM'),
+ 'Firefox' => array('FF', 'FE', 'SX', 'FB', 'PX', 'MB'),
+ 'Internet Explorer' => array('IE', 'IM'),
+ 'Konqueror' => array('KO'),
+ 'NetFront' => array('NF'),
+ 'Nokia Browser' => array('NB'),
+ 'Opera' => array('OP', 'OM', 'OI'),
+ 'Safari' => array('SF', 'MF')
);
public static $browsers = array(
'AB' => 'ABrowse',
@@ -384,9 +384,9 @@ class UserAgentParserEnhanced
}
$this->os = array(
- 'name' => $this->buildOsName($osRegex['name'], $matches),
+ 'name' => $this->buildOsName($osRegex['name'], $matches),
'short_name' => $short,
- 'version' => $this->buildOsVersion($osRegex['version'], $matches)
+ 'version' => $this->buildOsVersion($osRegex['version'], $matches)
);
if (array_key_exists($this->os['name'], self::$osShorts)) {
@@ -412,9 +412,9 @@ class UserAgentParserEnhanced
}
$this->browser = array(
- 'name' => $this->buildBrowserName($browserRegex['name'], $matches),
+ 'name' => $this->buildBrowserName($browserRegex['name'], $matches),
'short_name' => $short,
- 'version' => $this->buildBrowserVersion($browserRegex['version'], $matches)
+ 'version' => $this->buildBrowserVersion($browserRegex['version'], $matches)
);
}
@@ -439,7 +439,7 @@ class UserAgentParserEnhanced
$this->fullName = $brand;
if (isset($mobileRegex['device'])) {
- $this->device = array_search($mobileRegex['device'],self::$deviceTypes);
+ $this->device = array_search($mobileRegex['device'], self::$deviceTypes);
}
if (isset($mobileRegex['model'])) {
diff --git a/plugins/DevicesDetection/functions.php b/plugins/DevicesDetection/functions.php
index 92a4b3e84e..56be9c7a0e 100644
--- a/plugins/DevicesDetection/functions.php
+++ b/plugins/DevicesDetection/functions.php
@@ -85,12 +85,12 @@ function getDeviceTypeLabel($label)
function getDeviceTypeLogo($label)
{
$deviceTypeLogos = Array(
- "Desktop" => "normal.gif",
- "Smartphone" => "smartphone.png",
- "Tablet" => "tablet.png",
- "Tv" => "tv.png",
+ "Desktop" => "normal.gif",
+ "Smartphone" => "smartphone.png",
+ "Tablet" => "tablet.png",
+ "Tv" => "tv.png",
"Feature phone" => "mobile.gif",
- "Console" => "console.gif");
+ "Console" => "console.gif");
if (!array_key_exists($label, $deviceTypeLogos) || $label == "Unknown") {
$label = 'unknown.gif';
@@ -135,7 +135,7 @@ function getOsFullNameExtended($label)
$os = substr($label, 0, 3);
$ver = substr($label, 4, 15);
$name = UserAgentParserEnhanced::getOsNameFromId($os, $ver);
- if(!empty($name)) {
+ if (!empty($name)) {
return $name;
}
}
@@ -143,7 +143,6 @@ function getOsFullNameExtended($label)
}
-
function getOsLogoExtended($label)
{
$short = substr($label, 0, 3);
diff --git a/plugins/ExamplePlugin/config/local.config.php b/plugins/ExamplePlugin/config/local.config.php
index cf846146e4..5dc4e74add 100644
--- a/plugins/ExamplePlugin/config/local.config.php
+++ b/plugins/ExamplePlugin/config/local.config.php
@@ -1,10 +1,10 @@
<?php
-return array (
- 0 => 1,
- 1 => 'mixed',
- 2 =>
- array (
- 0 => 'a',
- ),
- 'b' => 'c',
+return array(
+ 0 => 1,
+ 1 => 'mixed',
+ 2 =>
+ array(
+ 0 => 'a',
+ ),
+ 'b' => 'c',
);
diff --git a/plugins/ExampleUI/API.php b/plugins/ExampleUI/API.php
index 3555a76776..5827acac67 100644
--- a/plugins/ExampleUI/API.php
+++ b/plugins/ExampleUI/API.php
@@ -53,7 +53,7 @@ class API
$server2 = mt_rand(40, 110);
}
- $value = array('server1' => $server1, 'server2' => $server2);
+ $value = array('server1' => $server1, 'server2' => $server2);
$temperatures[$subPeriod->getLocalizedShortString()] = $value;
}
@@ -103,7 +103,7 @@ class API
foreach ($planetsDataTable->getRows() as $row) {
$logo = sprintf('plugins/ExampleUI/images/icons-planet/%s.png', strtolower($row->getColumn('label')));
- $url = sprintf('http://en.wikipedia.org/wiki/%s', $row->getColumn('label'));
+ $url = sprintf('http://en.wikipedia.org/wiki/%s', $row->getColumn('label'));
$row->addMetadata('logo', $logo);
$row->addMetadata('url', $url);
diff --git a/plugins/ExampleUI/Controller.php b/plugins/ExampleUI/Controller.php
index d6cbdf316a..0b607682bc 100644
--- a/plugins/ExampleUI/Controller.php
+++ b/plugins/ExampleUI/Controller.php
@@ -23,7 +23,7 @@ class Controller extends \Piwik\Controller
public function dataTables()
{
$controllerAction = $this->pluginName . '.' . __FUNCTION__;
- $apiAction = 'ExampleUI.getTemperatures';
+ $apiAction = 'ExampleUI.getTemperatures';
/**
* this is an example how you can make a custom visualization reusable.
@@ -76,9 +76,9 @@ class Controller extends \Piwik\Controller
$view = ViewDataTable::factory(
'graphPie', 'ExampleUI.getPlanetRatios', $controllerAction = 'ExampleUI.pieGraph');
- $view->columns_to_display = array('value');
+ $view->columns_to_display = array('value');
$view->translations['value'] = "times the diameter of Earth";
- $view->show_footer_icons = false;
+ $view->show_footer_icons = false;
$view->visualization_properties->selectable_columns = array("value");
$view->visualization_properties->max_graph_elements = 10;
@@ -103,9 +103,9 @@ class Controller extends \Piwik\Controller
$view = ViewDataTable::factory(
'cloud', 'ExampleUI.getPlanetRatios', $controllerAction = 'ExampleUI.echoSimpleTagClouds');
- $view->columns_to_display = array('label', 'value');
+ $view->columns_to_display = array('label', 'value');
$view->translations['value'] = "times the diameter of Earth";
- $view->show_footer = false;
+ $view->show_footer = false;
echo $view->render();
}
@@ -120,7 +120,7 @@ class Controller extends \Piwik\Controller
'display_logo_instead_of_label',
true
);
- $view->columns_to_display = array('label', 'value');
+ $view->columns_to_display = array('label', 'value');
$view->translations['value'] = "times the diameter of Earth";
echo $view->render();
diff --git a/plugins/ExampleUI/CustomDataTable.php b/plugins/ExampleUI/CustomDataTable.php
index 1d921e6bcd..bfda92a704 100644
--- a/plugins/ExampleUI/CustomDataTable.php
+++ b/plugins/ExampleUI/CustomDataTable.php
@@ -22,12 +22,12 @@ class CustomDataTable
$view->translations['value'] = $value;
$view->translations['label'] = $label;
- $view->filter_sort_column = 'label';
- $view->filter_sort_order = 'asc';
- $view->filter_limit = 24;
- $view->y_axis_unit = '°C'; // useful if the user requests the bar graph
+ $view->filter_sort_column = 'label';
+ $view->filter_sort_order = 'asc';
+ $view->filter_limit = 24;
+ $view->y_axis_unit = '°C'; // useful if the user requests the bar graph
$view->show_exclude_low_population = false;
- $view->show_table_all_columns = false;
+ $view->show_table_all_columns = false;
$view->visualization_properties->setForVisualization(
'Piwik\\Plugins\\CoreVisualizations\\Visualizations\\HtmlTable',
'disable_row_evolution',
diff --git a/plugins/Goals/Goals.php b/plugins/Goals/Goals.php
index 1cff5d8396..cdd67b6cea 100644
--- a/plugins/Goals/Goals.php
+++ b/plugins/Goals/Goals.php
@@ -12,8 +12,8 @@ namespace Piwik\Plugins\Goals;
use Piwik\ArchiveProcessor;
use Piwik\Common;
-use Piwik\Db;
+use Piwik\Db;
use Piwik\Piwik;
use Piwik\Site;
use Piwik\Tracker\GoalManager;
@@ -87,17 +87,17 @@ class Goals extends \Piwik\Plugin
public function getListHooksRegistered()
{
$hooks = array(
- 'AssetManager.getJavaScriptFiles' => 'getJsFiles',
- 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
- 'Site.getSiteAttributes' => 'fetchGoalsFromDb',
- 'ArchiveProcessor.Day.compute' => 'archiveDay',
- 'ArchiveProcessor.Period.compute' => 'archivePeriod',
- 'API.getReportMetadata.end' => 'getReportMetadata',
- 'API.getSegmentsMetadata' => 'getSegmentsMetadata',
- 'WidgetsList.addWidgets' => 'addWidgets',
- 'Menu.Reporting.addItems' => 'addMenus',
- 'SitesManager.deleteSite.end' => 'deleteSiteGoals',
- 'Goals.getReportsWithGoalMetrics' => 'getActualReportsWithGoalMetrics',
+ 'AssetManager.getJavaScriptFiles' => 'getJsFiles',
+ 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
+ 'Site.getSiteAttributes' => 'fetchGoalsFromDb',
+ 'ArchiveProcessor.Day.compute' => 'archiveDay',
+ 'ArchiveProcessor.Period.compute' => 'archivePeriod',
+ 'API.getReportMetadata.end' => 'getReportMetadata',
+ 'API.getSegmentsMetadata' => 'getSegmentsMetadata',
+ 'WidgetsList.addWidgets' => 'addWidgets',
+ 'Menu.Reporting.addItems' => 'addMenus',
+ 'SitesManager.deleteSite.end' => 'deleteSiteGoals',
+ 'Goals.getReportsWithGoalMetrics' => 'getActualReportsWithGoalMetrics',
'Visualization.getReportDisplayProperties' => 'getReportDisplayProperties',
'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys'
);
diff --git a/plugins/ImageGraph/API.php b/plugins/ImageGraph/API.php
index e9a85905a4..4ee71fde95 100644
--- a/plugins/ImageGraph/API.php
+++ b/plugins/ImageGraph/API.php
@@ -76,7 +76,7 @@ class API
);
static private $DEFAULT_GRAPH_TYPE_OVERRIDE = array(
- 'UserSettings_getPlugin' => array(
+ 'UserSettings_getPlugin' => array(
false // override if !$isMultiplePeriod
=> StaticGraph::GRAPH_TYPE_HORIZONTAL_BAR,
),
diff --git a/plugins/ImageGraph/ImageGraph.php b/plugins/ImageGraph/ImageGraph.php
index 7240159a74..ee8358985e 100644
--- a/plugins/ImageGraph/ImageGraph.php
+++ b/plugins/ImageGraph/ImageGraph.php
@@ -30,7 +30,7 @@ class ImageGraph extends \Piwik\Plugin
public function getInformation()
{
$suffix = ' Debug: <a href="' . Url::getCurrentQueryStringWithParametersModified(
- array('module' => 'ImageGraph', 'action' => 'index')) . '">All images</a>';
+ array('module' => 'ImageGraph', 'action' => 'index')) . '">All images</a>';
$info = parent::getInformation();
$info['description'] .= ' ' . $suffix;
return $info;
diff --git a/plugins/ImageGraph/StaticGraph.php b/plugins/ImageGraph/StaticGraph.php
index 1b908794fd..bdc59dc629 100644
--- a/plugins/ImageGraph/StaticGraph.php
+++ b/plugins/ImageGraph/StaticGraph.php
@@ -13,8 +13,8 @@ namespace Piwik\Plugins\ImageGraph;
use Exception;
use pData;
-use pImage;
+use pImage;
use Piwik\Loader;
use Piwik\SettingsPiwik;
diff --git a/plugins/ImageGraph/StaticGraph/Evolution.php b/plugins/ImageGraph/StaticGraph/Evolution.php
index 39eb88cabd..f1b1240364 100644
--- a/plugins/ImageGraph/StaticGraph/Evolution.php
+++ b/plugins/ImageGraph/StaticGraph/Evolution.php
@@ -11,7 +11,6 @@
namespace Piwik\Plugins\ImageGraph\StaticGraph;
-
/**
*
* @package StaticGraph
diff --git a/plugins/ImageGraph/StaticGraph/HorizontalBar.php b/plugins/ImageGraph/StaticGraph/HorizontalBar.php
index 49fc5c642b..cc3133dbe5 100644
--- a/plugins/ImageGraph/StaticGraph/HorizontalBar.php
+++ b/plugins/ImageGraph/StaticGraph/HorizontalBar.php
@@ -11,7 +11,6 @@
namespace Piwik\Plugins\ImageGraph\StaticGraph;
-
/**
*
* @package StaticGraph
@@ -117,10 +116,10 @@ class HorizontalBar extends GridGraph
$gridLeftMarginWithoutLabels = $this->getGridLeftMargin($horizontalGraph = true, $withLabel = false);
$labelWidthLimit =
$this->width
- - $gridLeftMarginWithoutLabels
- - $gridRightMargin
- - $paddingWidth
- - $minGraphSize;
+ - $gridLeftMarginWithoutLabels
+ - $gridRightMargin
+ - $paddingWidth
+ - $minGraphSize;
// truncate labels if needed
foreach ($this->abscissaSeries as &$label) {
@@ -170,10 +169,10 @@ class HorizontalBar extends GridGraph
$logoYPosition =
($logoInterleave * $i)
- + $this->getGridTopMargin(true, $verticalLegend)
- + $graphData['Axis'][1]['Margin']
- - $logoHeight / 2
- + 1;
+ + $this->getGridTopMargin(true, $verticalLegend)
+ + $graphData['Axis'][1]['Margin']
+ - $logoHeight / 2
+ + 1;
if (method_exists($this->pImage, $drawingFunction)) {
$this->pImage->$drawingFunction(
diff --git a/plugins/ImageGraph/StaticGraph/Pie.php b/plugins/ImageGraph/StaticGraph/Pie.php
index 200b273293..0f4b4cec9b 100644
--- a/plugins/ImageGraph/StaticGraph/Pie.php
+++ b/plugins/ImageGraph/StaticGraph/Pie.php
@@ -11,7 +11,6 @@
namespace Piwik\Plugins\ImageGraph\StaticGraph;
-
/**
*
* @package StaticGraph
diff --git a/plugins/ImageGraph/StaticGraph/VerticalBar.php b/plugins/ImageGraph/StaticGraph/VerticalBar.php
index 273ade455b..a6456df02b 100644
--- a/plugins/ImageGraph/StaticGraph/VerticalBar.php
+++ b/plugins/ImageGraph/StaticGraph/VerticalBar.php
@@ -11,7 +11,6 @@
namespace Piwik\Plugins\ImageGraph\StaticGraph;
-
/**
*
* @package StaticGraph
diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php
index 298cb0d791..2f9fdcba37 100644
--- a/plugins/Installation/Controller.php
+++ b/plugins/Installation/Controller.php
@@ -243,7 +243,7 @@ class Controller extends \Piwik\Controller\Admin
$error = true;
}
- if (!DbHelper::isDatabaseConnectionUTF8()) {
+ if (!DbHelper::isDatabaseConnectionUTF8()) {
$dbInfos = $this->session->db_infos;
$dbInfos['charset'] = 'utf8';
$this->session->db_infos = $dbInfos;
@@ -484,7 +484,7 @@ class Controller extends \Piwik\Controller\Admin
$configPath = Config::getLocalConfigPath();
if (!file_exists($configPath)) {
- $this->addTrustedHosts();
+ $this->addTrustedHosts();
$this->writeConfigFileFromSession();
}
diff --git a/plugins/Installation/FormDatabaseSetup.php b/plugins/Installation/FormDatabaseSetup.php
index a2551f1e6e..920e33bff3 100644
--- a/plugins/Installation/FormDatabaseSetup.php
+++ b/plugins/Installation/FormDatabaseSetup.php
@@ -55,7 +55,7 @@ class FormDatabaseSetup extends QuickForm2
$requiredPrivileges = Rule_checkUserPrivileges::getRequiredPrivilegesPretty();
$user->addRule('checkUserPrivileges',
Piwik_Translate('Installation_InsufficientPrivilegesMain', $requiredPrivileges . '<br/><br/>') .
- Piwik_Translate('Installation_InsufficientPrivilegesHelp'));
+ Piwik_Translate('Installation_InsufficientPrivilegesHelp'));
$this->addElement('password', 'password')
->setLabel(Piwik_Translate('General_Password'));
@@ -310,7 +310,7 @@ class FormDatabaseSetup_Rule_checkValidFilename extends HTML_QuickForm2_Rule
{
$prefix = $this->owner->getValue();
return empty($prefix)
- || Filesystem::isValidFilename($prefix);
+ || Filesystem::isValidFilename($prefix);
}
}
diff --git a/plugins/Installation/FormFirstWebsiteSetup.php b/plugins/Installation/FormFirstWebsiteSetup.php
index 39b7c0ad70..e509c3096f 100644
--- a/plugins/Installation/FormFirstWebsiteSetup.php
+++ b/plugins/Installation/FormFirstWebsiteSetup.php
@@ -10,6 +10,7 @@
*/
namespace Piwik\Plugins\Installation;
+
use HTML_QuickForm2_DataSource_Array;
use HTML_QuickForm2_Factory;
use HTML_QuickForm2_Rule;
diff --git a/plugins/Installation/Installation.php b/plugins/Installation/Installation.php
index 114352f232..18095125fc 100644
--- a/plugins/Installation/Installation.php
+++ b/plugins/Installation/Installation.php
@@ -63,7 +63,7 @@ class Installation extends \Piwik\Plugin
$step = Common::getRequestVar('action', 'welcome', 'string');
$controller = $this->getInstallationController();
- $isActionWhiteListed = in_array($step, array( 'saveLanguage', 'getBaseCss'));
+ $isActionWhiteListed = in_array($step, array('saveLanguage', 'getBaseCss'));
if (in_array($step, array_keys($controller->getInstallationSteps()))
|| $isActionWhiteListed
) {
diff --git a/plugins/LanguagesManager/API.php b/plugins/LanguagesManager/API.php
index 2bc178d054..64a58ccdf2 100644
--- a/plugins/LanguagesManager/API.php
+++ b/plugins/LanguagesManager/API.php
@@ -55,8 +55,8 @@ class API
public function isLanguageAvailable($languageCode)
{
return $languageCode !== false
- && Filesystem::isValidFilename($languageCode)
- && in_array($languageCode, $this->getAvailableLanguages());
+ && Filesystem::isValidFilename($languageCode)
+ && in_array($languageCode, $this->getAvailableLanguages());
}
/**
@@ -97,10 +97,10 @@ class API
$data = file_get_contents(sprintf('%s/lang/%s.json', PIWIK_INCLUDE_PATH, $filename));
$translations = json_decode($data, true);
- $intersect = function($array, $array2) {
+ $intersect = function ($array, $array2) {
$res = $array;
- foreach($array as $module => $keys) {
- if(!isset($array2[$module])) {
+ foreach ($array as $module => $keys) {
+ if (!isset($array2[$module])) {
unset($res[$module]);
} else {
$res[$module] = array_intersect_key($res[$module], array_filter($array2[$module], 'strlen'));
@@ -164,7 +164,7 @@ class API
$translations = json_decode($data, true);
$languageInfo = array();
foreach ($translations as $module => $keys) {
- foreach($keys as $key => $value) {
+ foreach ($keys as $key => $value) {
$languageInfo[] = array(
'label' => sprintf("%s_%s", $module, $key),
'value' => $value
@@ -199,7 +199,7 @@ class API
$translations = json_decode($data, true);
$languageInfo = array();
foreach ($translations as $module => $keys) {
- foreach($keys as $key => $value) {
+ foreach ($keys as $key => $value) {
$languageInfo[] = array(
'label' => sprintf("%s_%s", $module, $key),
'value' => $value
@@ -239,9 +239,9 @@ class API
}
$paramsBind = array($login, $languageCode, $languageCode);
Db::query('INSERT INTO ' . Common::prefixTable('user_language') .
- ' (login, language)
- VALUES (?,?)
- ON DUPLICATE KEY UPDATE language=?',
+ ' (login, language)
+ VALUES (?,?)
+ ON DUPLICATE KEY UPDATE language=?',
$paramsBind);
return true;
}
diff --git a/plugins/LanguagesManager/LanguagesManager.php b/plugins/LanguagesManager/LanguagesManager.php
index 2a4690016c..f46ddacfe6 100644
--- a/plugins/LanguagesManager/LanguagesManager.php
+++ b/plugins/LanguagesManager/LanguagesManager.php
@@ -15,8 +15,8 @@ use Exception;
use Piwik\Common;
use Piwik\Config;
use Piwik\Cookie;
-use Piwik\Db;
+use Piwik\Db;
use Piwik\Piwik;
use Piwik\Translate;
use Piwik\View;
diff --git a/plugins/Live/API.php b/plugins/Live/API.php
index cc9e055b4e..065521a263 100644
--- a/plugins/Live/API.php
+++ b/plugins/Live/API.php
@@ -62,7 +62,7 @@ class API
const VISITOR_PROFILE_MAX_VISITS_TO_AGGREGATE = 100;
const VISITOR_PROFILE_MAX_VISITS_TO_SHOW = 10;
const VISITOR_PROFILE_DATE_FORMAT = '%day% %shortMonth% %longYear%';
-
+
static private $instance = null;
/**
@@ -168,7 +168,7 @@ class API
/**
* Returns an array describing a visitor using her last visits (uses a maximum of 100).
- *
+ *
* @param int $idSite Site ID
* @param string|false $visitorId The ID of the visitor whose profile to retrieve.
* @param string|false $segment
@@ -185,9 +185,9 @@ class API
$newSegment = ($segment === false ? '' : $segment . ';') . 'visitorId==' . $visitorId;
$visits = $this->getLastVisitsDetails($idSite, $period = false, $date = false, $newSegment,
- $filter_limit = self::VISITOR_PROFILE_MAX_VISITS_TO_AGGREGATE,
- $filter_offset = false, $overrideVisitorId = false,
- $minTimestamp = false);
+ $filter_limit = self::VISITOR_PROFILE_MAX_VISITS_TO_AGGREGATE,
+ $filter_offset = false, $overrideVisitorId = false,
+ $minTimestamp = false);
if ($visits->getRowsCount() == 0) {
return array();
}
@@ -244,13 +244,13 @@ class API
$result['totalRevenueByGoal'][$idGoalKey] += $action['revenue'];
}
} else if ($action['type'] == Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER // handle ecommerce order
- && $isEcommerceEnabled
+ && $isEcommerceEnabled
) {
++$result['totalEcommerceConversions'];
$result['totalEcommerceRevenue'] += $action['revenue'];
$result['totalEcommerceItems'] += $action['items'];
} else if ($action['type'] == Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_CART // handler abandoned cart
- && $isEcommerceEnabled
+ && $isEcommerceEnabled
) {
++$result['totalAbandonedCarts'];
$result['totalAbandonedCartsRevenue'] += $action['revenue'];
@@ -294,18 +294,18 @@ class API
// transform country/continents/search keywords into something that will look good in XML
$result['countries'] = $result['continents'] = $result['searches'] = array();
foreach ($countries as $countryCode => $nbVisits) {
- $result['countries'][] = array('country' => $countryCode,
- 'nb_visits' => $nbVisits,
- 'flag' => \Piwik\Plugins\UserCountry\getFlagFromCode($countryCode),
+ $result['countries'][] = array('country' => $countryCode,
+ 'nb_visits' => $nbVisits,
+ 'flag' => \Piwik\Plugins\UserCountry\getFlagFromCode($countryCode),
'prettyName' => \Piwik\Plugins\UserCountry\countryTranslate($countryCode));
}
foreach ($continents as $continentCode => $nbVisits) {
- $result['continents'][] = array('continent' => $continentCode,
- 'nb_visits' => $nbVisits,
+ $result['continents'][] = array('continent' => $continentCode,
+ 'nb_visits' => $nbVisits,
'prettyName' => \Piwik\Plugins\UserCountry\continentTranslate($continentCode));
}
foreach ($siteSearchKeywords as $keyword => $searchCount) {
- $result['searches'][] = array('keyword' => $keyword,
+ $result['searches'][] = array('keyword' => $keyword,
'searches' => $searchCount);
}
@@ -377,7 +377,7 @@ class API
/**
* Returns the visitor ID of the most recent visit.
- *
+ *
* @param int $idSite
* @param string|false $segment
* @return string
@@ -402,7 +402,7 @@ class API
/**
* Returns the ID of a visitor that is adjacent to another visitor (by time of last action)
* in the log_visit table.
- *
+ *
* @param int $idSite The ID of the site whose visits should be looked at.
* @param string $visitorId The ID of the visitor to get an adjacent visitor for.
* @param string $visitLastActionTime The last action time of the latest visit for $visitorId.
@@ -448,7 +448,7 @@ class API
/**
* Returns a summary for an important visit. Used to describe the first & last visits of a visitor.
- *
+ *
* @param Row $visit
* @return array
*/
@@ -458,17 +458,17 @@ class API
$serverDate = $visit->getColumn('serverDate');
return array(
- 'date' => $serverDate,
- 'prettyDate' => Date::factory($serverDate)->getLocalized(self::VISITOR_PROFILE_DATE_FORMAT),
- 'daysAgo' => (int)Date::secondsToDays($today->getTimestamp() - Date::factory($serverDate)->getTimestamp()),
- 'referrerType' => $visit->getColumn('referrerType'),
+ 'date' => $serverDate,
+ 'prettyDate' => Date::factory($serverDate)->getLocalized(self::VISITOR_PROFILE_DATE_FORMAT),
+ 'daysAgo' => (int)Date::secondsToDays($today->getTimestamp() - Date::factory($serverDate)->getTimestamp()),
+ 'referrerType' => $visit->getColumn('referrerType'),
'referralSummary' => self::getReferrerSummaryForVisit($visit),
);
}
/**
* Returns a summary for a visit's referral.
- *
+ *
* @param Row $visit
* @return bool|mixed|string
* @ignore
diff --git a/plugins/Live/Controller.php b/plugins/Live/Controller.php
index 1ed4bf9c3e..3c87d8897b 100644
--- a/plugins/Live/Controller.php
+++ b/plugins/Live/Controller.php
@@ -165,10 +165,10 @@ class Controller extends \Piwik\Controller
{
$view = new View('@Live/getSingleVisitSummary.twig');
$visits = Request::processRequest('Live.getLastVisitsDetails', array(
- 'segment' => 'visitId==' . Common::getRequestVar('visitId'),
- 'period' => false,
- 'date' => false
- ));
+ 'segment' => 'visitId==' . Common::getRequestVar('visitId'),
+ 'period' => false,
+ 'date' => false
+ ));
$view->visitData = $visits->getFirstRow()->getColumns();
$view->visitReferralSummary = API::getReferrerSummaryForVisit($visits->getFirstRow());
$view->showLocation = true;
@@ -180,12 +180,12 @@ class Controller extends \Piwik\Controller
public function getVisitList()
{
$nextVisits = Request::processRequest('Live.getLastVisitsDetails', array(
- 'segment' => self::getSegmentWithVisitorId(),
- 'filter_limit' => API::VISITOR_PROFILE_MAX_VISITS_TO_SHOW,
- 'disable_generic_filters' => 1,
- 'period' => false,
- 'date' => false
- ));
+ 'segment' => self::getSegmentWithVisitorId(),
+ 'filter_limit' => API::VISITOR_PROFILE_MAX_VISITS_TO_SHOW,
+ 'disable_generic_filters' => 1,
+ 'period' => false,
+ 'date' => false
+ ));
if (empty($nextVisits)) {
return;
@@ -201,38 +201,38 @@ class Controller extends \Piwik\Controller
private function getVisitorProfileExportLink()
{
return Url::getCurrentQueryStringWithParametersModified(array(
- 'module' => 'API',
- 'action' => 'index',
- 'method' => 'Live.getVisitorProfile',
- 'format' => 'XML',
- 'expanded' => 1
- ));
+ 'module' => 'API',
+ 'action' => 'index',
+ 'method' => 'Live.getVisitorProfile',
+ 'format' => 'XML',
+ 'expanded' => 1
+ ));
}
private function setWidgetizedVisitorProfileUrl($view)
{
if (PluginsManager::getInstance()->isPluginLoaded('Widgetize')) {
$view->widgetizedLink = Url::getCurrentQueryStringWithParametersModified(array(
- 'module' => 'Widgetize',
- 'action' => 'iframe',
- 'moduleToWidgetize' => 'Live',
- 'actionToWidgetize' => 'getVisitorProfilePopup'
- ));
+ 'module' => 'Widgetize',
+ 'action' => 'iframe',
+ 'moduleToWidgetize' => 'Live',
+ 'actionToWidgetize' => 'getVisitorProfilePopup'
+ ));
}
}
private function getUserCountryMapUrlForVisitorProfile()
{
$params = array(
- 'module' => 'UserCountryMap',
- 'action' => 'realtimeMap',
- 'segment' => self::getSegmentWithVisitorId(),
- 'visitorId' => false,
- 'changeVisitAlpha' => 0,
- 'removeOldVisits' => 0,
- 'realtimeWindow' => 'false',
- 'showFooterMessage' => 0,
- 'showDateTime' => 0,
+ 'module' => 'UserCountryMap',
+ 'action' => 'realtimeMap',
+ 'segment' => self::getSegmentWithVisitorId(),
+ 'visitorId' => false,
+ 'changeVisitAlpha' => 0,
+ 'removeOldVisits' => 0,
+ 'realtimeWindow' => 'false',
+ 'showFooterMessage' => 0,
+ 'showDateTime' => 0,
'doNotRefreshVisits' => 1
);
return Url::getCurrentQueryStringWithParametersModified($params);
diff --git a/plugins/Live/Live.php b/plugins/Live/Live.php
index 47c9799076..09d6f092c3 100644
--- a/plugins/Live/Live.php
+++ b/plugins/Live/Live.php
@@ -101,12 +101,12 @@ class Live extends \Piwik\Plugin
),
'footer_icons' => array(
array(
- 'class' => 'tableAllColumnsSwitch',
+ 'class' => 'tableAllColumnsSwitch',
'buttons' => array(
array(
- 'id' => 'Piwik\\Plugins\\Live\\VisitorLog',
+ 'id' => 'Piwik\\Plugins\\Live\\VisitorLog',
'title' => Piwik_Translate('Live_LinkVisitorLog'),
- 'icon' => 'plugins/Zeitgeist/images/table.png'
+ 'icon' => 'plugins/Zeitgeist/images/table.png'
)
)
)
diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php
index 1bcbc1a84c..5b761724c6 100644
--- a/plugins/Login/Controller.php
+++ b/plugins/Login/Controller.php
@@ -49,7 +49,7 @@ class Controller extends \Piwik\Controller
$passwordLen = strlen($password) / 2;
$hash = Common::hash(
$userInfo . substr($password, 0, $passwordLen)
- . SettingsPiwik::getSalt() . substr($password, $passwordLen)
+ . SettingsPiwik::getSalt() . substr($password, $passwordLen)
);
return $hash;
}
@@ -287,10 +287,10 @@ class Controller extends \Piwik\Controller
$mail->addTo($email, $login);
$mail->setSubject(Piwik_Translate('Login_MailTopicPasswordChange'));
$bodyText = str_replace(
- '\n',
- "\n",
- sprintf(Piwik_Translate('Login_MailPasswordChangeBody'), $login, $ip, $url)
- ) . "\n";
+ '\n',
+ "\n",
+ sprintf(Piwik_Translate('Login_MailPasswordChangeBody'), $login, $ip, $url)
+ ) . "\n";
$mail->setBodyText($bodyText);
$fromEmailName = Config::getInstance()->General['login_password_recovery_email_name'];
diff --git a/plugins/Login/Login.php b/plugins/Login/Login.php
index 7e21c339f5..5a55e33f5e 100644
--- a/plugins/Login/Login.php
+++ b/plugins/Login/Login.php
@@ -32,10 +32,10 @@ class Login extends \Piwik\Plugin
public function getListHooksRegistered()
{
$hooks = array(
- 'Request.initAuthenticationObject' => 'initAuthenticationObject',
- 'User.isNotAuthorized' => 'noAccess',
- 'API.Request.authenticate' => 'ApiRequestAuthenticate',
- 'Login.initSession' => 'initSession',
+ 'Request.initAuthenticationObject' => 'initAuthenticationObject',
+ 'User.isNotAuthorized' => 'noAccess',
+ 'API.Request.authenticate' => 'ApiRequestAuthenticate',
+ 'Login.initSession' => 'initSession',
);
return $hooks;
}
diff --git a/plugins/MobileMessaging/API.php b/plugins/MobileMessaging/API.php
index 38bd6265cc..538cbee1cc 100644
--- a/plugins/MobileMessaging/API.php
+++ b/plugins/MobileMessaging/API.php
@@ -11,7 +11,6 @@
namespace Piwik\Plugins\MobileMessaging;
use Piwik\Common;
-
use Piwik\Piwik;
use Piwik\Plugins\MobileMessaging\SMSProvider;
use Piwik\Plugins\ScheduledReports\API as APIScheduledReports;
@@ -69,9 +68,9 @@ class API
$settings = $this->getCredentialManagerSettings();
return array(
MobileMessaging::PROVIDER_OPTION =>
- isset($settings[MobileMessaging::PROVIDER_OPTION]) ? $settings[MobileMessaging::PROVIDER_OPTION] : null,
+ isset($settings[MobileMessaging::PROVIDER_OPTION]) ? $settings[MobileMessaging::PROVIDER_OPTION] : null,
MobileMessaging::API_KEY_OPTION =>
- isset($settings[MobileMessaging::API_KEY_OPTION]) ? $settings[MobileMessaging::API_KEY_OPTION] : null,
+ isset($settings[MobileMessaging::API_KEY_OPTION]) ? $settings[MobileMessaging::API_KEY_OPTION] : null,
);
}
diff --git a/plugins/MobileMessaging/MobileMessaging.php b/plugins/MobileMessaging/MobileMessaging.php
index 5139235b8c..bca9f4a2e9 100644
--- a/plugins/MobileMessaging/MobileMessaging.php
+++ b/plugins/MobileMessaging/MobileMessaging.php
@@ -67,9 +67,9 @@ class MobileMessaging extends \Piwik\Plugin
public function getListHooksRegistered()
{
return array(
- 'Menu.Admin.addItems' => 'addMenu',
- 'AssetManager.getJavaScriptFiles' => 'getJsFiles',
- 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
+ 'Menu.Admin.addItems' => 'addMenu',
+ 'AssetManager.getJavaScriptFiles' => 'getJsFiles',
+ 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
'ScheduledReports.getReportParameters' => 'getReportParameters',
'ScheduledReports.validateReportParameters' => 'validateReportParameters',
'ScheduledReports.getReportMetadata' => 'getReportMetadata',
diff --git a/plugins/MobileMessaging/ReportRenderer/Sms.php b/plugins/MobileMessaging/ReportRenderer/Sms.php
index 6e2ede2c94..887ae15fe9 100644
--- a/plugins/MobileMessaging/ReportRenderer/Sms.php
+++ b/plugins/MobileMessaging/ReportRenderer/Sms.php
@@ -70,21 +70,21 @@ class Sms extends ReportRenderer
$evolutionMetrics[] = $metricSettings[API::METRIC_EVOLUTION_COL_NAME_KEY];
}
- $floatRegex = self::FLOAT_REGEXP;
+ $floatRegex = self::FLOAT_REGEXP;
// no decimal for all metrics to shorten SMS content (keeps the monetary sign for revenue metrics)
$reportData->filter(
'ColumnCallbackReplace',
array(
- array_merge(array_keys($multiSitesAPIMetrics), $evolutionMetrics),
- function($value) use ($floatRegex) {
- return preg_replace_callback(
- $floatRegex,
- function($matches) {
- return round($matches[0]);
- },
- $value
- );
- }
+ array_merge(array_keys($multiSitesAPIMetrics), $evolutionMetrics),
+ function ($value) use ($floatRegex) {
+ return preg_replace_callback(
+ $floatRegex,
+ function ($matches) {
+ return round($matches[0]);
+ },
+ $value
+ );
+ }
)
);
@@ -95,11 +95,11 @@ class Sms extends ReportRenderer
$reportData->filter(
'ColumnCallbackReplace',
array(
- $evolutionMetrics,
- function($value) use ($floatRegex) {
- $matched = preg_match($floatRegex, $value, $matches);
- return $matched ? sprintf("%+d",$matches[0]) : $value;
- }
+ $evolutionMetrics,
+ function ($value) use ($floatRegex) {
+ $matched = preg_match($floatRegex, $value, $matches);
+ return $matched ? sprintf("%+d", $matches[0]) : $value;
+ }
)
);
diff --git a/plugins/MultiSites/API.php b/plugins/MultiSites/API.php
index 4fb01d3fbf..d92af8e82c 100755
--- a/plugins/MultiSites/API.php
+++ b/plugins/MultiSites/API.php
@@ -314,7 +314,9 @@ class API
'ColumnCallbackDeleteRow',
array(
self::NB_VISITS_METRIC,
- function($value) { return $value != 0; }
+ function ($value) {
+ return $value != 0;
+ }
)
);
}
diff --git a/plugins/MultiSites/MultiSites.php b/plugins/MultiSites/MultiSites.php
index 760b10ae50..54071e129b 100644
--- a/plugins/MultiSites/MultiSites.php
+++ b/plugins/MultiSites/MultiSites.php
@@ -11,7 +11,6 @@
namespace Piwik\Plugins\MultiSites;
-
/**
*
* @package MultiSites
diff --git a/plugins/Overlay/Controller.php b/plugins/Overlay/Controller.php
index 1ce95ee6cc..5abfcd29f8 100644
--- a/plugins/Overlay/Controller.php
+++ b/plugins/Overlay/Controller.php
@@ -67,11 +67,11 @@ class Controller extends \Piwik\Controller
$label = implode('>', $path);
$request = new Request(
'method=Actions.getPageUrls'
- . '&idSite=' . urlencode($idSite)
- . '&date=' . urlencode($date)
- . '&period=' . urlencode($period)
- . '&label=' . urlencode($label)
- . '&format=original'
+ . '&idSite=' . urlencode($idSite)
+ . '&date=' . urlencode($date)
+ . '&period=' . urlencode($period)
+ . '&label=' . urlencode($label)
+ . '&format=original'
);
$dataTable = $request->process();
diff --git a/plugins/PrivacyManager/LogDataPurger.php b/plugins/PrivacyManager/LogDataPurger.php
index 5c3247e7e4..5ebabd9113 100755
--- a/plugins/PrivacyManager/LogDataPurger.php
+++ b/plugins/PrivacyManager/LogDataPurger.php
@@ -11,8 +11,8 @@
namespace Piwik\Plugins\PrivacyManager;
use Piwik\Common;
-use Piwik\Date;
+use Piwik\Date;
use Piwik\Db;
use Piwik\Log;
diff --git a/plugins/PrivacyManager/PrivacyManager.php b/plugins/PrivacyManager/PrivacyManager.php
index baf451c7a5..006afd77cd 100644
--- a/plugins/PrivacyManager/PrivacyManager.php
+++ b/plugins/PrivacyManager/PrivacyManager.php
@@ -16,8 +16,8 @@ use Piwik\Config;
use Piwik\Date;
use Piwik\Db;
use Piwik\Metrics;
-use Piwik\Piwik;
+use Piwik\Piwik;
use Piwik\Plugins\Goals\Archiver;
use Piwik\ScheduledTask;
use Piwik\ScheduledTime\Daily;
diff --git a/plugins/PrivacyManager/ReportsPurger.php b/plugins/PrivacyManager/ReportsPurger.php
index df023999d4..b21c06fb4f 100755
--- a/plugins/PrivacyManager/ReportsPurger.php
+++ b/plugins/PrivacyManager/ReportsPurger.php
@@ -248,7 +248,7 @@ class ReportsPurger
$toRemoveMonth = (int)$toRemoveDate->toString('m');
return $reportDateYear < $toRemoveYear
- || ($reportDateYear == $toRemoveYear && $reportDateMonth <= $toRemoveMonth);
+ || ($reportDateYear == $toRemoveYear && $reportDateMonth <= $toRemoveMonth);
}
private function getNumericTableDeleteCount($table)
diff --git a/plugins/Provider/Provider.php b/plugins/Provider/Provider.php
index 61e65faa93..cce4cb8533 100644
--- a/plugins/Provider/Provider.php
+++ b/plugins/Provider/Provider.php
@@ -14,8 +14,8 @@ use Exception;
use Piwik\ArchiveProcessor;
use Piwik\Common;
use Piwik\Db;
-use Piwik\FrontController;
+use Piwik\FrontController;
use Piwik\IP;
use Piwik\WidgetsList;
diff --git a/plugins/Provider/functions.php b/plugins/Provider/functions.php
index 51a85e15d1..480cfbe3e0 100644
--- a/plugins/Provider/functions.php
+++ b/plugins/Provider/functions.php
@@ -65,15 +65,15 @@ function getHostnameUrl($in)
* @param string $in hostname
* @return string Real ISP name, IP (if IP address didn't resolve), or Unknown
*/
-function getPrettyProviderName( $in )
+function getPrettyProviderName($in)
{
$providerName = getHostnameName($in);
$prettyNames = Common::getProviderNames();
- if(is_array($prettyNames)
- && array_key_exists(strtolower($providerName), $prettyNames))
- {
+ if (is_array($prettyNames)
+ && array_key_exists(strtolower($providerName), $prettyNames)
+ ) {
$providerName = $prettyNames[strtolower($providerName)];
}
diff --git a/plugins/Referrers/API.php b/plugins/Referrers/API.php
index 32d5c03db9..57983497f5 100644
--- a/plugins/Referrers/API.php
+++ b/plugins/Referrers/API.php
@@ -81,7 +81,7 @@ class API
* @return DataTable
*/
public function getReferrerType($idSite, $period, $date, $segment = false, $typeReferrer = false,
- $idSubtable = false, $expanded = false)
+ $idSubtable = false, $expanded = false)
{
// if idSubtable is supplied, interpret idSubtable as referrer type and return correct report
if ($idSubtable !== false) {
@@ -305,7 +305,9 @@ class API
$dataTable = $this->getDataTable(Archiver::WEBSITES_RECORD_NAME, $idSite, $period, $date, $segment, $expanded = false, $idSubtable);
// the htmlspecialchars_decode call is for BC for before 1.1
// as the Referrer URL was previously encoded in the log tables, but is now recorded raw
- $dataTable->queueFilter('ColumnCallbackAddMetadata', array('label', 'url', function($label) { return htmlspecialchars_decode($label); }));
+ $dataTable->queueFilter('ColumnCallbackAddMetadata', array('label', 'url', function ($label) {
+ return htmlspecialchars_decode($label);
+ }));
$dataTable->queueFilter('ColumnCallbackReplace', array('label', __NAMESPACE__ . '\getPathFromUrl'));
return $dataTable;
}
diff --git a/plugins/Referrers/Archiver.php b/plugins/Referrers/Archiver.php
index 8601ff18c8..9255efc9d8 100644
--- a/plugins/Referrers/Archiver.php
+++ b/plugins/Referrers/Archiver.php
@@ -29,7 +29,7 @@ class Archiver extends PluginsArchiver
const METRIC_DISTINCT_CAMPAIGN_RECORD_NAME = 'Referrers_distinctCampaigns';
const METRIC_DISTINCT_WEBSITE_RECORD_NAME = 'Referrers_distinctWebsites';
const METRIC_DISTINCT_URLS_RECORD_NAME = 'Referrers_distinctWebsitesUrls';
-
+
protected $columnToSortByBeforeTruncation;
protected $maximumRowsInDataTableLevelZero;
protected $maximumRowsInSubDataTable;
@@ -45,7 +45,7 @@ class Archiver extends PluginsArchiver
// Reading pre 2.0 config file settings
$this->maximumRowsInDataTableLevelZero = @Config::getInstance()->General['datatable_archiving_maximum_rows_referers'];
$this->maximumRowsInSubDataTable = @Config::getInstance()->General['datatable_archiving_maximum_rows_subtable_referers'];
- if(empty($this->maximumRowsInDataTableLevelZero)) {
+ if (empty($this->maximumRowsInDataTableLevelZero)) {
$this->maximumRowsInDataTableLevelZero = Config::getInstance()->General['datatable_archiving_maximum_rows_referrers'];
$this->maximumRowsInSubDataTable = Config::getInstance()->General['datatable_archiving_maximum_rows_subtable_referrers'];
}
@@ -239,25 +239,25 @@ class Archiver extends PluginsArchiver
$mappingFromArchiveName = array(
self::METRIC_DISTINCT_SEARCH_ENGINE_RECORD_NAME =>
- array('typeCountToUse' => 'level0',
- 'nameTableToUse' => self::SEARCH_ENGINES_RECORD_NAME,
- ),
+ array('typeCountToUse' => 'level0',
+ 'nameTableToUse' => self::SEARCH_ENGINES_RECORD_NAME,
+ ),
self::METRIC_DISTINCT_KEYWORD_RECORD_NAME =>
- array('typeCountToUse' => 'level0',
- 'nameTableToUse' => self::KEYWORDS_RECORD_NAME,
- ),
+ array('typeCountToUse' => 'level0',
+ 'nameTableToUse' => self::KEYWORDS_RECORD_NAME,
+ ),
self::METRIC_DISTINCT_CAMPAIGN_RECORD_NAME =>
- array('typeCountToUse' => 'level0',
- 'nameTableToUse' => self::CAMPAIGNS_RECORD_NAME,
- ),
+ array('typeCountToUse' => 'level0',
+ 'nameTableToUse' => self::CAMPAIGNS_RECORD_NAME,
+ ),
self::METRIC_DISTINCT_WEBSITE_RECORD_NAME =>
- array('typeCountToUse' => 'level0',
- 'nameTableToUse' => self::WEBSITES_RECORD_NAME,
- ),
+ array('typeCountToUse' => 'level0',
+ 'nameTableToUse' => self::WEBSITES_RECORD_NAME,
+ ),
self::METRIC_DISTINCT_URLS_RECORD_NAME =>
- array('typeCountToUse' => 'recursive',
- 'nameTableToUse' => self::WEBSITES_RECORD_NAME,
- ),
+ array('typeCountToUse' => 'recursive',
+ 'nameTableToUse' => self::WEBSITES_RECORD_NAME,
+ ),
);
foreach ($mappingFromArchiveName as $name => $infoMapping) {
diff --git a/plugins/Referrers/Controller.php b/plugins/Referrers/Controller.php
index 240dafb55e..559c9c6918 100644
--- a/plugins/Referrers/Controller.php
+++ b/plugins/Referrers/Controller.php
@@ -486,8 +486,8 @@ function DisplayTopKeywords($url = "")
$totalRow = Piwik_Translate('General_Total');
return $this->getUrlSparkline(
'getEvolutionGraph',
- array('columns' => array('nb_visits'),
- 'rows' => array(self::getTranslatedReferrerTypeLabel($referrerType), $totalRow),
+ array('columns' => array('nb_visits'),
+ 'rows' => array(self::getTranslatedReferrerTypeLabel($referrerType), $totalRow),
'typeReferrer' => $referrerType)
);
}
diff --git a/plugins/Referrers/Referrers.php b/plugins/Referrers/Referrers.php
index 79b06e326e..30bef2a1dd 100644
--- a/plugins/Referrers/Referrers.php
+++ b/plugins/Referrers/Referrers.php
@@ -56,11 +56,11 @@ class Referrers extends \Piwik\Plugin
'documentation' => Piwik_Translate('Referrers_TypeReportDocumentation') . '<br />'
. '<b>' . Piwik_Translate('Referrers_DirectEntry') . ':</b> ' . Piwik_Translate('Referrers_DirectEntryDocumentation') . '<br />'
. '<b>' . Piwik_Translate('Referrers_SearchEngines') . ':</b> ' . Piwik_Translate('Referrers_SearchEnginesDocumentation',
- array('<br />', '&quot;' . Piwik_Translate('Referrers_SubmenuSearchEngines') . '&quot;')) . '<br />'
+ array('<br />', '&quot;' . Piwik_Translate('Referrers_SubmenuSearchEngines') . '&quot;')) . '<br />'
. '<b>' . Piwik_Translate('Referrers_Websites') . ':</b> ' . Piwik_Translate('Referrers_WebsitesDocumentation',
- array('<br />', '&quot;' . Piwik_Translate('Referrers_SubmenuWebsites') . '&quot;')) . '<br />'
+ array('<br />', '&quot;' . Piwik_Translate('Referrers_SubmenuWebsites') . '&quot;')) . '<br />'
. '<b>' . Piwik_Translate('Referrers_Campaigns') . ':</b> ' . Piwik_Translate('Referrers_CampaignsDocumentation',
- array('<br />', '&quot;' . Piwik_Translate('Referrers_Campaigns') . '&quot;')),
+ array('<br />', '&quot;' . Piwik_Translate('Referrers_Campaigns') . '&quot;')),
'order' => 1,
),
array(
@@ -328,16 +328,16 @@ class Referrers extends \Piwik\Plugin
}
return array(
- 'default_view_type' => 'tableAllColumns',
- 'show_search' => false,
- 'show_offset_information' => false,
- 'show_pagination_control' => false,
- 'show_limit_control' => false,
+ 'default_view_type' => 'tableAllColumns',
+ 'show_search' => false,
+ 'show_offset_information' => false,
+ 'show_pagination_control' => false,
+ 'show_limit_control' => false,
'show_exclude_low_population' => false,
- 'show_goals' => true,
- 'filter_limit' => 10,
- 'translations' => array('label' => $labelColumnTitle),
- 'visualization_properties' => array(
+ 'show_goals' => true,
+ 'filter_limit' => 10,
+ 'translations' => array('label' => $labelColumnTitle),
+ 'visualization_properties' => array(
'table' => array(
'disable_subtable_when_show_goals' => true,
)
@@ -350,15 +350,15 @@ class Referrers extends \Piwik\Plugin
$setGetAllHtmlPrefix = array($this, 'setGetAllHtmlPrefix');
return array(
'show_exclude_low_population' => false,
- 'translations' => array('label' => Piwik_Translate('Referrers_Referrer')),
- 'show_goals' => true,
- 'filter_limit' => 20,
- 'visualization_properties' => array(
+ 'translations' => array('label' => Piwik_Translate('Referrers_Referrer')),
+ 'show_goals' => true,
+ 'filter_limit' => 20,
+ 'visualization_properties' => array(
'table' => array(
'disable_row_actions' => true
)
),
- 'filters' => array(
+ 'filters' => array(
array('MetadataCallbackAddMetadata', array('referer_type', 'html_label_prefix', $setGetAllHtmlPrefix))
)
);
@@ -367,12 +367,12 @@ class Referrers extends \Piwik\Plugin
private function getDisplayPropertiesForGetKeywords()
{
return array(
- 'subtable_controller_action' => 'getSearchEnginesFromKeywordId',
+ 'subtable_controller_action' => 'getSearchEnginesFromKeywordId',
'show_exclude_low_population' => false,
- 'translations' => array('label' => Piwik_Translate('General_ColumnKeyword')),
- 'show_goals' => true,
- 'filter_limit' => 25,
- 'visualization_properties' => array(
+ 'translations' => array('label' => Piwik_Translate('General_ColumnKeyword')),
+ 'show_goals' => true,
+ 'filter_limit' => 25,
+ 'visualization_properties' => array(
'table' => array(
'disable_subtable_when_show_goals' => true,
)
@@ -392,13 +392,13 @@ class Referrers extends \Piwik\Plugin
private function getDisplayPropertiesForGetSearchEngines()
{
return array(
- 'subtable_controller_action' => 'getKeywordsFromSearchEngineId',
- 'show_search' => false,
+ 'subtable_controller_action' => 'getKeywordsFromSearchEngineId',
+ 'show_search' => false,
'show_exclude_low_population' => false,
- 'show_goals' => true,
- 'filter_limit' => 25,
- 'translations' => array('label' => Piwik_Translate('Referrers_ColumnSearchEngine')),
- 'visualization_properties' => array(
+ 'show_goals' => true,
+ 'filter_limit' => 25,
+ 'translations' => array('label' => Piwik_Translate('Referrers_ColumnSearchEngine')),
+ 'visualization_properties' => array(
'table' => array(
'disable_subtable_when_show_goals' => true,
)
@@ -418,12 +418,12 @@ class Referrers extends \Piwik\Plugin
private function getDisplayPropertiesForGetWebsites()
{
return array(
- 'subtable_controller_action' => 'getUrlsFromWebsiteId',
+ 'subtable_controller_action' => 'getUrlsFromWebsiteId',
'show_exclude_low_population' => false,
- 'show_goals' => true,
- 'filter_limit' => 25,
- 'translations' => array('label' => Piwik_Translate('Referrers_ColumnWebsite')),
- 'visualization_properties' => array(
+ 'show_goals' => true,
+ 'filter_limit' => 25,
+ 'translations' => array('label' => Piwik_Translate('Referrers_ColumnWebsite')),
+ 'visualization_properties' => array(
'table' => array(
'disable_subtable_when_show_goals' => true,
)
@@ -434,13 +434,13 @@ class Referrers extends \Piwik\Plugin
private function getDisplayPropertiesForGetSocials()
{
$result = array(
- 'default_view_type' => 'graphPie',
- 'subtable_controller_action' => 'getUrlsForSocial',
+ 'default_view_type' => 'graphPie',
+ 'subtable_controller_action' => 'getUrlsForSocial',
'show_exclude_low_population' => false,
- 'filter_limit' => 10,
- 'show_goals' => true,
- 'translations' => array('label' => Piwik_Translate('Referrers_ColumnSocial')),
- 'visualization_properties' => array(
+ 'filter_limit' => 10,
+ 'show_goals' => true,
+ 'translations' => array('label' => Piwik_Translate('Referrers_ColumnSocial')),
+ 'visualization_properties' => array(
'table' => array(
'disable_subtable_when_show_goals' => true,
)
diff --git a/plugins/SEO/RankChecker.php b/plugins/SEO/RankChecker.php
index a99978de96..5b5a69de9c 100644
--- a/plugins/SEO/RankChecker.php
+++ b/plugins/SEO/RankChecker.php
@@ -12,8 +12,8 @@ namespace Piwik\Plugins\SEO;
use Exception;
use Piwik\Http;
-use Piwik\Log;
+use Piwik\Log;
use Piwik\MetricsFormatter;
/**
diff --git a/plugins/ScheduledReports/ScheduledReports.php b/plugins/ScheduledReports/ScheduledReports.php
index 748dcf48c8..b63663fc10 100644
--- a/plugins/ScheduledReports/ScheduledReports.php
+++ b/plugins/ScheduledReports/ScheduledReports.php
@@ -78,23 +78,23 @@ class ScheduledReports extends \Piwik\Plugin
public function getListHooksRegistered()
{
return array(
- 'Menu.Top.addItems' => 'addTopMenu',
- 'TaskScheduler.getScheduledTasks' => 'getScheduledTasks',
- 'AssetManager.getJavaScriptFiles' => 'getJsFiles',
- 'ScheduledReports.getReportParameters' => 'getReportParameters',
- 'ScheduledReports.validateReportParameters' => 'validateReportParameters',
- 'ScheduledReports.getReportMetadata' => 'getReportMetadata',
- 'ScheduledReports.getReportTypes' => 'getReportTypes',
- 'ScheduledReports.getReportFormats' => 'getReportFormats',
- 'ScheduledReports.getRendererInstance' => 'getRendererInstance',
- 'ScheduledReports.getReportRecipients' => 'getReportRecipients',
- 'ScheduledReports.processReports' => 'processReports',
- 'ScheduledReports.allowMultipleReports' => 'allowMultipleReports',
- 'ScheduledReports.sendReport' => 'sendReport',
- 'Template.reportParametersScheduledReports' => 'template_reportParametersScheduledReports',
- 'UsersManager.deleteUser' => 'deleteUserReport',
- 'SitesManager.deleteSite.end' => 'deleteSiteReport',
- APISegmentEditor::DEACTIVATE_SEGMENT_EVENT => 'segmentDeactivation',
+ 'Menu.Top.addItems' => 'addTopMenu',
+ 'TaskScheduler.getScheduledTasks' => 'getScheduledTasks',
+ 'AssetManager.getJavaScriptFiles' => 'getJsFiles',
+ 'ScheduledReports.getReportParameters' => 'getReportParameters',
+ 'ScheduledReports.validateReportParameters' => 'validateReportParameters',
+ 'ScheduledReports.getReportMetadata' => 'getReportMetadata',
+ 'ScheduledReports.getReportTypes' => 'getReportTypes',
+ 'ScheduledReports.getReportFormats' => 'getReportFormats',
+ 'ScheduledReports.getRendererInstance' => 'getRendererInstance',
+ 'ScheduledReports.getReportRecipients' => 'getReportRecipients',
+ 'ScheduledReports.processReports' => 'processReports',
+ 'ScheduledReports.allowMultipleReports' => 'allowMultipleReports',
+ 'ScheduledReports.sendReport' => 'sendReport',
+ 'Template.reportParametersScheduledReports' => 'template_reportParametersScheduledReports',
+ 'UsersManager.deleteUser' => 'deleteUserReport',
+ 'SitesManager.deleteSite.end' => 'deleteSiteReport',
+ APISegmentEditor::DEACTIVATE_SEGMENT_EVENT => 'segmentDeactivation',
);
}
@@ -219,9 +219,9 @@ class ScheduledReports extends \Piwik\Plugin
$displayFormat == self::DISPLAY_FORMAT_GRAPHS_ONLY || $displayFormat == self::DISPLAY_FORMAT_TABLES_AND_GRAPHS
:
$displayFormat != self::DISPLAY_FORMAT_TABLES_ONLY)
- && \Piwik\SettingsServer::isGdExtensionEnabled()
- && \Piwik\PluginsManager::getInstance()->isPluginActivated('ImageGraph')
- && !empty($metadata['imageGraphUrl']);
+ && \Piwik\SettingsServer::isGdExtensionEnabled()
+ && \Piwik\PluginsManager::getInstance()->isPluginActivated('ImageGraph')
+ && !empty($metadata['imageGraphUrl']);
$processedReport['evolutionGraph'] = $evolutionGraph;
diff --git a/plugins/SegmentEditor/API.php b/plugins/SegmentEditor/API.php
index 1f9dea9d7a..13aa48ca55 100644
--- a/plugins/SegmentEditor/API.php
+++ b/plugins/SegmentEditor/API.php
@@ -148,9 +148,9 @@ class API
* Modifies an existing stored segment.
*
* @param int $idSegment The ID of the stored segment to modify.
- * @param string $name The new name of the segment.
- * @param string $definition The new definition of the segment.
- * @param bool $idSite If supplied, associates the stored segment with as single site.
+ * @param string $name The new name of the segment.
+ * @param string $definition The new definition of the segment.
+ * @param bool $idSite If supplied, associates the stored segment with as single site.
* @param bool $autoArchive Whether to automatically archive data with the segment or not.
* @param bool $enabledAllUsers Whether the stored segment is viewable by all users or just the one that created it.
*
@@ -167,7 +167,7 @@ class API
$enabledAllUsers = $this->checkEnabledAllUsers($enabledAllUsers);
$autoArchive = $this->checkAutoArchive($autoArchive, $idSite);
- if($this->segmentVisibilityIsReduced($idSite, $enabledAllUsers, $segment)) {
+ if ($this->segmentVisibilityIsReduced($idSite, $enabledAllUsers, $segment)) {
$this->sendSegmentDeactivationEvent($idSegment);
}
@@ -191,9 +191,9 @@ class API
/**
* Adds a new stored segment.
*
- * @param string $name The new name of the segment.
- * @param string $definition The new definition of the segment.
- * @param bool $idSite If supplied, associates the stored segment with as single site.
+ * @param string $name The new name of the segment.
+ * @param string $definition The new definition of the segment.
+ * @param bool $idSite If supplied, associates the stored segment with as single site.
* @param bool $autoArchive Whether to automatically archive data with the segment or not.
* @param bool $enabledAllUsers Whether the stored segment is viewable by all users or just the one that created it.
*
@@ -245,7 +245,7 @@ class API
}
try {
- if(!$segment['enable_all_users']) {
+ if (!$segment['enable_all_users']) {
Piwik::checkUserIsSuperUserOrTheUser($segment['login']);
}
@@ -263,7 +263,7 @@ class API
/**
* Returns all stored segments.
*
- * @param bool $idSite Whether to return stored segments that are only auto-archived for a specific idSite, or all of them. If supplied, must be a valid site ID.
+ * @param bool $idSite Whether to return stored segments that are only auto-archived for a specific idSite, or all of them. If supplied, must be a valid site ID.
* @param bool $returnOnlyAutoArchived Whether to only return stored segments that are auto-archived or not.
* @return array
*/
diff --git a/plugins/SegmentEditor/SegmentEditor.php b/plugins/SegmentEditor/SegmentEditor.php
index b8fa836105..949475691e 100644
--- a/plugins/SegmentEditor/SegmentEditor.php
+++ b/plugins/SegmentEditor/SegmentEditor.php
@@ -11,7 +11,6 @@
namespace Piwik\Plugins\SegmentEditor;
use Exception;
-
use Piwik\Common;
use Piwik\Db;
use Piwik\Version;
diff --git a/plugins/SitesManager/API.php b/plugins/SitesManager/API.php
index 1bb184f44a..b85789a5eb 100644
--- a/plugins/SitesManager/API.php
+++ b/plugins/SitesManager/API.php
@@ -397,9 +397,9 @@ class API
'SELECT idsite
FROM ' . Common::prefixTable('site') . '
WHERE (main_url = ? OR main_url = ?) ' .
- 'UNION
- SELECT idsite
- FROM ' . Common::prefixTable('site_url') . '
+ 'UNION
+ SELECT idsite
+ FROM ' . Common::prefixTable('site_url') . '
WHERE (url = ? OR url = ?) ', array($url, $urlBis, $url, $urlBis));
} else {
$login = Piwik::getCurrentUserLogin();
@@ -407,12 +407,12 @@ class API
'SELECT idsite
FROM ' . Common::prefixTable('site') . '
WHERE (main_url = ? OR main_url = ?)' .
- 'AND idsite IN (' . Access::getSqlAccessSite('idsite') . ') ' .
- 'UNION
- SELECT idsite
- FROM ' . Common::prefixTable('site_url') . '
+ 'AND idsite IN (' . Access::getSqlAccessSite('idsite') . ') ' .
+ 'UNION
+ SELECT idsite
+ FROM ' . Common::prefixTable('site_url') . '
WHERE (url = ? OR url = ?)' .
- 'AND idsite IN (' . Access::getSqlAccessSite('idsite') . ')',
+ 'AND idsite IN (' . Access::getSqlAccessSite('idsite') . ')',
array($url, $urlBis, $login, $url, $urlBis, $login));
}
@@ -1080,7 +1080,9 @@ class API
public function getCurrencyList()
{
$currencies = MetricsFormatter::getCurrencyList();
- return array_map(function($a) { return $a[1]." (".$a[0].")"; }, $currencies);
+ return array_map(function ($a) {
+ return $a[1] . " (" . $a[0] . ")";
+ }, $currencies);
}
/**
@@ -1091,7 +1093,9 @@ class API
public function getCurrencySymbols()
{
$currencies = MetricsFormatter::getCurrencyList();
- return array_map(function($a) { return $a[0]; }, $currencies);
+ return array_map(function ($a) {
+ return $a[0];
+ }, $currencies);
}
/**
diff --git a/plugins/UserCountry/API.php b/plugins/UserCountry/API.php
index 094e893f40..910d8bb796 100644
--- a/plugins/UserCountry/API.php
+++ b/plugins/UserCountry/API.php
@@ -14,8 +14,8 @@ use Exception;
use Piwik\Archive;
use Piwik\DataTable;
use Piwik\Metrics;
-use Piwik\Piwik;
+use Piwik\Piwik;
use Piwik\Plugins\UserCountry\LocationProvider;
use Piwik\Tracker\Visit;
@@ -132,7 +132,13 @@ class API
array('label', 'city_name', __NAMESPACE__ . '\getElementFromStringArray',
array($separator, 0, $strUnknown)));
$dataTable->filter('MetadataCallbackAddMetadata',
- array('city_name', 'city', function($city) use ($strUnknown) { if ($city == $strUnknown) { return "xx"; } else { return false; } }));
+ array('city_name', 'city', function ($city) use ($strUnknown) {
+ if ($city == $strUnknown) {
+ return "xx";
+ } else {
+ return false;
+ }
+ }));
$dataTable->filter('ColumnCallbackAddMetadata',
array('label', 'region', __NAMESPACE__ . '\getElementFromStringArray', array($separator, 1, $unk)));
$dataTable->filter('ColumnCallbackAddMetadata',
diff --git a/plugins/UserCountry/Controller.php b/plugins/UserCountry/Controller.php
index cfe3eb72e1..99605e5ddf 100644
--- a/plugins/UserCountry/Controller.php
+++ b/plugins/UserCountry/Controller.php
@@ -17,10 +17,10 @@ use Piwik\DataTable\Renderer\Json;
use Piwik\Http;
use Piwik\IP;
use Piwik\Piwik;
-use Piwik\Plugins\UserCountry\LocationProvider;
use Piwik\Plugins\UserCountry\LocationProvider\DefaultProvider;
-use Piwik\Plugins\UserCountry\LocationProvider\GeoIp;
use Piwik\Plugins\UserCountry\LocationProvider\GeoIp\Pecl;
+use Piwik\Plugins\UserCountry\LocationProvider;
+use Piwik\Plugins\UserCountry\LocationProvider\GeoIp;
use Piwik\Plugins\UserCountry\LocationProvider\GeoIp\ServerBased;
use Piwik\View;
use Piwik\ViewDataTable;
diff --git a/plugins/UserCountry/GeoIPAutoUpdater.php b/plugins/UserCountry/GeoIPAutoUpdater.php
index 99c91f6f17..ec1627a5fb 100755
--- a/plugins/UserCountry/GeoIPAutoUpdater.php
+++ b/plugins/UserCountry/GeoIPAutoUpdater.php
@@ -531,7 +531,7 @@ class GeoIPAutoUpdater
if (self::$unzipPhpError !== null) {
list($errno, $errstr, $errfile, $errline) = self::$unzipPhpError;
Log::warning("GeoIPAutoUpdater: Encountered PHP error when performing redundant tests on GeoIP "
- . "%s database: %s: %s on line %s of %s.", $type, $errno, $errstr, $errline, $errfile);
+ . "%s database: %s: %s on line %s of %s.", $type, $errno, $errstr, $errline, $errfile);
// get the current filename for the DB and an available new one to rename it to
list($oldPath, $newPath) = $this->getOldAndNewPathsForBrokenDb($customNames[$type]);
@@ -605,7 +605,7 @@ class GeoIPAutoUpdater
/**
* Removes the &date=... query parameter if present in the URL. This query parameter
* is in MaxMind URLs by default and will force the download of an old database.
- *
+ *
* @param string $url
* @return string
*/
diff --git a/plugins/UserCountry/LocationProvider/GeoIp.php b/plugins/UserCountry/LocationProvider/GeoIp.php
index b40783d7c4..8e26cb86e2 100755
--- a/plugins/UserCountry/LocationProvider/GeoIp.php
+++ b/plugins/UserCountry/LocationProvider/GeoIp.php
@@ -234,8 +234,8 @@ abstract class GeoIp extends LocationProvider
public static function isDatabaseInstalled()
{
return self::getPathToGeoIpDatabase(self::$dbNames['loc'])
- || self::getPathToGeoIpDatabase(self::$dbNames['isp'])
- || self::getPathToGeoIpDatabase(self::$dbNames['org']);
+ || self::getPathToGeoIpDatabase(self::$dbNames['isp'])
+ || self::getPathToGeoIpDatabase(self::$dbNames['org']);
}
/**
diff --git a/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php b/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php
index c4113fd9e8..aaf1d7a1b7 100755
--- a/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php
+++ b/plugins/UserCountry/LocationProvider/GeoIp/Pecl.php
@@ -269,8 +269,8 @@ class Pecl extends GeoIp
public static function isLocationDatabaseAvailable()
{
return self::isCityDatabaseAvailable()
- || self::isRegionDatabaseAvailable()
- || self::isCountryDatabaseAvailable();
+ || self::isRegionDatabaseAvailable()
+ || self::isCountryDatabaseAvailable();
}
/**
@@ -281,7 +281,7 @@ class Pecl extends GeoIp
public static function isCityDatabaseAvailable()
{
return geoip_db_avail(GEOIP_CITY_EDITION_REV0)
- || geoip_db_avail(GEOIP_CITY_EDITION_REV1);
+ || geoip_db_avail(GEOIP_CITY_EDITION_REV1);
}
/**
@@ -292,7 +292,7 @@ class Pecl extends GeoIp
public static function isRegionDatabaseAvailable()
{
return geoip_db_avail(GEOIP_REGION_EDITION_REV0)
- || geoip_db_avail(GEOIP_REGION_EDITION_REV1);
+ || geoip_db_avail(GEOIP_REGION_EDITION_REV1);
}
/**
diff --git a/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php b/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php
index 746bfa9d15..c279fddaa8 100755
--- a/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php
+++ b/plugins/UserCountry/LocationProvider/GeoIp/ServerBased.php
@@ -217,11 +217,11 @@ class ServerBased extends GeoIp
array('<strong><em>', '</em></strong>', '<strong><em>', '</em></strong>'));
$installDocs =
'<em><a target="_blank" href="http://piwik.org/faq/how-to/#faq_165">'
- . Piwik_Translate('UserCountry_HowToInstallApacheModule')
- . '</a></em><br/><em>'
- . '<a target="_blank" href="http://piwik.org/faq/how-to/#faq_166">'
- . Piwik_Translate('UserCountry_HowToInstallNginxModule')
- . '</a></em>';
+ . Piwik_Translate('UserCountry_HowToInstallApacheModule')
+ . '</a></em><br/><em>'
+ . '<a target="_blank" href="http://piwik.org/faq/how-to/#faq_166">'
+ . Piwik_Translate('UserCountry_HowToInstallNginxModule')
+ . '</a></em>';
$geoipServerVars = array();
foreach ($_SERVER as $key => $value) {
diff --git a/plugins/UserCountry/UserCountry.php b/plugins/UserCountry/UserCountry.php
index cb07290e99..a58b968e78 100644
--- a/plugins/UserCountry/UserCountry.php
+++ b/plugins/UserCountry/UserCountry.php
@@ -14,11 +14,11 @@ use Piwik\ArchiveProcessor;
use Piwik\Common;
use Piwik\IP;
use Piwik\Piwik;
-use Piwik\Plugins\UserCountry\LocationProvider;
use Piwik\Plugins\UserCountry\LocationProvider\DefaultProvider;
+use Piwik\Plugins\UserCountry\LocationProvider;
use Piwik\Plugins\UserCountry\LocationProvider\GeoIp;
-use Piwik\Url;
+use Piwik\Url;
use Piwik\WidgetsList;
/**
@@ -84,7 +84,7 @@ class UserCountry extends \Piwik\Plugin
$userInfo = array(
'lang' => $visitorInfo['location_browser_lang'],
- 'ip' => IP::N2P($visitorInfo['location_ip'])
+ 'ip' => IP::N2P($visitorInfo['location_ip'])
);
$location = array();
@@ -382,8 +382,8 @@ class UserCountry extends \Piwik\Plugin
if (LocationProvider::getCurrentProviderId() == DefaultProvider::ID) {
// if we're using the default location provider, add a note explaining how it works
$footerMessage = Piwik_Translate("General_Note") . ': '
- . Piwik_Translate('UserCountry_DefaultLocationProviderExplanation',
- array('<a target="_blank" href="http://piwik.org/docs/geo-locate/">', '</a>'));
+ . Piwik_Translate('UserCountry_DefaultLocationProviderExplanation',
+ array('<a target="_blank" href="http://piwik.org/docs/geo-locate/">', '</a>'));
$result['show_footer_message'] = $footerMessage;
}
@@ -461,13 +461,13 @@ class UserCountry extends \Piwik\Plugin
if (!$self->isGeoIPWorking()) {
$params = array('module' => 'UserCountry', 'action' => 'adminIndex');
$footerMessage .= ' ' . Piwik_Translate('UserCountry_NoDataForGeoIPReport2',
- array('<a target="_blank" href="' . Url::getCurrentQueryStringWithParametersModified($params) . '">',
- '</a>',
- '<a target="_blank" href="http://dev.maxmind.com/geoip/geolite?rId=piwik">',
- '</a>'));
+ array('<a target="_blank" href="' . Url::getCurrentQueryStringWithParametersModified($params) . '">',
+ '</a>',
+ '<a target="_blank" href="http://dev.maxmind.com/geoip/geolite?rId=piwik">',
+ '</a>'));
} else {
$footerMessage .= ' ' . Piwik_Translate('UserCountry_ToGeolocateOldVisits',
- array('<a target="_blank" href="http://piwik.org/faq/how-to/#faq_167">', '</a>'));
+ array('<a target="_blank" href="http://piwik.org/faq/how-to/#faq_167">', '</a>'));
}
$view->show_footer_message = $footerMessage;
@@ -484,8 +484,8 @@ class UserCountry extends \Piwik\Plugin
{
$provider = LocationProvider::getCurrentProvider();
return $provider instanceof GeoIp
- && $provider->isAvailable() === true
- && $provider->isWorking() === true;
+ && $provider->isAvailable() === true
+ && $provider->isWorking() === true;
}
public function getClientSideTranslationKeys(&$translationKeys)
diff --git a/plugins/UserCountryMap/Controller.php b/plugins/UserCountryMap/Controller.php
index 670131069c..8b868c406e 100644
--- a/plugins/UserCountryMap/Controller.php
+++ b/plugins/UserCountryMap/Controller.php
@@ -39,7 +39,7 @@ class Controller extends \Piwik\Controller
$period = Common::getRequestVar('period');
$date = Common::getRequestVar('date');
- $segment = $segmentOverride ?: Request::getRawSegmentFromRequest() ?: '';
+ $segment = $segmentOverride ? : Request::getRawSegmentFromRequest() ? : '';
$token_auth = Piwik::getCurrentUserTokenAuth();
$view = new View('@UserCountryMap/visitorMap');
@@ -47,12 +47,12 @@ class Controller extends \Piwik\Controller
// request visits summary
$request = new Request(
'method=VisitsSummary.get&format=PHP'
- . '&idSite=' . $idSite
- . '&period=' . $period
- . '&date=' . $date
- . '&segment=' . $segment
- . '&token_auth=' . $token_auth
- . '&filter_limit=-1'
+ . '&idSite=' . $idSite
+ . '&period=' . $period
+ . '&date=' . $date
+ . '&segment=' . $segment
+ . '&token_auth=' . $token_auth
+ . '&filter_limit=-1'
);
$config = array();
$config['visitsSummary'] = unserialize($request->process());
@@ -158,7 +158,7 @@ class Controller extends \Piwik\Controller
'goal_conversions' => Piwik_Translate('UserCountryMap_GoalConversions'),
);
- $segment = $segmentOverride ?: Request::getRawSegmentFromRequest() ?: '';
+ $segment = $segmentOverride ? : Request::getRawSegmentFromRequest() ? : '';
$params = array(
'period' => 'range',
'idSite' => $idSite,
@@ -174,17 +174,17 @@ class Controller extends \Piwik\Controller
$reqParams = $this->getEnrichedRequest($params, $encode = false);
$view->config = array(
- 'metrics' => array(),
- 'svgBasePath' => $view->piwikUrl . 'plugins/UserCountryMap/svg/',
+ 'metrics' => array(),
+ 'svgBasePath' => $view->piwikUrl . 'plugins/UserCountryMap/svg/',
'liveRefreshAfterMs' => $liveRefreshAfterMs,
- '_' => $locale,
- 'reqParams' => $reqParams,
- 'siteHasGoals' => $hasGoals,
- 'maxVisits' => $maxVisits,
- 'changeVisitAlpha' => Common::getRequestVar('changeVisitAlpha', true, 'int'),
- 'removeOldVisits' => Common::getRequestVar('removeOldVisits', true, 'int'),
- 'showFooterMessage' => Common::getRequestVar('showFooterMessage', true, 'int'),
- 'showDateTime' => Common::getRequestVar('showDateTime', true, 'int'),
+ '_' => $locale,
+ 'reqParams' => $reqParams,
+ 'siteHasGoals' => $hasGoals,
+ 'maxVisits' => $maxVisits,
+ 'changeVisitAlpha' => Common::getRequestVar('changeVisitAlpha', true, 'int'),
+ 'removeOldVisits' => Common::getRequestVar('removeOldVisits', true, 'int'),
+ 'showFooterMessage' => Common::getRequestVar('showFooterMessage', true, 'int'),
+ 'showDateTime' => Common::getRequestVar('showDateTime', true, 'int'),
'doNotRefreshVisits' => Common::getRequestVar('doNotRefreshVisits', false, 'int')
);
@@ -223,12 +223,12 @@ class Controller extends \Piwik\Controller
{
$request = new Request(
'method=API.getMetadata&format=PHP'
- . '&apiModule=UserCountry&apiAction=getCountry'
- . '&idSite=' . $idSite
- . '&period=' . $period
- . '&date=' . $date
- . '&token_auth=' . $token_auth
- . '&filter_limit=-1'
+ . '&apiModule=UserCountry&apiAction=getCountry'
+ . '&idSite=' . $idSite
+ . '&period=' . $period
+ . '&date=' . $date
+ . '&token_auth=' . $token_auth
+ . '&filter_limit=-1'
);
$metaData = $request->process();
@@ -253,7 +253,7 @@ class Controller extends \Piwik\Controller
. "&period=" . $period
. "&date=" . $date
. "&token_auth=" . $token_auth
- . "&segment=" . ($segmentOverride ?: Request::getRawSegmentFromRequest())
+ . "&segment=" . ($segmentOverride ? : Request::getRawSegmentFromRequest())
. "&enable_filter_excludelowpop=1"
. "&showRawMetrics=1";
@@ -271,6 +271,6 @@ class Controller extends \Piwik\Controller
private function _report($module, $action, $idSite, $period, $date, $token_auth, $filter_by_country = false, $segmentOverride = false)
{
return $this->getApiRequestUrl('API', 'getProcessedReport&apiModule=' . $module . '&apiAction=' . $action,
- $idSite, $period, $date, $token_auth, $filter_by_country, $segmentOverride);
+ $idSite, $period, $date, $token_auth, $filter_by_country, $segmentOverride);
}
}
diff --git a/plugins/UserSettings/UserSettings.php b/plugins/UserSettings/UserSettings.php
index cc9a683181..309e769fb2 100644
--- a/plugins/UserSettings/UserSettings.php
+++ b/plugins/UserSettings/UserSettings.php
@@ -192,43 +192,43 @@ class UserSettings extends \Piwik\Plugin
private function getDisplayPropertiesForGetResolution()
{
return array_merge($this->getBasicUserSettingsDisplayProperties(), array(
- 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnResolution'))
- ));
+ 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnResolution'))
+ ));
}
private function getDisplayPropertiesForGetConfiguration()
{
return array_merge($this->getBasicUserSettingsDisplayProperties(), array(
- 'filter_limit' => 3,
- 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnConfiguration'))
- ));
+ 'filter_limit' => 3,
+ 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnConfiguration'))
+ ));
}
private function getDisplayPropertiesForGetOS()
{
return array_merge($this->getBasicUserSettingsDisplayProperties(), array(
- 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnOperatingSystem')),
- 'title' => Piwik_Translate('UserSettings_OperatingSystems'),
- 'related_reports' => $this->getOsRelatedReports()
- ));
+ 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnOperatingSystem')),
+ 'title' => Piwik_Translate('UserSettings_OperatingSystems'),
+ 'related_reports' => $this->getOsRelatedReports()
+ ));
}
private function getDisplayPropertiesForGetOSFamily()
{
return array_merge($this->getBasicUserSettingsDisplayProperties(), array(
- 'translations' => array('label' => Piwik_Translate('UserSettings_OperatingSystemFamily')),
- 'title' => Piwik_Translate('UserSettings_OperatingSystemFamily'),
- 'related_reports' => $this->getOsRelatedReports()
- ));
+ 'translations' => array('label' => Piwik_Translate('UserSettings_OperatingSystemFamily')),
+ 'title' => Piwik_Translate('UserSettings_OperatingSystemFamily'),
+ 'related_reports' => $this->getOsRelatedReports()
+ ));
}
private function getDisplayPropertiesForGetBrowserVersion()
{
$result = array_merge($this->getBasicUserSettingsDisplayProperties(), array(
- 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnBrowserVersion')),
- 'title' => Piwik_Translate('UserSettings_ColumnBrowserVersion'),
- 'related_reports' => $this->getBrowserRelatedReports()
- ));
+ 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnBrowserVersion')),
+ 'title' => Piwik_Translate('UserSettings_ColumnBrowserVersion'),
+ 'related_reports' => $this->getBrowserRelatedReports()
+ ));
$result['visualization_properties']['graph']['max_graph_elements'] = 7;
return $result;
}
@@ -236,10 +236,10 @@ class UserSettings extends \Piwik\Plugin
private function getDisplayPropertiesForGetBrowser()
{
$result = array_merge($this->getBasicUserSettingsDisplayProperties(), array(
- 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnBrowser')),
- 'title' => Piwik_Translate('UserSettings_Browsers'),
- 'related_reports' => $this->getBrowserRelatedReports()
- ));
+ 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnBrowser')),
+ 'title' => Piwik_Translate('UserSettings_Browsers'),
+ 'related_reports' => $this->getBrowserRelatedReports()
+ ));
$result['visualization_properties']['graph']['max_graph_elements'] = 7;
return $result;
}
@@ -247,60 +247,60 @@ class UserSettings extends \Piwik\Plugin
private function getDisplayPropertiesForGetBrowserType()
{
return array_merge($this->getBasicUserSettingsDisplayProperties(), array(
- 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnBrowserFamily')),
- 'show_offset_information' => false,
- 'show_pagination_control' => false,
- 'show_limit_control' => false,
- 'default_view_type' => 'graphPie',
- ));
+ 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnBrowserFamily')),
+ 'show_offset_information' => false,
+ 'show_pagination_control' => false,
+ 'show_limit_control' => false,
+ 'default_view_type' => 'graphPie',
+ ));
}
private function getDisplayPropertiesForGetWideScreen()
{
return array_merge($this->getBasicUserSettingsDisplayProperties(), array(
- 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnTypeOfScreen')),
- 'show_offset_information' => false,
- 'show_pagination_control' => false,
- 'show_limit_control' => false,
- 'title' => Piwik_Translate('UserSettings_ColumnTypeOfScreen'),
- 'related_reports' => $this->getWideScreenDeviceTypeRelatedReports()
- ));
+ 'translations' => array('label' => Piwik_Translate('UserSettings_ColumnTypeOfScreen')),
+ 'show_offset_information' => false,
+ 'show_pagination_control' => false,
+ 'show_limit_control' => false,
+ 'title' => Piwik_Translate('UserSettings_ColumnTypeOfScreen'),
+ 'related_reports' => $this->getWideScreenDeviceTypeRelatedReports()
+ ));
}
private function getDisplayPropertiesForGetMobileVsDesktop()
{
return array_merge($this->getBasicUserSettingsDisplayProperties(), array(
- 'translations' => array('label' => Piwik_Translate('UserSettings_MobileVsDesktop')),
- 'title' => Piwik_Translate('UserSettings_MobileVsDesktop'),
- 'related_reports' => $this->getWideScreenDeviceTypeRelatedReports()
- ));
+ 'translations' => array('label' => Piwik_Translate('UserSettings_MobileVsDesktop')),
+ 'title' => Piwik_Translate('UserSettings_MobileVsDesktop'),
+ 'related_reports' => $this->getWideScreenDeviceTypeRelatedReports()
+ ));
}
private function getDisplayPropertiesForGetPlugin()
{
return array_merge($this->getBasicUserSettingsDisplayProperties(), array(
- 'translations' => array(
- 'label' => Piwik_Translate('General_Plugin'),
- 'nb_visits_percentage' =>
- str_replace(' ', '&nbsp;', Piwik_Translate('General_ColumnPercentageVisits'))
- ),
- 'show_offset_information' => false,
- 'show_pagination_control' => false,
- 'show_limit_control' => false,
- 'show_all_views_icons' => false,
- 'show_table_all_columns' => false,
- 'columns_to_display' => array('label', 'nb_visits_percentage', 'nb_visits'),
- 'filter_sort_column' => 'nb_visits_percentage',
- 'filter_sort_order' => 'desc',
- 'filter_limit' => 10,
- 'show_footer_message' => Piwik_Translate('UserSettings_PluginDetectionDoesNotWorkInIE'),
- ));
+ 'translations' => array(
+ 'label' => Piwik_Translate('General_Plugin'),
+ 'nb_visits_percentage' =>
+ str_replace(' ', '&nbsp;', Piwik_Translate('General_ColumnPercentageVisits'))
+ ),
+ 'show_offset_information' => false,
+ 'show_pagination_control' => false,
+ 'show_limit_control' => false,
+ 'show_all_views_icons' => false,
+ 'show_table_all_columns' => false,
+ 'columns_to_display' => array('label', 'nb_visits_percentage', 'nb_visits'),
+ 'filter_sort_column' => 'nb_visits_percentage',
+ 'filter_sort_order' => 'desc',
+ 'filter_limit' => 10,
+ 'show_footer_message' => Piwik_Translate('UserSettings_PluginDetectionDoesNotWorkInIE'),
+ ));
}
private function getDisplayPropertiesForGetLanguage()
{
return array(
- 'translations' => array('label' => Piwik_Translate('General_Language')),
+ 'translations' => array('label' => Piwik_Translate('General_Language')),
'filter_sort_column' => 'nb_visits',
'filter_sort_order' => 'desc',
'show_search' => false,
@@ -313,14 +313,14 @@ class UserSettings extends \Piwik\Plugin
{
return array(
'UserSettings.getMobileVsDesktop' => Piwik_Translate('UserSettings_MobileVsDesktop'),
- 'UserSettings.getWideScreen' => Piwik_Translate('UserSettings_ColumnTypeOfScreen')
+ 'UserSettings.getWideScreen' => Piwik_Translate('UserSettings_ColumnTypeOfScreen')
);
}
private function getBrowserRelatedReports()
{
return array(
- 'UserSettings.getBrowser' => Piwik_Translate('UserSettings_Browsers'),
+ 'UserSettings.getBrowser' => Piwik_Translate('UserSettings_Browsers'),
'UserSettings.getBrowserVersion' => Piwik_Translate('UserSettings_ColumnBrowserVersion')
);
}
@@ -339,7 +339,7 @@ class UserSettings extends \Piwik\Plugin
'show_search' => false,
'show_exclude_low_population' => false,
'filter_limit' => 5,
- 'visualization_properties' => array(
+ 'visualization_properties' => array(
'graph' => array(
'max_graph_elements' => 5
)
diff --git a/plugins/UserSettings/functions.php b/plugins/UserSettings/functions.php
index 0075f634fb..f2ae5f4f7a 100644
--- a/plugins/UserSettings/functions.php
+++ b/plugins/UserSettings/functions.php
@@ -22,7 +22,7 @@ require_once PIWIK_INCLUDE_PATH . '/libs/UserAgentParser/UserAgentParser.php';
function getPluginsLogo($oldLabel)
{
- if($oldLabel == Piwik_Translate('General_Others')) {
+ if ($oldLabel == Piwik_Translate('General_Others')) {
return false;
}
return 'plugins/UserSettings/images/plugins/' . $oldLabel . '.gif';
@@ -161,11 +161,11 @@ function getBrowserVersion($str)
function getLogoImageFromId($dir, $id)
{
- $path = $dir.'/'.$id.'.gif';
+ $path = $dir . '/' . $id . '.gif';
if (file_exists(PIWIK_INCLUDE_PATH . '/' . $path)) {
return $path;
} else {
- return $dir.'/UNK.gif';
+ return $dir . '/UNK.gif';
}
}
diff --git a/plugins/UsersManager/API.php b/plugins/UsersManager/API.php
index 37e249a8e2..e4356bf373 100644
--- a/plugins/UsersManager/API.php
+++ b/plugins/UsersManager/API.php
@@ -117,7 +117,7 @@ class API
/**
* Returns the list of all the users
*
- * @param string $userLogins Comma separated list of users to select. If not specified, will return all users
+ * @param string $userLogins Comma separated list of users to select. If not specified, will return all users
* @return array the list of all the users
*/
public function getUsers($userLogins = '')
@@ -508,7 +508,7 @@ class API
FROM " . Common::prefixTable("user") . "
WHERE email = ?", $userEmail);
return $count != 0
- || Config::getInstance()->superuser['email'] == $userEmail;
+ || Config::getInstance()->superuser['email'] == $userEmail;
}
/**
@@ -659,12 +659,12 @@ class API
if (is_null($idSites)) {
$db->query("DELETE FROM " . Common::prefixTable("access") .
- " WHERE login = ?",
+ " WHERE login = ?",
array($userLogin));
} else {
foreach ($idSites as $idsite) {
$db->query("DELETE FROM " . Common::prefixTable("access") .
- " WHERE idsite = ? AND login = ?",
+ " WHERE idsite = ? AND login = ?",
array($idsite, $userLogin)
);
}
diff --git a/plugins/VisitFrequency/API.php b/plugins/VisitFrequency/API.php
index dfebebad12..18142916d7 100644
--- a/plugins/VisitFrequency/API.php
+++ b/plugins/VisitFrequency/API.php
@@ -35,11 +35,11 @@ class API
}
/**
- * @param int $idSite
- * @param string $period
- * @param string $date
+ * @param int $idSite
+ * @param string $period
+ * @param string $date
* @param bool|string $segment
- * @param bool|array $columns
+ * @param bool|array $columns
* @return mixed
*/
public function get($idSite, $period, $date, $segment = false, $columns = false)
diff --git a/plugins/VisitTime/API.php b/plugins/VisitTime/API.php
index 3fb9c056b7..f87708e4ef 100644
--- a/plugins/VisitTime/API.php
+++ b/plugins/VisitTime/API.php
@@ -44,7 +44,7 @@ class API
$archive = Archive::build($idSite, $period, $date, $segment);
$dataTable = $archive->getDataTable($name);
$dataTable->filter('Sort', array('label', 'asc', true));
- $dataTable->queueFilter('ColumnCallbackReplace', array('label', __NAMESPACE__ .'\getTimeLabel'));
+ $dataTable->queueFilter('ColumnCallbackReplace', array('label', __NAMESPACE__ . '\getTimeLabel'));
$dataTable->queueFilter('ReplaceColumnNames');
return $dataTable;
}
@@ -131,9 +131,9 @@ class API
/**
* @param DataTable $table
- * @param int $idSite
- * @param string $period
- * @param string $date
+ * @param int $idSite
+ * @param string $period
+ * @param string $date
* @return mixed
*/
protected function removeHoursInFuture($table, $idSite, $period, $date)
diff --git a/plugins/VisitTime/VisitTime.php b/plugins/VisitTime/VisitTime.php
index f0f19f8685..5397ddd37a 100644
--- a/plugins/VisitTime/VisitTime.php
+++ b/plugins/VisitTime/VisitTime.php
@@ -12,8 +12,8 @@ namespace Piwik\Plugins\VisitTime;
use Exception;
use Piwik\ArchiveProcessor;
-use Piwik\Common;
+use Piwik\Common;
use Piwik\Period;
use Piwik\Site;
use Piwik\WidgetsList;
@@ -134,41 +134,41 @@ class VisitTime extends \Piwik\Plugin
);
$properties['VisitTime.getVisitInformationPerServerTime'] = array_merge($commonProperties, array(
- 'filter_limit' => 24,
- 'show_goals' => true,
- 'translations' => array('label' => Piwik_Translate('VisitTime_ColumnServerTime')),
- 'request_parameters_to_modify' => array('hideFutureHoursWhenToday' => 1),
- 'visualization_properties' => array(
- 'graph' => array(
- 'max_graph_elements' => false,
- )
- )
- ));
-
+ 'filter_limit' => 24,
+ 'show_goals' => true,
+ 'translations' => array('label' => Piwik_Translate('VisitTime_ColumnServerTime')),
+ 'request_parameters_to_modify' => array('hideFutureHoursWhenToday' => 1),
+ 'visualization_properties' => array(
+ 'graph' => array(
+ 'max_graph_elements' => false,
+ )
+ )
+ ));
+
$properties['VisitTime.getVisitInformationPerLocalTime'] = array_merge($commonProperties, array(
- 'filter_limit' => 24,
- 'title' => Piwik_Translate('VisitTime_ColumnLocalTime'),
- 'translations' => array('label' => Piwik_Translate('VisitTime_LocalTime')),
- 'visualization_properties' => array(
- 'graph' => array(
- 'max_graph_elements' => false,
- )
- )
- ));
-
+ 'filter_limit' => 24,
+ 'title' => Piwik_Translate('VisitTime_ColumnLocalTime'),
+ 'translations' => array('label' => Piwik_Translate('VisitTime_LocalTime')),
+ 'visualization_properties' => array(
+ 'graph' => array(
+ 'max_graph_elements' => false,
+ )
+ )
+ ));
+
$properties['VisitTime.getByDayOfWeek'] = array_merge($commonProperties, array(
- 'filter_limit' => 7,
- 'enable_sort' => false,
- 'show_footer_message' =>
- Piwik_Translate('General_ReportGeneratedFrom', self::getDateRangeForFooterMessage()),
- 'translations' => array('label' => Piwik_Translate('VisitTime_DayOfWeek')),
- 'visualization_properties' => array(
- 'graph' => array(
- 'show_all_ticks' => true,
- 'max_graph_elements' => false,
- )
- )
- ));
+ 'filter_limit' => 7,
+ 'enable_sort' => false,
+ 'show_footer_message' =>
+ Piwik_Translate('General_ReportGeneratedFrom', self::getDateRangeForFooterMessage()),
+ 'translations' => array('label' => Piwik_Translate('VisitTime_DayOfWeek')),
+ 'visualization_properties' => array(
+ 'graph' => array(
+ 'show_all_ticks' => true,
+ 'max_graph_elements' => false,
+ )
+ )
+ ));
// add the visits by day of week as a related report, if the current period is not 'day'
if (Common::getRequestVar('period', 'day') != 'day') {
diff --git a/plugins/VisitorInterest/VisitorInterest.php b/plugins/VisitorInterest/VisitorInterest.php
index 5806d150dc..0120720004 100644
--- a/plugins/VisitorInterest/VisitorInterest.php
+++ b/plugins/VisitorInterest/VisitorInterest.php
@@ -11,8 +11,8 @@
namespace Piwik\Plugins\VisitorInterest;
use Piwik\ArchiveProcessor;
-use Piwik\FrontController;
+use Piwik\FrontController;
use Piwik\Metrics;
use Piwik\WidgetsList;
@@ -164,18 +164,18 @@ class VisitorInterest extends \Piwik\Plugin
private function getDisplayPropertiesForGetNumberOfVisitsPerVisitDuration()
{
return array(
- 'default_view_type' => 'cloud',
- 'filter_sort_column' => 'label',
- 'filter_sort_order' => 'asc',
- 'translations' => array('label' => Piwik_Translate('VisitorInterest_ColumnVisitDuration')),
- 'enable_sort' => false,
+ 'default_view_type' => 'cloud',
+ 'filter_sort_column' => 'label',
+ 'filter_sort_order' => 'asc',
+ 'translations' => array('label' => Piwik_Translate('VisitorInterest_ColumnVisitDuration')),
+ 'enable_sort' => false,
'show_exclude_low_population' => false,
- 'show_offset_information' => false,
- 'show_pagination_control' => false,
- 'show_limit_control' => false,
- 'show_search' => false,
- 'show_table_all_columns' => false,
- 'visualization_properties' => array(
+ 'show_offset_information' => false,
+ 'show_pagination_control' => false,
+ 'show_limit_control' => false,
+ 'show_search' => false,
+ 'show_table_all_columns' => false,
+ 'visualization_properties' => array(
'graph' => array(
'max_graph_elements' => 10
)
@@ -186,18 +186,18 @@ class VisitorInterest extends \Piwik\Plugin
private function getDisplayPropertiesForGetNumberOfVisitsPerPage()
{
return array(
- 'default_view_type' => 'cloud',
- 'filter_sort_column' => 'label',
- 'filter_sort_order' => 'asc',
- 'translations' => array('label' => Piwik_Translate('VisitorInterest_ColumnPagesPerVisit')),
- 'enable_sort' => false,
+ 'default_view_type' => 'cloud',
+ 'filter_sort_column' => 'label',
+ 'filter_sort_order' => 'asc',
+ 'translations' => array('label' => Piwik_Translate('VisitorInterest_ColumnPagesPerVisit')),
+ 'enable_sort' => false,
'show_exclude_low_population' => false,
- 'show_offset_information' => false,
- 'show_pagination_control' => false,
- 'show_limit_control' => false,
- 'show_search' => false,
- 'show_table_all_columns' => false,
- 'visualization_properties' => array(
+ 'show_offset_information' => false,
+ 'show_pagination_control' => false,
+ 'show_limit_control' => false,
+ 'show_search' => false,
+ 'show_table_all_columns' => false,
+ 'visualization_properties' => array(
'graph' => array(
'max_graph_elements' => 10
)
diff --git a/plugins/VisitsSummary/API.php b/plugins/VisitsSummary/API.php
index a0685029e3..3578d8f411 100644
--- a/plugins/VisitsSummary/API.php
+++ b/plugins/VisitsSummary/API.php
@@ -40,7 +40,7 @@ class API
{
Piwik::checkUserHasViewAccess($idSite);
$archive = Archive::build($idSite, $period, $date, $segment);
-
+
// array values are comma separated
$columns = Piwik::getArrayFromApiParameter($columns);
$tempColumns = array();