From e535f6773a592660d6a9fc1a044a34fdb99be4bc Mon Sep 17 00:00:00 2001
From: Michal Kleiner
Date: Wed, 17 Apr 2024 14:09:06 +1200
Subject: [PATCH 1/2] [Coding Style] Enable rule
PSR12.Properties.ConstantVisibility
---
phpcs.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/phpcs.xml b/phpcs.xml
index 00ddd50a020..9622607d00e 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -30,7 +30,6 @@
-
From 4a4d7b6af018de14c38c8d62c680a510523fd72e Mon Sep 17 00:00:00 2001
From: Michal Kleiner
Date: Thu, 18 Apr 2024 10:32:30 +1200
Subject: [PATCH 2/2] Apply CS
---
core/API/DataTableManipulator/LabelFilter.php | 6 +-
core/API/DataTablePostProcessor.php | 2 +-
core/Archive.php | 6 +-
core/Archive/ArchiveInvalidator.php | 6 +-
core/Archive/Chunk.php | 4 +-
core/Archive/DataCollection.php | 2 +-
core/Archive/DataTableFactory.php | 8 +-
core/ArchiveProcessor/ArchivingStatus.php | 4 +-
core/ArchiveProcessor/LoaderLock.php | 4 +-
core/ArchiveProcessor/Record.php | 4 +-
core/ArchiveProcessor/Rules.php | 6 +-
core/Archiver/Request.php | 2 +-
core/AssetManager.php | 22 ++--
core/AssetManager/UIAssetMinifier.php | 2 +-
core/AuthResult.php | 6 +-
core/Changes/Model.php | 6 +-
core/CliMulti.php | 2 +-
core/CliMulti/Process.php | 4 +-
core/Columns/Dimension.php | 36 +++---
core/Common.php | 14 +-
core/Concurrency/Lock.php | 4 +-
.../LockBackend/MySqlLockBackend.php | 2 +-
core/Config.php | 6 +-
core/Config/IniFileChain.php | 2 +-
core/Cookie.php | 4 +-
core/CronArchive.php | 20 +--
core/CronArchive/ReArchiveList.php | 2 +-
core/CronArchive/SegmentArchiving.php | 8 +-
core/CronArchive/SharedSiteIds.php | 6 +-
core/DataAccess/ArchiveSelector.php | 4 +-
core/DataAccess/ArchiveTableCreator.php | 4 +-
core/DataAccess/ArchiveWriter.php | 12 +-
core/DataAccess/LogAggregator.php | 30 ++---
core/DataAccess/LogQueryBuilder.php | 2 +-
core/DataAccess/RawLogDao.php | 2 +-
core/DataArray.php | 2 +-
core/DataTable.php | 28 ++--
.../Filter/AddColumnsProcessedMetricsGoal.php | 18 +--
core/DataTable/Filter/ColumnDelete.php | 2 +-
.../DataTable/Filter/ExcludeLowPopulation.php | 2 +-
core/DataTable/Filter/SafeDecodeLabel.php | 2 +-
core/DataTable/Filter/Sort.php | 4 +-
core/DataTable/Renderer/Csv.php | 2 +-
core/DataTable/Row.php | 8 +-
core/Date.php | 26 ++--
core/Db.php | 2 +-
core/Db/Schema.php | 2 +-
core/Db/Schema/Mysql.php | 4 +-
core/Db/TransactionLevel.php | 2 +-
core/EventDispatcher.php | 6 +-
core/FrontController.php | 6 +-
.../Data/Provider/DateTimeFormatProvider.php | 18 +--
core/Log.php | 20 +--
core/Mail/EmailStyles.php | 8 +-
core/Measurable/Type.php | 2 +-
core/Metrics.php | 120 +++++++++---------
core/Metrics/Formatter.php | 2 +-
core/Notification.php | 26 ++--
core/Notification/Manager.php | 2 +-
core/Period/Day.php | 2 +-
core/Period/Month.php | 2 +-
core/Period/Range.php | 2 +-
core/Period/Week.php | 2 +-
core/Period/Year.php | 2 +-
core/Piwik.php | 4 +-
core/Plugin/ArchivedMetric.php | 24 ++--
core/Plugin/ComputedMetric.php | 4 +-
core/Plugin/Dimension/ActionDimension.php | 2 +-
core/Plugin/Dimension/ConversionDimension.php | 2 +-
core/Plugin/Dimension/VisitDimension.php | 2 +-
core/Plugin/Manager.php | 8 +-
core/Plugin/MetadataLoader.php | 2 +-
core/Plugin/Metric.php | 2 +-
core/Plugin/ProcessedMetric.php | 2 +-
core/Plugin/Report.php | 4 +-
core/Plugin/Segment.php | 4 +-
core/Plugin/Tasks.php | 10 +-
core/Plugin/ViewDataTable.php | 2 +-
core/Plugin/Visualization.php | 2 +-
core/ProfessionalServices/Advertising.php | 2 +-
core/ProxyHttp.php | 4 +-
core/RankingQuery.php | 2 +-
core/ReportRenderer.php | 28 ++--
core/ReportRenderer/Html.php | 10 +-
core/ReportRenderer/Pdf.php | 24 ++--
core/Scheduler/Schedule/Schedule.php | 14 +-
core/Scheduler/Task.php | 10 +-
core/Scheduler/Timetable.php | 4 +-
core/Segment.php | 6 +-
core/Segment/SegmentExpression.php | 58 ++++-----
core/Sequence.php | 2 +-
core/Session.php | 2 +-
core/Session/SaveHandler/DbTable.php | 4 +-
core/Session/SessionFingerprint.php | 10 +-
core/Settings/FieldConfig.php | 36 +++---
core/Site.php | 2 +-
core/Tracker.php | 4 +-
core/Tracker/Action.php | 42 +++---
core/Tracker/Failures.php | 6 +-
core/Tracker/FingerprintSalt.php | 4 +-
core/Tracker/GoalManager.php | 42 +++---
core/Tracker/Model.php | 2 +-
core/Tracker/Request.php | 2 +-
core/Tracker/Settings.php | 2 +-
core/Tracker/Visit.php | 2 +-
core/Tracker/Visit/ReferrerSpamFilter.php | 2 +-
core/Tracker/VisitorRecognizer.php | 2 +-
core/Translation/Loader/DevelopmentLoader.php | 2 +-
core/Twig.php | 2 +-
core/UpdateCheck.php | 12 +-
core/Updater.php | 6 +-
core/Updater/Migration/Db.php | 32 ++---
core/Updates/3.13.1-b2.php | 2 +-
core/Validators/NumberRange.php | 4 +-
core/Version.php | 4 +-
core/View/HtmlEmailFooterView.php | 2 +-
core/View/HtmlReportEmailHeaderView.php | 2 +-
core/View/SecurityPolicy.php | 6 +-
core/View/UIControl.php | 2 +-
core/ViewDataTable/Factory.php | 2 +-
core/Visualization/Sparkline.php | 8 +-
plugins/API/Menu.php | 4 +-
.../ComparisonRowGeneratorTest.php | 4 +-
plugins/Actions/Actions.php | 2 +-
plugins/Actions/Archiver.php | 32 ++---
plugins/Actions/ArchivingHelper.php | 2 +-
plugins/Annotations/AnnotationList.php | 2 +-
plugins/Contents/Archiver.php | 8 +-
.../Commands/InvalidateReportData.php | 2 +-
.../Commands/OptimizeArchiveTables.php | 4 +-
.../Commands/PurgeOldArchiveData.php | 2 +-
plugins/CoreAdminHome/CustomLogo.php | 6 +-
plugins/CoreAdminHome/OptOutManager.php | 2 +-
plugins/CoreAdminHome/Tasks.php | 2 +-
.../Tasks/ArchivesToPurgeDistributedList.php | 2 +-
.../tests/Fixture/DuplicateActions.php | 2 +-
.../Integration/Commands/SetConfigTest.php | 2 +-
plugins/CoreConsole/Commands/BuildTracker.php | 2 +-
.../tests/System/ArchiveCronTest.php | 8 +-
plugins/CoreHome/Columns/Profilable.php | 2 +-
plugins/CoreHome/Columns/UserId.php | 2 +-
plugins/CoreHome/Columns/VisitGoalBuyer.php | 8 +-
plugins/CoreHome/Columns/VisitorReturning.php | 6 +-
.../Columns/VisitorSecondsSinceFirst.php | 2 +-
.../Columns/VisitorSecondsSinceOrder.php | 2 +-
plugins/CoreHome/CoreHome.php | 2 +-
plugins/CoreHome/Widgets/GetSystemSummary.php | 4 +-
plugins/CorePluginsAdmin/Controller.php | 6 +-
.../Model/TagManagerTeaser.php | 2 +-
plugins/CorePluginsAdmin/PluginInstaller.php | 2 +-
plugins/CorePluginsAdmin/SettingsMetadata.php | 2 +-
.../tests/Integration/ApiTest.php | 4 +-
plugins/CoreUpdater/Updater.php | 6 +-
.../tests/Integration/Commands/UpdateTest.php | 4 +-
.../Visualizations/Cloud.php | 8 +-
.../Visualizations/Graph.php | 2 +-
.../Visualizations/HtmlTable.php | 8 +-
.../Visualizations/HtmlTable/AllColumns.php | 6 +-
.../Visualizations/JqplotGraph.php | 4 +-
.../Visualizations/JqplotGraph/Bar.php | 6 +-
.../Visualizations/JqplotGraph/Evolution.php | 4 +-
.../Visualizations/JqplotGraph/Pie.php | 6 +-
.../Visualizations/Sparkline.php | 2 +-
.../Visualizations/Sparklines.php | 2 +-
plugins/CoreVue/Commands/Build.php | 6 +-
plugins/CustomDimensions/Archiver.php | 2 +-
plugins/CustomDimensions/CustomDimensions.php | 6 +-
plugins/CustomDimensions/Dao/LogTable.php | 2 +-
plugins/CustomJsTracker/TrackerUpdater.php | 6 +-
.../TrackingCode/PiwikJsManipulator.php | 2 +-
.../TrackingCode/PluginTrackerFiles.php | 4 +-
.../tests/Integration/FileTest.php | 4 +-
plugins/DBStats/DBStats.php | 2 +-
plugins/DevicePlugins/Archiver.php | 2 +-
plugins/DevicePlugins/VisitorDetails.php | 2 +-
plugins/DevicesDetection/Archiver.php | 34 ++---
.../Diagnostic/CronArchivingLastRunCheck.php | 2 +-
.../Diagnostics/Diagnostic/DbMaxPacket.php | 2 +-
.../Diagnostic/DiagnosticResult.php | 8 +-
plugins/Diagnostics/Diagnostics.php | 2 +-
plugins/Ecommerce/Columns/ProductCategory.php | 2 +-
plugins/Ecommerce/VisitorDetails.php | 4 +-
plugins/Events/Archiver.php | 14 +-
plugins/Events/VisitorDetails.php | 2 +-
.../RecordBuilders/ExampleBlob.php | 2 +-
.../RecordBuilders/ExampleMetric.php | 4 +-
.../RecordBuilders/ExampleMetric2.php | 2 +-
.../Visualizations/SimpleTable.php | 8 +-
plugins/Feedback/Feedback.php | 2 +-
.../Commands/ConvertRegionCodesToIso.php | 4 +-
plugins/GeoIp2/GeoIP2AutoUpdater.php | 14 +-
plugins/GeoIp2/LocationProvider/GeoIp2.php | 4 +-
.../GeoIp2/LocationProvider/GeoIp2/Php.php | 4 +-
.../LocationProvider/GeoIp2/ServerModule.php | 4 +-
plugins/Goals/API.php | 2 +-
plugins/Goals/Archiver.php | 32 ++---
plugins/Goals/Controller.php | 2 +-
.../RecordBuilders/GeneralGoalsRecords.php | 6 +-
.../Goals/RecordBuilders/ProductRecord.php | 22 ++--
plugins/Goals/Visualizations/Goals.php | 12 +-
plugins/ImageGraph/API.php | 40 +++---
plugins/ImageGraph/ImageGraph.php | 2 +-
plugins/ImageGraph/StaticGraph.php | 12 +-
plugins/ImageGraph/StaticGraph/Exception.php | 2 +-
plugins/ImageGraph/StaticGraph/GridGraph.php | 58 ++++-----
.../ImageGraph/StaticGraph/HorizontalBar.php | 10 +-
plugins/ImageGraph/StaticGraph/PieGraph.php | 8 +-
.../ImageGraph/StaticGraph/VerticalBar.php | 2 +-
plugins/Insights/API.php | 6 +-
plugins/Insights/InsightReport.php | 6 +-
plugins/Insights/Visualizations/Insight.php | 8 +-
plugins/Installation/FormDatabaseSetup.php | 4 +-
plugins/Installation/Onboarding.php | 2 +-
plugins/IntranetMeasurable/Type.php | 2 +-
.../JsTrackerInstallCheck.php | 2 +-
.../JsTrackerInstallCheckOption.php | 10 +-
...TrackerInstallCheckIntegrationTestCase.php | 10 +-
.../Unit/JsTrackerInstallCheckOptionTest.php | 10 +-
.../Commands/FetchTranslations.php | 2 +-
plugins/LanguagesManager/LanguagesManager.php | 2 +-
.../Validate/CoreTranslations.php | 10 +-
.../TranslationWriter/Writer.php | 4 +-
plugins/Live/Controller.php | 2 +-
plugins/Live/VisitorProfile.php | 2 +-
plugins/Live/Visualizations/VisitorLog.php | 8 +-
plugins/Login/Controller.php | 2 +-
plugins/Login/Model.php | 2 +-
plugins/Login/PasswordVerifier.php | 4 +-
.../Login/Security/BruteForceDetection.php | 4 +-
.../Integration/PasswordResetterTest.php | 2 +-
plugins/Marketplace/Api/Client.php | 4 +-
plugins/Marketplace/Api/Service.php | 4 +-
plugins/Marketplace/Api/Service/Exception.php | 4 +-
plugins/Marketplace/Controller.php | 6 +-
plugins/Marketplace/Input/PurchaseType.php | 6 +-
plugins/Marketplace/Input/Sort.php | 10 +-
plugins/MobileAppMeasurable/Type.php | 2 +-
plugins/MobileMessaging/API.php | 4 +-
plugins/MobileMessaging/MobileMessaging.php | 26 ++--
.../MobileMessaging/ReportRenderer/Sms.php | 6 +-
plugins/MobileMessaging/SMSProvider.php | 8 +-
.../MobileMessaging/SMSProvider/ASPSMS.php | 12 +-
.../MobileMessaging/SMSProvider/Clockwork.php | 14 +-
.../Handler/WebNotificationHandler.php | 2 +-
plugins/Monolog/tests/Integration/LogTest.php | 6 +-
plugins/MultiSites/API.php | 28 ++--
plugins/PagePerformance/Archiver.php | 28 ++--
.../Metrics/AveragePerformanceMetric.php | 2 +-
.../Metrics/AverageTimeDomCompletion.php | 2 +-
.../Metrics/AverageTimeDomProcessing.php | 2 +-
.../Columns/Metrics/AverageTimeNetwork.php | 2 +-
.../Columns/Metrics/AverageTimeOnLoad.php | 2 +-
.../Columns/Metrics/AverageTimeServer.php | 2 +-
.../Columns/Metrics/AverageTimeTransfer.php | 2 +-
.../Columns/TimeDomCompletion.php | 4 +-
.../Columns/TimeDomProcessing.php | 4 +-
.../PagePerformance/Columns/TimeNetwork.php | 4 +-
.../PagePerformance/Columns/TimeOnLoad.php | 4 +-
.../PagePerformance/Columns/TimeServer.php | 4 +-
.../PagePerformance/Columns/TimeTransfer.php | 4 +-
.../JqplotGraph/StackedBarEvolution.php | 6 +-
.../Visualizations/PerformanceColumns.php | 6 +-
plugins/PrivacyManager/Controller.php | 6 +-
.../PrivacyManager/Dao/LogDataAnonymizer.php | 2 +-
plugins/PrivacyManager/PrivacyManager.php | 10 +-
plugins/PrivacyManager/ReferrerAnonymizer.php | 8 +-
plugins/PrivacyManager/ReportsPurger.php | 2 +-
.../MultipleSitesMultipleVisitsFixture.php | 6 +-
.../tests/Integration/DataPurgingTest.php | 12 +-
.../tests/Integration/PrivacyManagerTest.php | 2 +-
plugins/Proxy/Controller.php | 2 +-
plugins/Referrers/API.php | 2 +-
plugins/Referrers/Archiver.php | 24 ++--
plugins/Referrers/Columns/Base.php | 4 +-
plugins/Referrers/Columns/ReferrerUrl.php | 2 +-
plugins/Referrers/Reports/Get.php | 2 +-
plugins/Referrers/SearchEngine.php | 4 +-
plugins/Referrers/Social.php | 4 +-
plugins/Resolution/Archiver.php | 8 +-
plugins/SEO/Metric/Bing.php | 2 +-
plugins/SEO/Metric/Google.php | 2 +-
plugins/ScheduledReports/API.php | 30 ++---
plugins/ScheduledReports/Controller.php | 2 +-
plugins/ScheduledReports/Menu.php | 4 +-
plugins/ScheduledReports/ScheduledReports.php | 32 ++---
plugins/SegmentEditor/SegmentEditor.php | 2 +-
.../SegmentEditor/SegmentSelectorControl.php | 2 +-
.../tests/System/UnprocessedSegmentsTest.php | 2 +-
plugins/SitesManager/API.php | 20 +--
plugins/SitesManager/SitesManager.php | 6 +-
.../Commands/GenerateGitHubTestActionFile.php | 4 +-
.../TestRunner/Commands/SyncScreenshots.php | 2 +-
plugins/Tour/Engagement/Challenge.php | 4 +-
plugins/Tour/Widgets/GetEngagement.php | 2 +-
plugins/TwoFactorAuth/Controller.php | 10 +-
.../TwoFactorAuth/TwoFactorAuthentication.php | 4 +-
.../tests/Fixtures/TwoFactorFixture.php | 2 +-
plugins/UserCountry/Archiver.php | 20 +--
.../AttributeHistoricalDataWithLocations.php | 14 +-
plugins/UserCountry/LocationProvider.php | 42 +++---
.../LocationProvider/DefaultProvider.php | 4 +-
.../LocationProvider/DisabledProvider.php | 4 +-
plugins/UserCountry/VisitorGeolocator.php | 2 +-
.../Integration/VisitorGeolocatorTest.php | 2 +-
plugins/UserCountryMap/Controller.php | 2 +-
plugins/UserId/Archiver.php | 6 +-
plugins/UserLanguage/Archiver.php | 4 +-
plugins/UsersManager/API.php | 6 +-
plugins/UsersManager/Controller.php | 6 +-
plugins/UsersManager/LastSeenTimeLogger.php | 4 +-
plugins/UsersManager/Model.php | 4 +-
plugins/UsersManager/NewsletterSignup.php | 2 +-
plugins/UsersManager/UsersManager.php | 4 +-
plugins/UsersManager/Validators/Login.php | 4 +-
.../UsersManager/tests/Fixtures/ManyUsers.php | 4 +-
.../tests/Integration/APITest.php | 6 +-
.../tests/Integration/UsersManagerTest.php | 2 +-
plugins/VisitFrequency/API.php | 8 +-
plugins/VisitTime/Archiver.php | 4 +-
plugins/VisitorInterest/Archiver.php | 8 +-
.../Columns/VisitorSecondsSinceLast.php | 2 +-
plugins/WebsiteMeasurable/Type.php | 2 +-
.../Fixtures/FewVisitsWithSetVisitorId.php | 2 +-
.../PHPUnit/Fixtures/LatestStableInstall.php | 2 +-
.../Fixtures/ManySitesImportedLogs.php | 4 +-
.../PHPUnit/Fixtures/ManyVisitsWithGeoIP.php | 2 +-
tests/PHPUnit/Fixtures/OmniFixture.php | 4 +-
.../RawArchiveDataWithTempAndInvalidated.php | 2 +-
...erSeveralDaysWithSearchEngineReferrers.php | 2 +-
.../TwoSitesTwoVisitorsDifferentDays.php | 2 +-
tests/PHPUnit/Fixtures/UITestFixture.php | 2 +-
tests/PHPUnit/Framework/Fixture.php | 22 ++--
.../Framework/Mock/LocationProvider.php | 2 +-
tests/PHPUnit/Framework/XssTesting.php | 2 +-
tests/PHPUnit/Integration/AccessTest.php | 2 +-
.../PluginUmdAssetFetcherTest.php | 10 +-
.../PHPUnit/Integration/AssetManagerTest.php | 32 ++---
.../Concurrency/DistributedListTest.php | 2 +-
.../DataAccess/ArchiveInvalidatorTest.php | 4 +-
.../DataAccess/ArchiveSelectorTest.php | 2 +-
.../Integration/ReleaseCheckListTest.php | 2 +-
.../Integration/Session/SessionAuthTest.php | 2 +-
.../PHPUnit/Integration/Tracker/ModelTest.php | 6 +-
.../Integration/Tracker/PingRequestTest.php | 18 +--
.../System/ArchiveInvalidationTest.php | 2 +-
.../System/BackwardsCompatibility1XTest.php | 2 +-
tests/PHPUnit/System/CookieTest.php | 6 +-
tests/PHPUnit/System/TrackerTest.php | 4 +-
tests/PHPUnit/Unit/CookieTest.php | 2 +-
.../Unit/Plugin/ComponentFactoryTest.php | 2 +-
.../Unit/Session/SessionFingerprintTest.php | 2 +-
351 files changed, 1246 insertions(+), 1246 deletions(-)
diff --git a/core/API/DataTableManipulator/LabelFilter.php b/core/API/DataTableManipulator/LabelFilter.php
index 19721619e77..91919ba714f 100644
--- a/core/API/DataTableManipulator/LabelFilter.php
+++ b/core/API/DataTableManipulator/LabelFilter.php
@@ -22,9 +22,9 @@
*/
class LabelFilter extends DataTableManipulator
{
- const SEPARATOR_RECURSIVE_LABEL = '>';
- const TERMINAL_OPERATOR = '@';
- const FLAG_IS_ROW_EVOLUTION = 'label_index';
+ public const SEPARATOR_RECURSIVE_LABEL = '>';
+ public const TERMINAL_OPERATOR = '@';
+ public const FLAG_IS_ROW_EVOLUTION = 'label_index';
private $labels;
private $addLabelIndex;
diff --git a/core/API/DataTablePostProcessor.php b/core/API/DataTablePostProcessor.php
index abd8c7253a2..1b1ee063116 100644
--- a/core/API/DataTablePostProcessor.php
+++ b/core/API/DataTablePostProcessor.php
@@ -31,7 +31,7 @@
*/
class DataTablePostProcessor
{
- const PROCESSED_METRICS_COMPUTED_FLAG = 'processed_metrics_computed';
+ public const PROCESSED_METRICS_COMPUTED_FLAG = 'processed_metrics_computed';
/**
* @var null|Report
diff --git a/core/Archive.php b/core/Archive.php
index 9870bd561ec..6fbb8f2436c 100644
--- a/core/Archive.php
+++ b/core/Archive.php
@@ -114,9 +114,9 @@
*/
class Archive implements ArchiveQuery
{
- const REQUEST_ALL_WEBSITES_FLAG = 'all';
- const ARCHIVE_ALL_PLUGINS_FLAG = 'all';
- const ID_SUBTABLE_LOAD_ALL_SUBTABLES = 'all';
+ public const REQUEST_ALL_WEBSITES_FLAG = 'all';
+ public const ARCHIVE_ALL_PLUGINS_FLAG = 'all';
+ public const ID_SUBTABLE_LOAD_ALL_SUBTABLES = 'all';
/**
* List of archive IDs for the site, periods and segment we are querying with.
diff --git a/core/Archive/ArchiveInvalidator.php b/core/Archive/ArchiveInvalidator.php
index ffe186259c4..652d9ee2e0f 100644
--- a/core/Archive/ArchiveInvalidator.php
+++ b/core/Archive/ArchiveInvalidator.php
@@ -56,10 +56,10 @@
*/
class ArchiveInvalidator
{
- const TRACKER_CACHE_KEY = 'ArchiveInvalidator.rememberToInvalidate';
+ public const TRACKER_CACHE_KEY = 'ArchiveInvalidator.rememberToInvalidate';
- const INVALIDATION_STATUS_QUEUED = 0;
- const INVALIDATION_STATUS_IN_PROGRESS = 1;
+ public const INVALIDATION_STATUS_QUEUED = 0;
+ public const INVALIDATION_STATUS_IN_PROGRESS = 1;
private $rememberArchivedReportIdStart = 'report_to_invalidate_';
diff --git a/core/Archive/Chunk.php b/core/Archive/Chunk.php
index 85e7d07c84c..9e9451e5074 100644
--- a/core/Archive/Chunk.php
+++ b/core/Archive/Chunk.php
@@ -18,8 +18,8 @@
*/
class Chunk
{
- const ARCHIVE_APPENDIX_SUBTABLES = 'chunk';
- const NUM_TABLES_IN_CHUNK = 100;
+ public const ARCHIVE_APPENDIX_SUBTABLES = 'chunk';
+ public const NUM_TABLES_IN_CHUNK = 100;
/**
* Gets the record name to use for a given tableId/subtableId.
diff --git a/core/Archive/DataCollection.php b/core/Archive/DataCollection.php
index 2ebb3a537a2..84fb71547cd 100644
--- a/core/Archive/DataCollection.php
+++ b/core/Archive/DataCollection.php
@@ -21,7 +21,7 @@
*/
class DataCollection
{
- const METADATA_CONTAINER_ROW_KEY = '_metadata';
+ public const METADATA_CONTAINER_ROW_KEY = '_metadata';
/**
* The archive data, indexed first by site ID and then by period date range. Eg,
diff --git a/core/Archive/DataTableFactory.php b/core/Archive/DataTableFactory.php
index abbc1779d1c..f78fa4d02e1 100644
--- a/core/Archive/DataTableFactory.php
+++ b/core/Archive/DataTableFactory.php
@@ -22,8 +22,8 @@
*/
class DataTableFactory
{
- const TABLE_METADATA_SEGMENT_INDEX = 'segment';
- const TABLE_METADATA_SEGMENT_PRETTY_INDEX = 'segmentPretty';
+ public const TABLE_METADATA_SEGMENT_INDEX = 'segment';
+ public const TABLE_METADATA_SEGMENT_PRETTY_INDEX = 'segmentPretty';
/**
* @see DataCollection::$dataNames.
@@ -87,8 +87,8 @@ class DataTableFactory
*/
private $defaultRow;
- const TABLE_METADATA_SITE_INDEX = 'site';
- const TABLE_METADATA_PERIOD_INDEX = 'period';
+ public const TABLE_METADATA_SITE_INDEX = 'site';
+ public const TABLE_METADATA_PERIOD_INDEX = 'period';
/**
* Constructor.
diff --git a/core/ArchiveProcessor/ArchivingStatus.php b/core/ArchiveProcessor/ArchivingStatus.php
index 10f32edd5f5..53978ef19dd 100644
--- a/core/ArchiveProcessor/ArchivingStatus.php
+++ b/core/ArchiveProcessor/ArchivingStatus.php
@@ -15,8 +15,8 @@
class ArchivingStatus
{
- const LOCK_KEY_PREFIX = 'Archiving';
- const DEFAULT_ARCHIVING_TTL = 7200; // 2 hours
+ public const LOCK_KEY_PREFIX = 'Archiving';
+ public const DEFAULT_ARCHIVING_TTL = 7200; // 2 hours
/**
* @var LockBackend
diff --git a/core/ArchiveProcessor/LoaderLock.php b/core/ArchiveProcessor/LoaderLock.php
index 8a3ff1ed250..83af8749dad 100644
--- a/core/ArchiveProcessor/LoaderLock.php
+++ b/core/ArchiveProcessor/LoaderLock.php
@@ -13,8 +13,8 @@
class LoaderLock
{
- const MAX_LEN_LOCK_NAME = 64;
- const MAX_LOCK_TIME = 60; //in seconds
+ public const MAX_LEN_LOCK_NAME = 64;
+ public const MAX_LOCK_TIME = 60; //in seconds
protected $id;
/**
diff --git a/core/ArchiveProcessor/Record.php b/core/ArchiveProcessor/Record.php
index 190fb12a445..e0549560c06 100644
--- a/core/ArchiveProcessor/Record.php
+++ b/core/ArchiveProcessor/Record.php
@@ -14,8 +14,8 @@
*/
class Record
{
- const TYPE_NUMERIC = 'numeric';
- const TYPE_BLOB = 'blob';
+ public const TYPE_NUMERIC = 'numeric';
+ public const TYPE_BLOB = 'blob';
/**
* @var string
diff --git a/core/ArchiveProcessor/Rules.php b/core/ArchiveProcessor/Rules.php
index a70ce91d939..d15f004caa3 100644
--- a/core/ArchiveProcessor/Rules.php
+++ b/core/ArchiveProcessor/Rules.php
@@ -30,11 +30,11 @@
*/
class Rules
{
- const OPTION_TODAY_ARCHIVE_TTL = 'todayArchiveTimeToLive';
+ public const OPTION_TODAY_ARCHIVE_TTL = 'todayArchiveTimeToLive';
- const OPTION_BROWSER_TRIGGER_ARCHIVING = 'enableBrowserTriggerArchiving';
+ public const OPTION_BROWSER_TRIGGER_ARCHIVING = 'enableBrowserTriggerArchiving';
- const FLAG_TABLE_PURGED = 'lastPurge_';
+ public const FLAG_TABLE_PURGED = 'lastPurge_';
/** Flag that will forcefully disable the archiving process (used in tests only) */
public static $archivingDisabledByTests = false;
diff --git a/core/Archiver/Request.php b/core/Archiver/Request.php
index e9a0ca54249..297f2ffabae 100644
--- a/core/Archiver/Request.php
+++ b/core/Archiver/Request.php
@@ -14,7 +14,7 @@ class Request
* If a request is aborted, the response of a CliMutli job will be a serialized array containing the
* key/value "aborted => 1".
*/
- const ABORT = 'abort';
+ public const ABORT = 'abort';
/**
* @var string
diff --git a/core/AssetManager.php b/core/AssetManager.php
index 1df72cf5e1c..1ba2e7d7dbb 100644
--- a/core/AssetManager.php
+++ b/core/AssetManager.php
@@ -39,17 +39,17 @@
*/
class AssetManager extends Singleton
{
- const MERGED_CSS_FILE = "asset_manager_global_css.css";
- const MERGED_CORE_JS_FILE = "asset_manager_core_js.js";
- const MERGED_NON_CORE_JS_FILE = "asset_manager_non_core_js.js";
-
- const CSS_IMPORT_DIRECTIVE = "\n";
- const JS_IMPORT_DIRECTIVE = "\n";
- const JS_DEFER_IMPORT_DIRECTIVE = "\n";
- const GET_CSS_MODULE_ACTION = "index.php?module=Proxy&action=getCss";
- const GET_CORE_JS_MODULE_ACTION = "index.php?module=Proxy&action=getCoreJs";
- const GET_NON_CORE_JS_MODULE_ACTION = "index.php?module=Proxy&action=getNonCoreJs";
- const GET_JS_UMD_MODULE_ACTION = "index.php?module=Proxy&action=getUmdJs&chunk=";
+ public const MERGED_CSS_FILE = "asset_manager_global_css.css";
+ public const MERGED_CORE_JS_FILE = "asset_manager_core_js.js";
+ public const MERGED_NON_CORE_JS_FILE = "asset_manager_non_core_js.js";
+
+ public const CSS_IMPORT_DIRECTIVE = "\n";
+ public const JS_IMPORT_DIRECTIVE = "\n";
+ public const JS_DEFER_IMPORT_DIRECTIVE = "\n";
+ public const GET_CSS_MODULE_ACTION = "index.php?module=Proxy&action=getCss";
+ public const GET_CORE_JS_MODULE_ACTION = "index.php?module=Proxy&action=getCoreJs";
+ public const GET_NON_CORE_JS_MODULE_ACTION = "index.php?module=Proxy&action=getNonCoreJs";
+ public const GET_JS_UMD_MODULE_ACTION = "index.php?module=Proxy&action=getUmdJs&chunk=";
/**
* @var UIAssetCacheBuster
diff --git a/core/AssetManager/UIAssetMinifier.php b/core/AssetManager/UIAssetMinifier.php
index 128e4314999..4ca55ce0d23 100644
--- a/core/AssetManager/UIAssetMinifier.php
+++ b/core/AssetManager/UIAssetMinifier.php
@@ -15,7 +15,7 @@
class UIAssetMinifier extends Singleton
{
- const MINIFIED_JS_RATIO = 100;
+ public const MINIFIED_JS_RATIO = 100;
protected function __construct()
{
diff --git a/core/AuthResult.php b/core/AuthResult.php
index 83cfcb5c4d9..85a0b450192 100644
--- a/core/AuthResult.php
+++ b/core/AuthResult.php
@@ -16,9 +16,9 @@
*/
class AuthResult
{
- const FAILURE = 0;
- const SUCCESS = 1;
- const SUCCESS_SUPERUSER_AUTH_CODE = 42;
+ public const FAILURE = 0;
+ public const SUCCESS = 1;
+ public const SUCCESS_SUPERUSER_AUTH_CODE = 42;
/**
* token_auth parameter used to authenticate in the API
diff --git a/core/Changes/Model.php b/core/Changes/Model.php
index e6d31bb24ed..b1a31d7b24b 100644
--- a/core/Changes/Model.php
+++ b/core/Changes/Model.php
@@ -26,9 +26,9 @@
*/
class Model
{
- const NO_CHANGES_EXIST = 0;
- const CHANGES_EXIST = 1;
- const NEW_CHANGES_EXIST = 2;
+ public const NO_CHANGES_EXIST = 0;
+ public const CHANGES_EXIST = 1;
+ public const NEW_CHANGES_EXIST = 2;
/**
* @var Db\AdapterInterface
diff --git a/core/CliMulti.php b/core/CliMulti.php
index 8ad8783aa57..e1b208a7860 100644
--- a/core/CliMulti.php
+++ b/core/CliMulti.php
@@ -22,7 +22,7 @@
*/
class CliMulti
{
- const BASE_WAIT_TIME = 250000; // 250 * 1000 = 250ms
+ public const BASE_WAIT_TIME = 250000; // 250 * 1000 = 250ms
/**
* If set to true or false it will overwrite whether async is supported or not.
diff --git a/core/CliMulti/Process.php b/core/CliMulti/Process.php
index 0be2bcd4cd1..fdd375674b0 100644
--- a/core/CliMulti/Process.php
+++ b/core/CliMulti/Process.php
@@ -23,8 +23,8 @@
*/
class Process
{
- const PS_COMMAND = 'ps x';
- const AWK_COMMAND = 'awk \'! /defunct/ {print $1}\'';
+ public const PS_COMMAND = 'ps x';
+ public const AWK_COMMAND = 'awk \'! /defunct/ {print $1}\'';
private $finished = null;
private $pidFile = '';
diff --git a/core/Columns/Dimension.php b/core/Columns/Dimension.php
index 9cb915dcae5..1d08a9e5462 100644
--- a/core/Columns/Dimension.php
+++ b/core/Columns/Dimension.php
@@ -27,29 +27,29 @@
*/
abstract class Dimension
{
- const COMPONENT_SUBNAMESPACE = 'Columns';
+ public const COMPONENT_SUBNAMESPACE = 'Columns';
/**
* Segment type 'dimension'. Can be used along with {@link setType()}.
* @api
*/
- const TYPE_DIMENSION = 'dimension';
- const TYPE_BINARY = 'binary';
- const TYPE_TEXT = 'text';
- const TYPE_ENUM = 'enum';
- const TYPE_MONEY = 'money';
- const TYPE_BYTE = 'byte';
- const TYPE_DURATION_MS = 'duration_ms';
- const TYPE_DURATION_S = 'duration_s';
- const TYPE_NUMBER = 'number';
- const TYPE_FLOAT = 'float';
- const TYPE_URL = 'url';
- const TYPE_DATE = 'date';
- const TYPE_TIME = 'time';
- const TYPE_DATETIME = 'datetime';
- const TYPE_TIMESTAMP = 'timestamp';
- const TYPE_BOOL = 'bool';
- const TYPE_PERCENT = 'percent';
+ public const TYPE_DIMENSION = 'dimension';
+ public const TYPE_BINARY = 'binary';
+ public const TYPE_TEXT = 'text';
+ public const TYPE_ENUM = 'enum';
+ public const TYPE_MONEY = 'money';
+ public const TYPE_BYTE = 'byte';
+ public const TYPE_DURATION_MS = 'duration_ms';
+ public const TYPE_DURATION_S = 'duration_s';
+ public const TYPE_NUMBER = 'number';
+ public const TYPE_FLOAT = 'float';
+ public const TYPE_URL = 'url';
+ public const TYPE_DATE = 'date';
+ public const TYPE_TIME = 'time';
+ public const TYPE_DATETIME = 'datetime';
+ public const TYPE_TIMESTAMP = 'timestamp';
+ public const TYPE_BOOL = 'bool';
+ public const TYPE_PERCENT = 'percent';
/**
* This will be the name of the column in the database table if a $columnType is specified.
diff --git a/core/Common.php b/core/Common.php
index 63864c78283..ae2fc03c9a3 100644
--- a/core/Common.php
+++ b/core/Common.php
@@ -24,21 +24,21 @@
class Common
{
// constants used to map the referrer type to an integer in the log_visit table
- const REFERRER_TYPE_DIRECT_ENTRY = 1;
- const REFERRER_TYPE_SEARCH_ENGINE = 2;
- const REFERRER_TYPE_WEBSITE = 3;
- const REFERRER_TYPE_CAMPAIGN = 6;
- const REFERRER_TYPE_SOCIAL_NETWORK = 7;
+ public const REFERRER_TYPE_DIRECT_ENTRY = 1;
+ public const REFERRER_TYPE_SEARCH_ENGINE = 2;
+ public const REFERRER_TYPE_WEBSITE = 3;
+ public const REFERRER_TYPE_CAMPAIGN = 6;
+ public const REFERRER_TYPE_SOCIAL_NETWORK = 7;
// Flag used with htmlspecialchar. See php.net/htmlspecialchars.
- const HTML_ENCODING_QUOTE_STYLE = ENT_QUOTES;
+ public const HTML_ENCODING_QUOTE_STYLE = ENT_QUOTES;
public static $isCliMode = null;
/*
* Database
*/
- const LANGUAGE_CODE_INVALID = 'xx';
+ public const LANGUAGE_CODE_INVALID = 'xx';
/**
* Hashes a string into an integer which should be very low collision risks
diff --git a/core/Concurrency/Lock.php b/core/Concurrency/Lock.php
index 4756cb37695..37124904e2e 100644
--- a/core/Concurrency/Lock.php
+++ b/core/Concurrency/Lock.php
@@ -15,8 +15,8 @@
class Lock
{
- const MAX_KEY_LEN = 70;
- const DEFAULT_TTL = 60;
+ public const MAX_KEY_LEN = 70;
+ public const DEFAULT_TTL = 60;
/**
* @var LockBackend
diff --git a/core/Concurrency/LockBackend/MySqlLockBackend.php b/core/Concurrency/LockBackend/MySqlLockBackend.php
index f0af6565148..7a8bcc21d8d 100644
--- a/core/Concurrency/LockBackend/MySqlLockBackend.php
+++ b/core/Concurrency/LockBackend/MySqlLockBackend.php
@@ -16,7 +16,7 @@
class MySqlLockBackend implements LockBackend
{
- const TABLE_NAME = 'locks';
+ public const TABLE_NAME = 'locks';
/**
* fyi: does not support list keys at the moment just because not really needed so much just yet
diff --git a/core/Config.php b/core/Config.php
index 1aab09bd2ae..36072ea8b5c 100644
--- a/core/Config.php
+++ b/core/Config.php
@@ -45,9 +45,9 @@
*/
class Config
{
- const DEFAULT_LOCAL_CONFIG_PATH = '/config/config.ini.php';
- const DEFAULT_COMMON_CONFIG_PATH = '/config/common.config.ini.php';
- const DEFAULT_GLOBAL_CONFIG_PATH = '/config/global.ini.php';
+ public const DEFAULT_LOCAL_CONFIG_PATH = '/config/config.ini.php';
+ public const DEFAULT_COMMON_CONFIG_PATH = '/config/common.config.ini.php';
+ public const DEFAULT_GLOBAL_CONFIG_PATH = '/config/global.ini.php';
/**
* @var boolean
diff --git a/core/Config/IniFileChain.php b/core/Config/IniFileChain.php
index 67a931d454e..fed7675fc11 100644
--- a/core/Config/IniFileChain.php
+++ b/core/Config/IniFileChain.php
@@ -37,7 +37,7 @@
*/
class IniFileChain
{
- const CONFIG_CACHE_KEY = 'config.ini';
+ public const CONFIG_CACHE_KEY = 'config.ini';
/**
* Maps INI file names with their parsed contents. The order of the files signifies the order
* in the chain. Files with lower index are overwritten/merged with files w/ a higher index.
diff --git a/core/Cookie.php b/core/Cookie.php
index 9a3794d1189..7f7b317f948 100644
--- a/core/Cookie.php
+++ b/core/Cookie.php
@@ -23,7 +23,7 @@ class Cookie
/**
* Don't create a cookie bigger than 1k
*/
- const MAX_COOKIE_SIZE = 1024;
+ public const MAX_COOKIE_SIZE = 1024;
/**
* The name of the cookie
@@ -76,7 +76,7 @@ class Cookie
/**
* The character used to separate the tuple name=value in the cookie
*/
- const VALUE_SEPARATOR = ':';
+ public const VALUE_SEPARATOR = ':';
/**
* Instantiate a new Cookie object and tries to load the cookie content if the cookie
diff --git a/core/CronArchive.php b/core/CronArchive.php
index 9b3f99c4273..116b8dafd25 100644
--- a/core/CronArchive.php
+++ b/core/CronArchive.php
@@ -44,30 +44,30 @@
class CronArchive
{
// the url can be set here before the init, and it will be used instead of --url=
- const CRON_INVALIDATION_TIME_OPTION_NAME = 'CronArchive.lastInvalidationTime';
+ public const CRON_INVALIDATION_TIME_OPTION_NAME = 'CronArchive.lastInvalidationTime';
public static $url = false;
- const TABLES_WITH_INVALIDATED_ARCHIVES = 'CronArchive.getTablesWithInvalidatedArchives';
- const TABLES_WITH_INVALIDATED_ARCHIVES_TTL = 3600;
+ public const TABLES_WITH_INVALIDATED_ARCHIVES = 'CronArchive.getTablesWithInvalidatedArchives';
+ public const TABLES_WITH_INVALIDATED_ARCHIVES_TTL = 3600;
// Max parallel requests for a same site's segments
- const MAX_CONCURRENT_API_REQUESTS = 3;
+ public const MAX_CONCURRENT_API_REQUESTS = 3;
// force-timeout-for-periods default (1 hour)
- const SECONDS_DELAY_BETWEEN_PERIOD_ARCHIVES = 3600;
+ public const SECONDS_DELAY_BETWEEN_PERIOD_ARCHIVES = 3600;
// Flag to know when the archive cron is calling the API
- const APPEND_TO_API_REQUEST = '&trigger=archivephp';
+ public const APPEND_TO_API_REQUEST = '&trigger=archivephp';
// Flag used to record timestamp in Option::
- const OPTION_ARCHIVING_FINISHED_TS = "LastCompletedFullArchiving";
+ public const OPTION_ARCHIVING_FINISHED_TS = "LastCompletedFullArchiving";
// Name of option used to store starting timestamp
- const OPTION_ARCHIVING_STARTED_TS = "LastFullArchivingStartTime";
+ public const OPTION_ARCHIVING_STARTED_TS = "LastFullArchivingStartTime";
// Show only first N characters from Piwik API output in case of errors
- const TRUNCATE_ERROR_MESSAGE_SUMMARY = 6000;
+ public const TRUNCATE_ERROR_MESSAGE_SUMMARY = 6000;
// By default, we only process the current week/month/year at most once an hour
private $todayArchiveTimeToLive;
@@ -94,7 +94,7 @@ class CronArchive
private $apiToInvalidateArchivedReport;
- const NO_ERROR = "no error";
+ public const NO_ERROR = "no error";
public $testmode = false;
diff --git a/core/CronArchive/ReArchiveList.php b/core/CronArchive/ReArchiveList.php
index f3fa74e543f..98883c532a1 100644
--- a/core/CronArchive/ReArchiveList.php
+++ b/core/CronArchive/ReArchiveList.php
@@ -14,7 +14,7 @@
class ReArchiveList extends DistributedList
{
- const OPTION_NAME = 'ReArchiveList';
+ public const OPTION_NAME = 'ReArchiveList';
public function __construct(LoggerInterface $logger = null)
{
diff --git a/core/CronArchive/SegmentArchiving.php b/core/CronArchive/SegmentArchiving.php
index 897152d663e..75af1107fcb 100644
--- a/core/CronArchive/SegmentArchiving.php
+++ b/core/CronArchive/SegmentArchiving.php
@@ -29,10 +29,10 @@
*/
class SegmentArchiving
{
- const BEGINNING_OF_TIME = 'beginning_of_time';
- const CREATION_TIME = 'segment_creation_time';
- const LAST_EDIT_TIME = 'segment_last_edit_time';
- const DEFAULT_BEGINNING_OF_TIME_LAST_N_YEARS = 7;
+ public const BEGINNING_OF_TIME = 'beginning_of_time';
+ public const CREATION_TIME = 'segment_creation_time';
+ public const LAST_EDIT_TIME = 'segment_last_edit_time';
+ public const DEFAULT_BEGINNING_OF_TIME_LAST_N_YEARS = 7;
/**
* @var Model
diff --git a/core/CronArchive/SharedSiteIds.php b/core/CronArchive/SharedSiteIds.php
index 3071939171f..f332d4895bc 100644
--- a/core/CronArchive/SharedSiteIds.php
+++ b/core/CronArchive/SharedSiteIds.php
@@ -19,9 +19,9 @@
*/
class SharedSiteIds
{
- const OPTION_DEFAULT = 'SharedSiteIdsToArchive';
- const OPTION_ALL_WEBSITES = 'SharedSiteIdsToArchive_AllWebsites';
- const KEY_TIMESTAMP = '_ResetQueueTime';
+ public const OPTION_DEFAULT = 'SharedSiteIdsToArchive';
+ public const OPTION_ALL_WEBSITES = 'SharedSiteIdsToArchive_AllWebsites';
+ public const KEY_TIMESTAMP = '_ResetQueueTime';
/**
* @var string
diff --git a/core/DataAccess/ArchiveSelector.php b/core/DataAccess/ArchiveSelector.php
index 830d82da633..1e6e3fbb833 100644
--- a/core/DataAccess/ArchiveSelector.php
+++ b/core/DataAccess/ArchiveSelector.php
@@ -38,9 +38,9 @@
*/
class ArchiveSelector
{
- const NB_VISITS_RECORD_LOOKED_UP = "nb_visits";
+ public const NB_VISITS_RECORD_LOOKED_UP = "nb_visits";
- const NB_VISITS_CONVERTED_RECORD_LOOKED_UP = "nb_visits_converted";
+ public const NB_VISITS_CONVERTED_RECORD_LOOKED_UP = "nb_visits_converted";
private static function getModel()
{
diff --git a/core/DataAccess/ArchiveTableCreator.php b/core/DataAccess/ArchiveTableCreator.php
index f4fed711828..c39d2a62faf 100644
--- a/core/DataAccess/ArchiveTableCreator.php
+++ b/core/DataAccess/ArchiveTableCreator.php
@@ -14,8 +14,8 @@
class ArchiveTableCreator
{
- const NUMERIC_TABLE = "numeric";
- const BLOB_TABLE = "blob";
+ public const NUMERIC_TABLE = "numeric";
+ public const BLOB_TABLE = "blob";
public static $tablesAlreadyInstalled = null;
diff --git a/core/DataAccess/ArchiveWriter.php b/core/DataAccess/ArchiveWriter.php
index 7831c9ae6af..0274bfb8073 100644
--- a/core/DataAccess/ArchiveWriter.php
+++ b/core/DataAccess/ArchiveWriter.php
@@ -32,14 +32,14 @@ class ArchiveWriter
*
* @var int
*/
- const DONE_OK = 1;
+ public const DONE_OK = 1;
/**
* Flag stored at the start of the archiving
* When requesting an Archive, we make sure that non-finished archive are not considered valid
*
* @var int
*/
- const DONE_ERROR = 2;
+ public const DONE_ERROR = 2;
/**
* Flag indicates the archive is over a period that is not finished, eg. the current day, current week, etc.
@@ -51,21 +51,21 @@ class ArchiveWriter
* @deprecated it should not be used anymore as temporary archives have been removed. It still exists though for
* historical reasons.
*/
- const DONE_OK_TEMPORARY = 3;
+ public const DONE_OK_TEMPORARY = 3;
/**
* Flag indicated that archive is done but was marked as invalid later and needs to be re-processed during next archiving process
*
* @var int
*/
- const DONE_INVALIDATED = 4;
+ public const DONE_INVALIDATED = 4;
/**
* Flag indicating that the archive is
*
* @var int
*/
- const DONE_PARTIAL = 5;
+ public const DONE_PARTIAL = 5;
protected $fields = ['idarchive',
'idsite',
@@ -81,7 +81,7 @@ class ArchiveWriter
'blob' => []
];
- const MAX_SPOOL_SIZE = 50;
+ public const MAX_SPOOL_SIZE = 50;
/**
* @var int|false
diff --git a/core/DataAccess/LogAggregator.php b/core/DataAccess/LogAggregator.php
index 8a470055a7b..72e3b580c5c 100644
--- a/core/DataAccess/LogAggregator.php
+++ b/core/DataAccess/LogAggregator.php
@@ -105,35 +105,35 @@
*/
class LogAggregator
{
- const LOG_VISIT_TABLE = 'log_visit';
+ public const LOG_VISIT_TABLE = 'log_visit';
- const LOG_ACTIONS_TABLE = 'log_link_visit_action';
+ public const LOG_ACTIONS_TABLE = 'log_link_visit_action';
- const LOG_CONVERSION_TABLE = "log_conversion";
+ public const LOG_CONVERSION_TABLE = "log_conversion";
- const REVENUE_SUBTOTAL_FIELD = 'revenue_subtotal';
+ public const REVENUE_SUBTOTAL_FIELD = 'revenue_subtotal';
- const REVENUE_TAX_FIELD = 'revenue_tax';
+ public const REVENUE_TAX_FIELD = 'revenue_tax';
- const REVENUE_SHIPPING_FIELD = 'revenue_shipping';
+ public const REVENUE_SHIPPING_FIELD = 'revenue_shipping';
- const REVENUE_DISCOUNT_FIELD = 'revenue_discount';
+ public const REVENUE_DISCOUNT_FIELD = 'revenue_discount';
- const TOTAL_REVENUE_FIELD = 'revenue';
+ public const TOTAL_REVENUE_FIELD = 'revenue';
- const ITEMS_COUNT_FIELD = "items";
+ public const ITEMS_COUNT_FIELD = "items";
- const CONVERSION_DATETIME_FIELD = "server_time";
+ public const CONVERSION_DATETIME_FIELD = "server_time";
- const ACTION_DATETIME_FIELD = "server_time";
+ public const ACTION_DATETIME_FIELD = "server_time";
- const VISIT_DATETIME_FIELD = 'visit_last_action_time';
+ public const VISIT_DATETIME_FIELD = 'visit_last_action_time';
- const IDGOAL_FIELD = 'idgoal';
+ public const IDGOAL_FIELD = 'idgoal';
- const FIELDS_SEPARATOR = ", \n\t\t\t";
+ public const FIELDS_SEPARATOR = ", \n\t\t\t";
- const LOG_TABLE_SEGMENT_TEMPORARY_PREFIX = 'logtmpsegment';
+ public const LOG_TABLE_SEGMENT_TEMPORARY_PREFIX = 'logtmpsegment';
/** @var \Piwik\Date */
protected $dateStart;
diff --git a/core/DataAccess/LogQueryBuilder.php b/core/DataAccess/LogQueryBuilder.php
index 46deb5f4872..ccb5fd5b349 100644
--- a/core/DataAccess/LogQueryBuilder.php
+++ b/core/DataAccess/LogQueryBuilder.php
@@ -17,7 +17,7 @@
class LogQueryBuilder
{
- const FORCE_INNER_GROUP_BY_NO_SUBSELECT = '__##nosubquery##__';
+ public const FORCE_INNER_GROUP_BY_NO_SUBSELECT = '__##nosubquery##__';
/**
* @var LogTablesProvider
diff --git a/core/DataAccess/RawLogDao.php b/core/DataAccess/RawLogDao.php
index 6373201b65e..501f3f835fb 100644
--- a/core/DataAccess/RawLogDao.php
+++ b/core/DataAccess/RawLogDao.php
@@ -20,7 +20,7 @@
*/
class RawLogDao
{
- const DELETE_UNUSED_ACTIONS_TEMP_TABLE_NAME = 'tmp_log_actions_to_keep';
+ public const DELETE_UNUSED_ACTIONS_TEMP_TABLE_NAME = 'tmp_log_actions_to_keep';
/**
* @var DimensionMetadataProvider
diff --git a/core/DataArray.php b/core/DataArray.php
index a8fe26baeaf..48ce7f7c52a 100644
--- a/core/DataArray.php
+++ b/core/DataArray.php
@@ -271,7 +271,7 @@ protected static function makeEmptyEventRow()
);
}
- const EVENT_VALUE_PRECISION = 2;
+ public const EVENT_VALUE_PRECISION = 2;
/**
* @param array $newRowToAdd
diff --git a/core/DataTable.php b/core/DataTable.php
index 108ec1c90ed..fb2fff249d8 100644
--- a/core/DataTable.php
+++ b/core/DataTable.php
@@ -166,19 +166,19 @@
*/
class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess
{
- const MAX_DEPTH_DEFAULT = 15;
+ public const MAX_DEPTH_DEFAULT = 15;
/** Name for metadata that describes the archiving state of a report */
- const ARCHIVE_STATE_METADATA_NAME = 'archive_state';
+ public const ARCHIVE_STATE_METADATA_NAME = 'archive_state';
/** Name for metadata that describes when a report was archived. */
- const ARCHIVED_DATE_METADATA_NAME = 'ts_archived';
+ public const ARCHIVED_DATE_METADATA_NAME = 'ts_archived';
/** Name for metadata that describes which columns are empty and should not be shown. */
- const EMPTY_COLUMNS_METADATA_NAME = 'empty_column';
+ public const EMPTY_COLUMNS_METADATA_NAME = 'empty_column';
/** Name for metadata that describes the number of rows that existed before the Limit filter was applied. */
- const TOTAL_ROWS_BEFORE_LIMIT_METADATA_NAME = 'total_rows_before_limit';
+ public const TOTAL_ROWS_BEFORE_LIMIT_METADATA_NAME = 'total_rows_before_limit';
/**
* Name for metadata that describes how individual columns should be aggregated when {@link addDataTable()}
@@ -193,36 +193,36 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess
*
* See {@link addDataTable()} and {@link DataTable\Row::sumRow()} for more information.
*/
- const COLUMN_AGGREGATION_OPS_METADATA_NAME = 'column_aggregation_ops';
+ public const COLUMN_AGGREGATION_OPS_METADATA_NAME = 'column_aggregation_ops';
/**
* Name for metadata that stores array of generic filters that should not be run on the table.
*/
- const GENERIC_FILTERS_TO_DISABLE_METADATA_NAME = 'generic_filters_to_disable';
+ public const GENERIC_FILTERS_TO_DISABLE_METADATA_NAME = 'generic_filters_to_disable';
/** The ID of the Summary Row. */
- const ID_SUMMARY_ROW = -1;
+ public const ID_SUMMARY_ROW = -1;
/**
* The ID of the special metadata row. This row only exists in the serialized row data and stores the datatable metadata.
*
* This allows us to save datatable metadata in archive data.
*/
- const ID_ARCHIVED_METADATA_ROW = -3;
+ public const ID_ARCHIVED_METADATA_ROW = -3;
/** The original label of the Summary Row. */
- const LABEL_SUMMARY_ROW = -1;
- const LABEL_TOTALS_ROW = -2;
- const LABEL_ARCHIVED_METADATA_ROW = '__datatable_metadata__';
+ public const LABEL_SUMMARY_ROW = -1;
+ public const LABEL_TOTALS_ROW = -2;
+ public const LABEL_ARCHIVED_METADATA_ROW = '__datatable_metadata__';
/**
* Name for metadata that contains extra {@link Piwik\Plugin\ProcessedMetric}s for a DataTable.
* These metrics will be added in addition to the ones specified in the table's associated
* {@link Piwik\Plugin\Report} class.
*/
- const EXTRA_PROCESSED_METRICS_METADATA_NAME = 'extra_processed_metrics';
+ public const EXTRA_PROCESSED_METRICS_METADATA_NAME = 'extra_processed_metrics';
- const ROW_IDENTIFIER_METADATA_NAME = 'rowIdentifier';
+ public const ROW_IDENTIFIER_METADATA_NAME = 'rowIdentifier';
/**
* Maximum nesting level.
diff --git a/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php b/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php
index 3bedacac1b3..9da9c6ad2de 100644
--- a/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php
+++ b/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php
@@ -68,41 +68,41 @@ class AddColumnsProcessedMetricsGoal extends AddColumnsProcessedMetrics
/**
* Process metrics for entry page views, with ECommerce
*/
- const GOALS_ENTRY_PAGES_ECOMMERCE = -6;
+ public const GOALS_ENTRY_PAGES_ECOMMERCE = -6;
/**
* Process for page views, with ECommerce
*/
- const GOALS_PAGES_ECOMMERCE = -5;
+ public const GOALS_PAGES_ECOMMERCE = -5;
/**
* Process metrics for entry page views
*/
- const GOALS_ENTRY_PAGES = -4;
+ public const GOALS_ENTRY_PAGES = -4;
/**
* Process for page views
*/
- const GOALS_PAGES = -3;
+ public const GOALS_PAGES = -3;
/**
* Process main goal metrics: conversion rate, revenue per visit
*/
- const GOALS_MINIMAL_REPORT = -2;
+ public const GOALS_MINIMAL_REPORT = -2;
/**
* Process main goal metrics, and conversion rate per goal
*/
- const GOALS_OVERVIEW = -1;
+ public const GOALS_OVERVIEW = -1;
/**
* Process all goal and per-goal metrics
*/
- const GOALS_FULL_TABLE = 0;
+ public const GOALS_FULL_TABLE = 0;
- const ACTIONS_PAGE_REPORTS_WITH_GOAL_METRICS = ['Actions.getPageUrls', 'Actions.getPageTitles'];
+ public const ACTIONS_PAGE_REPORTS_WITH_GOAL_METRICS = ['Actions.getPageUrls', 'Actions.getPageTitles'];
- const ACTIONS_ENTRY_PAGE_REPORTS_WITH_GOAL_METRICS = ['Actions.getEntryPageUrls', 'Actions.getEntryPageTitles'];
+ public const ACTIONS_ENTRY_PAGE_REPORTS_WITH_GOAL_METRICS = ['Actions.getEntryPageUrls', 'Actions.getEntryPageTitles'];
/**
* @var string
diff --git a/core/DataTable/Filter/ColumnDelete.php b/core/DataTable/Filter/ColumnDelete.php
index 1c43bafba52..23832e35d1f 100644
--- a/core/DataTable/Filter/ColumnDelete.php
+++ b/core/DataTable/Filter/ColumnDelete.php
@@ -50,7 +50,7 @@ class ColumnDelete extends BaseFilter
*
* Column will be kept, if they match any name in the $columnsToKeep, or if they look like anyColumnToKeep__anythingHere
*/
- const APPEND_TO_COLUMN_NAME_TO_KEEP = '__';
+ public const APPEND_TO_COLUMN_NAME_TO_KEEP = '__';
/**
* Delete the column, only if the value was zero
diff --git a/core/DataTable/Filter/ExcludeLowPopulation.php b/core/DataTable/Filter/ExcludeLowPopulation.php
index 5aa8dde3c90..7518dc7cd01 100644
--- a/core/DataTable/Filter/ExcludeLowPopulation.php
+++ b/core/DataTable/Filter/ExcludeLowPopulation.php
@@ -34,7 +34,7 @@
*/
class ExcludeLowPopulation extends BaseFilter
{
- const MINIMUM_SIGNIFICANT_PERCENTAGE_THRESHOLD = 0.02;
+ public const MINIMUM_SIGNIFICANT_PERCENTAGE_THRESHOLD = 0.02;
/**
* The minimum value to enforce in a datatable for a specified column. Rows found with
diff --git a/core/DataTable/Filter/SafeDecodeLabel.php b/core/DataTable/Filter/SafeDecodeLabel.php
index da3a8010719..136c8f42538 100644
--- a/core/DataTable/Filter/SafeDecodeLabel.php
+++ b/core/DataTable/Filter/SafeDecodeLabel.php
@@ -17,7 +17,7 @@
*/
class SafeDecodeLabel extends BaseFilter
{
- const APPLIED_METADATA_NAME = 'SafeDecodeLabelApplied';
+ public const APPLIED_METADATA_NAME = 'SafeDecodeLabelApplied';
private $columnToDecode;
diff --git a/core/DataTable/Filter/Sort.php b/core/DataTable/Filter/Sort.php
index defee633973..77cde0d7908 100644
--- a/core/DataTable/Filter/Sort.php
+++ b/core/DataTable/Filter/Sort.php
@@ -28,8 +28,8 @@ class Sort extends BaseFilter
protected $isSecondaryColumnSortEnabled;
protected $secondaryColumnSortCallback;
- const ORDER_DESC = 'desc';
- const ORDER_ASC = 'asc';
+ public const ORDER_DESC = 'desc';
+ public const ORDER_ASC = 'asc';
/**
* Constructor.
diff --git a/core/DataTable/Renderer/Csv.php b/core/DataTable/Renderer/Csv.php
index 11472990454..409d9b82970 100644
--- a/core/DataTable/Renderer/Csv.php
+++ b/core/DataTable/Renderer/Csv.php
@@ -67,7 +67,7 @@ class Csv extends Renderer
/**
* This string is also hardcoded in archive,sh
*/
- const NO_DATA_AVAILABLE = 'No data available';
+ public const NO_DATA_AVAILABLE = 'No data available';
private $unsupportedColumns = array();
diff --git a/core/DataTable/Row.php b/core/DataTable/Row.php
index 96146a8492b..b6dda7e609f 100644
--- a/core/DataTable/Row.php
+++ b/core/DataTable/Row.php
@@ -26,7 +26,7 @@
*/
class Row extends \ArrayObject
{
- const COMPARISONS_METADATA_NAME = 'comparisons';
+ public const COMPARISONS_METADATA_NAME = 'comparisons';
/**
* List of columns that cannot be summed. An associative array for speed.
@@ -53,9 +53,9 @@ class Row extends \ArrayObject
private $isSummaryRow = false;
- const COLUMNS = 0;
- const METADATA = 1;
- const DATATABLE_ASSOCIATED = 3;
+ public const COLUMNS = 0;
+ public const METADATA = 1;
+ public const DATATABLE_ASSOCIATED = 3;
/**
* Constructor.
diff --git a/core/Date.php b/core/Date.php
index f58e3555c19..57590f3f9ea 100644
--- a/core/Date.php
+++ b/core/Date.php
@@ -37,23 +37,23 @@
class Date
{
/** Number of seconds in a day. */
- const NUM_SECONDS_IN_DAY = 86400;
+ public const NUM_SECONDS_IN_DAY = 86400;
/** The default date time string format. */
- const DATE_TIME_FORMAT = 'Y-m-d H:i:s';
+ public const DATE_TIME_FORMAT = 'Y-m-d H:i:s';
/** Timestamp when first website came online - Tue, 06 Aug 1991 00:00:00 GMT. */
- const FIRST_WEBSITE_TIMESTAMP = 681436800;
-
- const DATETIME_FORMAT_LONG = DateTimeFormatProvider::DATE_FORMAT_LONG;
- const DATETIME_FORMAT_SHORT = DateTimeFormatProvider::DATETIME_FORMAT_SHORT;
- const DATE_FORMAT_LONG = DateTimeFormatProvider::DATE_FORMAT_LONG;
- const DATE_FORMAT_DAY_MONTH = DateTimeFormatProvider::DATE_FORMAT_DAY_MONTH;
- const DATE_FORMAT_SHORT = DateTimeFormatProvider::DATE_FORMAT_SHORT;
- const DATE_FORMAT_MONTH_SHORT = DateTimeFormatProvider::DATE_FORMAT_MONTH_SHORT;
- const DATE_FORMAT_MONTH_LONG = DateTimeFormatProvider::DATE_FORMAT_MONTH_LONG;
- const DATE_FORMAT_YEAR = DateTimeFormatProvider::DATE_FORMAT_YEAR;
- const TIME_FORMAT = DateTimeFormatProvider::TIME_FORMAT;
+ public const FIRST_WEBSITE_TIMESTAMP = 681436800;
+
+ public const DATETIME_FORMAT_LONG = DateTimeFormatProvider::DATE_FORMAT_LONG;
+ public const DATETIME_FORMAT_SHORT = DateTimeFormatProvider::DATETIME_FORMAT_SHORT;
+ public const DATE_FORMAT_LONG = DateTimeFormatProvider::DATE_FORMAT_LONG;
+ public const DATE_FORMAT_DAY_MONTH = DateTimeFormatProvider::DATE_FORMAT_DAY_MONTH;
+ public const DATE_FORMAT_SHORT = DateTimeFormatProvider::DATE_FORMAT_SHORT;
+ public const DATE_FORMAT_MONTH_SHORT = DateTimeFormatProvider::DATE_FORMAT_MONTH_SHORT;
+ public const DATE_FORMAT_MONTH_LONG = DateTimeFormatProvider::DATE_FORMAT_MONTH_LONG;
+ public const DATE_FORMAT_YEAR = DateTimeFormatProvider::DATE_FORMAT_YEAR;
+ public const TIME_FORMAT = DateTimeFormatProvider::TIME_FORMAT;
// for tests
public static $now = null;
diff --git a/core/Db.php b/core/Db.php
index df4b8d4103d..244e4d61e0e 100644
--- a/core/Db.php
+++ b/core/Db.php
@@ -32,7 +32,7 @@
*/
class Db
{
- const SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO';
+ public const SQL_MODE = 'NO_AUTO_VALUE_ON_ZERO';
private static $connection = null;
private static $readerConnection = null;
diff --git a/core/Db/Schema.php b/core/Db/Schema.php
index ce72f48dd0b..6e1549902c5 100644
--- a/core/Db/Schema.php
+++ b/core/Db/Schema.php
@@ -20,7 +20,7 @@
*/
class Schema extends Singleton
{
- const DEFAULT_SCHEMA = 'Mysql';
+ public const DEFAULT_SCHEMA = 'Mysql';
/**
* Type of database schema
diff --git a/core/Db/Schema/Mysql.php b/core/Db/Schema/Mysql.php
index bf9714ba969..83c06514a59 100644
--- a/core/Db/Schema/Mysql.php
+++ b/core/Db/Schema/Mysql.php
@@ -26,8 +26,8 @@
*/
class Mysql implements SchemaInterface
{
- const OPTION_NAME_MATOMO_INSTALL_VERSION = 'install_version';
- const MAX_TABLE_NAME_LENGTH = 64;
+ public const OPTION_NAME_MATOMO_INSTALL_VERSION = 'install_version';
+ public const MAX_TABLE_NAME_LENGTH = 64;
private $tablesInstalled = null;
diff --git a/core/Db/TransactionLevel.php b/core/Db/TransactionLevel.php
index 649a9d4bd0f..dd88d822af0 100644
--- a/core/Db/TransactionLevel.php
+++ b/core/Db/TransactionLevel.php
@@ -14,7 +14,7 @@
class TransactionLevel
{
- const TEST_OPTION_NAME = 'TransactionLevel.testOption';
+ public const TEST_OPTION_NAME = 'TransactionLevel.testOption';
private $statusBackup;
diff --git a/core/EventDispatcher.php b/core/EventDispatcher.php
index cc9b0d87f12..5a10e2d508e 100644
--- a/core/EventDispatcher.php
+++ b/core/EventDispatcher.php
@@ -26,9 +26,9 @@ public static function getInstance()
}
// implementation details for postEvent
- const EVENT_CALLBACK_GROUP_FIRST = 0;
- const EVENT_CALLBACK_GROUP_SECOND = 1;
- const EVENT_CALLBACK_GROUP_THIRD = 2;
+ public const EVENT_CALLBACK_GROUP_FIRST = 0;
+ public const EVENT_CALLBACK_GROUP_SECOND = 1;
+ public const EVENT_CALLBACK_GROUP_THIRD = 2;
/**
* Array of observers (callbacks attached to events) that are not methods
diff --git a/core/FrontController.php b/core/FrontController.php
index 84b6327e3d1..2a7f3895adb 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -65,9 +65,9 @@
*/
class FrontController extends Singleton
{
- const DEFAULT_MODULE = 'CoreHome';
- const DEFAULT_LOGIN = 'anonymous';
- const DEFAULT_TOKEN_AUTH = 'anonymous';
+ public const DEFAULT_MODULE = 'CoreHome';
+ public const DEFAULT_LOGIN = 'anonymous';
+ public const DEFAULT_TOKEN_AUTH = 'anonymous';
// public for tests
public static $requestId = null;
diff --git a/core/Intl/Data/Provider/DateTimeFormatProvider.php b/core/Intl/Data/Provider/DateTimeFormatProvider.php
index 0a9a2a9f1fa..5361a4c1618 100644
--- a/core/Intl/Data/Provider/DateTimeFormatProvider.php
+++ b/core/Intl/Data/Provider/DateTimeFormatProvider.php
@@ -13,15 +13,15 @@
*/
class DateTimeFormatProvider
{
- const DATETIME_FORMAT_LONG = 1;
- const DATETIME_FORMAT_SHORT = 2;
- const DATE_FORMAT_LONG = 10;
- const DATE_FORMAT_DAY_MONTH = 11;
- const DATE_FORMAT_SHORT = 12;
- const DATE_FORMAT_MONTH_SHORT = 13;
- const DATE_FORMAT_MONTH_LONG = 14;
- const DATE_FORMAT_YEAR = 15;
- const TIME_FORMAT = 20;
+ public const DATETIME_FORMAT_LONG = 1;
+ public const DATETIME_FORMAT_SHORT = 2;
+ public const DATE_FORMAT_LONG = 10;
+ public const DATE_FORMAT_DAY_MONTH = 11;
+ public const DATE_FORMAT_SHORT = 12;
+ public const DATE_FORMAT_MONTH_SHORT = 13;
+ public const DATE_FORMAT_MONTH_LONG = 14;
+ public const DATE_FORMAT_YEAR = 15;
+ public const TIME_FORMAT = 20;
/**
* Returns the format pattern for the given format type
diff --git a/core/Log.php b/core/Log.php
index cbc7e82e984..0077c52fed0 100644
--- a/core/Log.php
+++ b/core/Log.php
@@ -60,18 +60,18 @@
class Log extends Singleton
{
// log levels
- const NONE = 0;
- const ERROR = 1;
- const WARN = 2;
- const INFO = 3;
- const DEBUG = 4;
- const VERBOSE = 5;
+ public const NONE = 0;
+ public const ERROR = 1;
+ public const WARN = 2;
+ public const INFO = 3;
+ public const DEBUG = 4;
+ public const VERBOSE = 5;
// config option names
- const LOG_LEVEL_CONFIG_OPTION = 'log_level';
- const LOG_WRITERS_CONFIG_OPTION = 'log_writers';
- const LOGGER_FILE_PATH_CONFIG_OPTION = 'logger_file_path';
- const STRING_MESSAGE_FORMAT_OPTION = 'string_message_format';
+ public const LOG_LEVEL_CONFIG_OPTION = 'log_level';
+ public const LOG_WRITERS_CONFIG_OPTION = 'log_writers';
+ public const LOGGER_FILE_PATH_CONFIG_OPTION = 'logger_file_path';
+ public const STRING_MESSAGE_FORMAT_OPTION = 'string_message_format';
/**
* The backtrace string to use when testing.
diff --git a/core/Mail/EmailStyles.php b/core/Mail/EmailStyles.php
index e8417244cd1..6d2abfeb1b7 100644
--- a/core/Mail/EmailStyles.php
+++ b/core/Mail/EmailStyles.php
@@ -14,10 +14,10 @@
class EmailStyles
{
- const REPORT_TITLE_TEXT_SIZE = 24;
- const REPORT_TABLE_HEADER_TEXT_SIZE = 11;
- const REPORT_TABLE_ROW_TEXT_SIZE = '13px';
- const REPORT_BACK_TO_TOP_TEXT_SIZE = 9;
+ public const REPORT_TITLE_TEXT_SIZE = 24;
+ public const REPORT_TABLE_HEADER_TEXT_SIZE = 11;
+ public const REPORT_TABLE_ROW_TEXT_SIZE = '13px';
+ public const REPORT_BACK_TO_TOP_TEXT_SIZE = 9;
/**
* @var string
diff --git a/core/Measurable/Type.php b/core/Measurable/Type.php
index 98d1827f572..0c003e898d7 100644
--- a/core/Measurable/Type.php
+++ b/core/Measurable/Type.php
@@ -10,7 +10,7 @@
class Type
{
- const ID = '';
+ public const ID = '';
protected $name = 'General_Measurable';
protected $namePlural = 'General_Measurables';
protected $description = 'Default measurable type';
diff --git a/core/Metrics.php b/core/Metrics.php
index b77d2ce11d9..e47144368ca 100644
--- a/core/Metrics.php
+++ b/core/Metrics.php
@@ -30,84 +30,84 @@ class Metrics
* When saving DataTables in the DB, we replace all columns name with these IDs. This saves many bytes,
* eg. INDEX_NB_UNIQ_VISITORS is an integer: 4 bytes, but 'nb_uniq_visitors' is 16 bytes at least
*/
- const INDEX_NB_UNIQ_VISITORS = 1;
- const INDEX_NB_VISITS = 2;
- const INDEX_NB_ACTIONS = 3;
- const INDEX_MAX_ACTIONS = 4;
- const INDEX_SUM_VISIT_LENGTH = 5;
- const INDEX_BOUNCE_COUNT = 6;
- const INDEX_NB_VISITS_CONVERTED = 7;
- const INDEX_NB_CONVERSIONS = 8;
- const INDEX_REVENUE = 9;
- const INDEX_GOALS = 10;
- const INDEX_SUM_DAILY_NB_UNIQ_VISITORS = 11;
+ public const INDEX_NB_UNIQ_VISITORS = 1;
+ public const INDEX_NB_VISITS = 2;
+ public const INDEX_NB_ACTIONS = 3;
+ public const INDEX_MAX_ACTIONS = 4;
+ public const INDEX_SUM_VISIT_LENGTH = 5;
+ public const INDEX_BOUNCE_COUNT = 6;
+ public const INDEX_NB_VISITS_CONVERTED = 7;
+ public const INDEX_NB_CONVERSIONS = 8;
+ public const INDEX_REVENUE = 9;
+ public const INDEX_GOALS = 10;
+ public const INDEX_SUM_DAILY_NB_UNIQ_VISITORS = 11;
// Specific to the Actions reports
- const INDEX_PAGE_NB_HITS = 12;
- const INDEX_PAGE_SUM_TIME_SPENT = 13;
- const INDEX_PAGE_EXIT_NB_UNIQ_VISITORS = 14;
- const INDEX_PAGE_EXIT_NB_VISITS = 15;
- const INDEX_PAGE_EXIT_SUM_DAILY_NB_UNIQ_VISITORS = 16;
- const INDEX_PAGE_ENTRY_NB_UNIQ_VISITORS = 17;
- const INDEX_PAGE_ENTRY_SUM_DAILY_NB_UNIQ_VISITORS = 18;
- const INDEX_PAGE_ENTRY_NB_VISITS = 19;
- const INDEX_PAGE_ENTRY_NB_ACTIONS = 20;
- const INDEX_PAGE_ENTRY_SUM_VISIT_LENGTH = 21;
- const INDEX_PAGE_ENTRY_BOUNCE_COUNT = 22;
+ public const INDEX_PAGE_NB_HITS = 12;
+ public const INDEX_PAGE_SUM_TIME_SPENT = 13;
+ public const INDEX_PAGE_EXIT_NB_UNIQ_VISITORS = 14;
+ public const INDEX_PAGE_EXIT_NB_VISITS = 15;
+ public const INDEX_PAGE_EXIT_SUM_DAILY_NB_UNIQ_VISITORS = 16;
+ public const INDEX_PAGE_ENTRY_NB_UNIQ_VISITORS = 17;
+ public const INDEX_PAGE_ENTRY_SUM_DAILY_NB_UNIQ_VISITORS = 18;
+ public const INDEX_PAGE_ENTRY_NB_VISITS = 19;
+ public const INDEX_PAGE_ENTRY_NB_ACTIONS = 20;
+ public const INDEX_PAGE_ENTRY_SUM_VISIT_LENGTH = 21;
+ public const INDEX_PAGE_ENTRY_BOUNCE_COUNT = 22;
// Ecommerce Items reports
- const INDEX_ECOMMERCE_ITEM_REVENUE = 23;
- const INDEX_ECOMMERCE_ITEM_QUANTITY = 24;
- const INDEX_ECOMMERCE_ITEM_PRICE = 25;
- const INDEX_ECOMMERCE_ORDERS = 26;
- const INDEX_ECOMMERCE_ITEM_PRICE_VIEWED = 27;
+ public const INDEX_ECOMMERCE_ITEM_REVENUE = 23;
+ public const INDEX_ECOMMERCE_ITEM_QUANTITY = 24;
+ public const INDEX_ECOMMERCE_ITEM_PRICE = 25;
+ public const INDEX_ECOMMERCE_ORDERS = 26;
+ public const INDEX_ECOMMERCE_ITEM_PRICE_VIEWED = 27;
// Site Search
- const INDEX_SITE_SEARCH_HAS_NO_RESULT = 28;
- const INDEX_PAGE_IS_FOLLOWING_SITE_SEARCH_NB_HITS = 29;
+ public const INDEX_SITE_SEARCH_HAS_NO_RESULT = 28;
+ public const INDEX_PAGE_IS_FOLLOWING_SITE_SEARCH_NB_HITS = 29;
// Performance Analytics
- const INDEX_PAGE_SUM_TIME_GENERATION = 30;
- const INDEX_PAGE_NB_HITS_WITH_TIME_GENERATION = 31;
- const INDEX_PAGE_MIN_TIME_GENERATION = 32;
- const INDEX_PAGE_MAX_TIME_GENERATION = 33;
+ public const INDEX_PAGE_SUM_TIME_GENERATION = 30;
+ public const INDEX_PAGE_NB_HITS_WITH_TIME_GENERATION = 31;
+ public const INDEX_PAGE_MIN_TIME_GENERATION = 32;
+ public const INDEX_PAGE_MAX_TIME_GENERATION = 33;
// Events
- const INDEX_EVENT_NB_HITS = 34;
- const INDEX_EVENT_SUM_EVENT_VALUE = 35;
- const INDEX_EVENT_MIN_EVENT_VALUE = 36;
- const INDEX_EVENT_MAX_EVENT_VALUE = 37;
- const INDEX_EVENT_NB_HITS_WITH_VALUE = 38;
+ public const INDEX_EVENT_NB_HITS = 34;
+ public const INDEX_EVENT_SUM_EVENT_VALUE = 35;
+ public const INDEX_EVENT_MIN_EVENT_VALUE = 36;
+ public const INDEX_EVENT_MAX_EVENT_VALUE = 37;
+ public const INDEX_EVENT_NB_HITS_WITH_VALUE = 38;
// Number of unique User IDs
- const INDEX_NB_USERS = 39;
- const INDEX_SUM_DAILY_NB_USERS = 40;
+ public const INDEX_NB_USERS = 39;
+ public const INDEX_SUM_DAILY_NB_USERS = 40;
// Contents
- const INDEX_CONTENT_NB_IMPRESSIONS = 41;
- const INDEX_CONTENT_NB_INTERACTIONS = 42;
+ public const INDEX_CONTENT_NB_IMPRESSIONS = 41;
+ public const INDEX_CONTENT_NB_INTERACTIONS = 42;
// Unique visitors fingerprints (useful to process unique visitors across websites)
- const INDEX_NB_UNIQ_FINGERPRINTS = 43;
+ public const INDEX_NB_UNIQ_FINGERPRINTS = 43;
// Goal reports
- const INDEX_GOAL_NB_CONVERSIONS = 1;
- const INDEX_GOAL_REVENUE = 2;
- const INDEX_GOAL_NB_VISITS_CONVERTED = 3;
- const INDEX_GOAL_ECOMMERCE_REVENUE_SUBTOTAL = 4;
- const INDEX_GOAL_ECOMMERCE_REVENUE_TAX = 5;
- const INDEX_GOAL_ECOMMERCE_REVENUE_SHIPPING = 6;
- const INDEX_GOAL_ECOMMERCE_REVENUE_DISCOUNT = 7;
- const INDEX_GOAL_ECOMMERCE_ITEMS = 8;
- const INDEX_GOAL_NB_PAGES_UNIQ_BEFORE = 9;
- const INDEX_GOAL_NB_CONVERSIONS_ATTRIB = 10;
- const INDEX_GOAL_NB_CONVERSIONS_PAGE_RATE = 11;
- const INDEX_GOAL_NB_CONVERSIONS_PAGE_UNIQ = 12;
- const INDEX_GOAL_NB_CONVERSIONS_ENTRY_RATE = 13;
- const INDEX_GOAL_REVENUE_PER_ENTRY = 14;
- const INDEX_GOAL_REVENUE_ATTRIB = 15;
- const INDEX_GOAL_NB_CONVERSIONS_ENTRY = 16;
- const INDEX_GOAL_REVENUE_ENTRY = 17;
+ public const INDEX_GOAL_NB_CONVERSIONS = 1;
+ public const INDEX_GOAL_REVENUE = 2;
+ public const INDEX_GOAL_NB_VISITS_CONVERTED = 3;
+ public const INDEX_GOAL_ECOMMERCE_REVENUE_SUBTOTAL = 4;
+ public const INDEX_GOAL_ECOMMERCE_REVENUE_TAX = 5;
+ public const INDEX_GOAL_ECOMMERCE_REVENUE_SHIPPING = 6;
+ public const INDEX_GOAL_ECOMMERCE_REVENUE_DISCOUNT = 7;
+ public const INDEX_GOAL_ECOMMERCE_ITEMS = 8;
+ public const INDEX_GOAL_NB_PAGES_UNIQ_BEFORE = 9;
+ public const INDEX_GOAL_NB_CONVERSIONS_ATTRIB = 10;
+ public const INDEX_GOAL_NB_CONVERSIONS_PAGE_RATE = 11;
+ public const INDEX_GOAL_NB_CONVERSIONS_PAGE_UNIQ = 12;
+ public const INDEX_GOAL_NB_CONVERSIONS_ENTRY_RATE = 13;
+ public const INDEX_GOAL_REVENUE_PER_ENTRY = 14;
+ public const INDEX_GOAL_REVENUE_ATTRIB = 15;
+ public const INDEX_GOAL_NB_CONVERSIONS_ENTRY = 16;
+ public const INDEX_GOAL_REVENUE_ENTRY = 17;
public static $mappingFromIdToName = array(
Metrics::INDEX_NB_UNIQ_VISITORS => 'nb_uniq_visitors',
diff --git a/core/Metrics/Formatter.php b/core/Metrics/Formatter.php
index 6e22b877526..0045386c5fb 100644
--- a/core/Metrics/Formatter.php
+++ b/core/Metrics/Formatter.php
@@ -25,7 +25,7 @@
*/
class Formatter
{
- const PROCESSED_METRICS_FORMATTED_FLAG = 'processed_metrics_formatted';
+ public const PROCESSED_METRICS_FORMATTED_FLAG = 'processed_metrics_formatted';
/**
* Returns a prettified string representation of a number. The result will have
diff --git a/core/Notification.php b/core/Notification.php
index 16b1b195830..f59ff1720cf 100644
--- a/core/Notification.php
+++ b/core/Notification.php
@@ -47,30 +47,30 @@
*/
class Notification
{
- const CONTEXT_SUCCESS = 'success';
- const CONTEXT_ERROR = 'error';
- const CONTEXT_INFO = 'info';
- const CONTEXT_WARNING = 'warning';
+ public const CONTEXT_SUCCESS = 'success';
+ public const CONTEXT_ERROR = 'error';
+ public const CONTEXT_INFO = 'info';
+ public const CONTEXT_WARNING = 'warning';
/**
* Lowest priority value.
*/
- const PRIORITY_MIN = 1;
+ public const PRIORITY_MIN = 1;
/**
* Lower priority value.
*/
- const PRIORITY_LOW = 25;
+ public const PRIORITY_LOW = 25;
/**
* Higher priority value.
*/
- const PRIORITY_HIGH = 50;
+ public const PRIORITY_HIGH = 50;
/**
* Highest priority value.
*/
- const PRIORITY_MAX = 100;
+ public const PRIORITY_MAX = 100;
/**
* If this flag is applied, no close icon will be displayed. _Note: persistent notifications always have a close
@@ -78,31 +78,31 @@ class Notification
*
* See {@link $flags}.
*/
- const FLAG_NO_CLEAR = 1;
+ public const FLAG_NO_CLEAR = 1;
/**
* If this flag is applied, a close icon will be displayed.
*
* See {@link $flags}.
*/
- const FLAG_CLEAR = 0;
+ public const FLAG_CLEAR = 0;
/**
* Notifications of this type will be displayed for a few seconds and then faded out.
*/
- const TYPE_TOAST = 'toast';
+ public const TYPE_TOAST = 'toast';
/**
* Notifications of this type will be displayed until the new user explicitly closes the notification.
* The notifications will display even if the user reloads the page.
*/
- const TYPE_PERSISTENT = 'persistent';
+ public const TYPE_PERSISTENT = 'persistent';
/**
* Notifications of this type will be displayed only once. They will disappear after a page reload or
* change.
*/
- const TYPE_TRANSIENT = 'transient';
+ public const TYPE_TRANSIENT = 'transient';
/**
* The notification title. The title is optional and is displayed directly before the message content.
diff --git a/core/Notification/Manager.php b/core/Notification/Manager.php
index 6e1924e8738..0f8a2f24f2e 100644
--- a/core/Notification/Manager.php
+++ b/core/Notification/Manager.php
@@ -18,7 +18,7 @@
*/
class Manager
{
- const MAX_NOTIFICATIONS_IN_SESSION = 30;
+ public const MAX_NOTIFICATIONS_IN_SESSION = 30;
/**
* @var SessionNamespace
*/
diff --git a/core/Period/Day.php b/core/Period/Day.php
index ded459f84d2..dc0c95ba398 100644
--- a/core/Period/Day.php
+++ b/core/Period/Day.php
@@ -16,7 +16,7 @@
*/
class Day extends Period
{
- const PERIOD_ID = 1;
+ public const PERIOD_ID = 1;
protected $label = 'day';
diff --git a/core/Period/Month.php b/core/Period/Month.php
index 5eec43d8521..ab4ef33350d 100644
--- a/core/Period/Month.php
+++ b/core/Period/Month.php
@@ -15,7 +15,7 @@
*/
class Month extends Period
{
- const PERIOD_ID = 3;
+ public const PERIOD_ID = 3;
protected $label = 'month';
diff --git a/core/Period/Range.php b/core/Period/Range.php
index ed3e779d4b6..37496c7c23f 100644
--- a/core/Period/Range.php
+++ b/core/Period/Range.php
@@ -30,7 +30,7 @@
*/
class Range extends Period
{
- const PERIOD_ID = 5;
+ public const PERIOD_ID = 5;
protected $label = 'range';
protected $today;
diff --git a/core/Period/Week.php b/core/Period/Week.php
index 22c3cd53b13..8bbe33a4479 100644
--- a/core/Period/Week.php
+++ b/core/Period/Week.php
@@ -14,7 +14,7 @@
*/
class Week extends Period
{
- const PERIOD_ID = 2;
+ public const PERIOD_ID = 2;
protected $label = 'week';
diff --git a/core/Period/Year.php b/core/Period/Year.php
index 0d81c5e0c3b..bd1f6427c81 100644
--- a/core/Period/Year.php
+++ b/core/Period/Year.php
@@ -15,7 +15,7 @@
*/
class Year extends Period
{
- const PERIOD_ID = 4;
+ public const PERIOD_ID = 4;
protected $label = 'year';
diff --git a/core/Piwik.php b/core/Piwik.php
index d375e1008b4..df87cf92884 100644
--- a/core/Piwik.php
+++ b/core/Piwik.php
@@ -44,14 +44,14 @@ class Piwik
*
* @api
*/
- const LABEL_ID_GOAL_IS_ECOMMERCE_CART = 'ecommerceAbandonedCart';
+ public const LABEL_ID_GOAL_IS_ECOMMERCE_CART = 'ecommerceAbandonedCart';
/**
* The idGoal query parameter value for the special 'ecommerce' goal.
*
* @api
*/
- const LABEL_ID_GOAL_IS_ECOMMERCE_ORDER = 'ecommerceOrder';
+ public const LABEL_ID_GOAL_IS_ECOMMERCE_ORDER = 'ecommerceOrder';
/**
* Trigger E_USER_ERROR with optional message
diff --git a/core/Plugin/ArchivedMetric.php b/core/Plugin/ArchivedMetric.php
index 5328aa0b75f..bf00fdc254d 100644
--- a/core/Plugin/ArchivedMetric.php
+++ b/core/Plugin/ArchivedMetric.php
@@ -16,18 +16,18 @@
class ArchivedMetric extends Metric
{
- const AGGREGATION_COUNT = 'count(%s)';
- const AGGREGATION_COUNT_PREFIX = 'nb_';
- const AGGREGATION_SUM = 'sum(%s)';
- const AGGREGATION_SUM_PREFIX = 'sum_';
- const AGGREGATION_MAX = 'max(%s)';
- const AGGREGATION_MAX_PREFIX = 'max_';
- const AGGREGATION_MIN = 'min(%s)';
- const AGGREGATION_MIN_PREFIX = 'min_';
- const AGGREGATION_UNIQUE = 'count(distinct %s)';
- const AGGREGATION_UNIQUE_PREFIX = 'nb_uniq_';
- const AGGREGATION_COUNT_WITH_NUMERIC_VALUE = 'sum(if(%s > 0, 1, 0))';
- const AGGREGATION_COUNT_WITH_NUMERIC_VALUE_PREFIX = 'nb_with_';
+ public const AGGREGATION_COUNT = 'count(%s)';
+ public const AGGREGATION_COUNT_PREFIX = 'nb_';
+ public const AGGREGATION_SUM = 'sum(%s)';
+ public const AGGREGATION_SUM_PREFIX = 'sum_';
+ public const AGGREGATION_MAX = 'max(%s)';
+ public const AGGREGATION_MAX_PREFIX = 'max_';
+ public const AGGREGATION_MIN = 'min(%s)';
+ public const AGGREGATION_MIN_PREFIX = 'min_';
+ public const AGGREGATION_UNIQUE = 'count(distinct %s)';
+ public const AGGREGATION_UNIQUE_PREFIX = 'nb_uniq_';
+ public const AGGREGATION_COUNT_WITH_NUMERIC_VALUE = 'sum(if(%s > 0, 1, 0))';
+ public const AGGREGATION_COUNT_WITH_NUMERIC_VALUE_PREFIX = 'nb_with_';
/**
* @var string
diff --git a/core/Plugin/ComputedMetric.php b/core/Plugin/ComputedMetric.php
index c942d64e050..4f687c92156 100644
--- a/core/Plugin/ComputedMetric.php
+++ b/core/Plugin/ComputedMetric.php
@@ -18,8 +18,8 @@
class ComputedMetric extends ProcessedMetric
{
- const AGGREGATION_AVG = 'avg';
- const AGGREGATION_RATE = 'rate';
+ public const AGGREGATION_AVG = 'avg';
+ public const AGGREGATION_RATE = 'rate';
/**
* @var string
diff --git a/core/Plugin/Dimension/ActionDimension.php b/core/Plugin/Dimension/ActionDimension.php
index dd2e7af7bd8..b18d4c77cc9 100644
--- a/core/Plugin/Dimension/ActionDimension.php
+++ b/core/Plugin/Dimension/ActionDimension.php
@@ -33,7 +33,7 @@
*/
abstract class ActionDimension extends Dimension
{
- const INSTALLER_PREFIX = 'log_link_visit_action.';
+ public const INSTALLER_PREFIX = 'log_link_visit_action.';
protected $dbTableName = 'log_link_visit_action';
protected $category = 'General_Actions';
diff --git a/core/Plugin/Dimension/ConversionDimension.php b/core/Plugin/Dimension/ConversionDimension.php
index 1efbfbb2556..dc6fb4b9d20 100644
--- a/core/Plugin/Dimension/ConversionDimension.php
+++ b/core/Plugin/Dimension/ConversionDimension.php
@@ -34,7 +34,7 @@
*/
abstract class ConversionDimension extends Dimension
{
- const INSTALLER_PREFIX = 'log_conversion.';
+ public const INSTALLER_PREFIX = 'log_conversion.';
protected $dbTableName = 'log_conversion';
protected $category = 'Goals_Conversion';
diff --git a/core/Plugin/Dimension/VisitDimension.php b/core/Plugin/Dimension/VisitDimension.php
index ba63ded3db0..ead5cb8947d 100644
--- a/core/Plugin/Dimension/VisitDimension.php
+++ b/core/Plugin/Dimension/VisitDimension.php
@@ -37,7 +37,7 @@
*/
abstract class VisitDimension extends Dimension
{
- const INSTALLER_PREFIX = 'log_visit.';
+ public const INSTALLER_PREFIX = 'log_visit.';
protected $dbTableName = 'log_visit';
protected $category = 'General_Visitors';
diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php
index 30aea737b7a..8cfa726523f 100644
--- a/core/Plugin/Manager.php
+++ b/core/Plugin/Manager.php
@@ -40,8 +40,8 @@
*/
class Manager
{
- const LAST_PLUGIN_ACTIVATION_TIME_OPTION_PREFIX = 'LastPluginActivation.';
- const LAST_PLUGIN_DEACTIVATION_TIME_OPTION_PREFIX = 'LastPluginDeactivation.';
+ public const LAST_PLUGIN_ACTIVATION_TIME_OPTION_PREFIX = 'LastPluginActivation.';
+ public const LAST_PLUGIN_DEACTIVATION_TIME_OPTION_PREFIX = 'LastPluginDeactivation.';
/**
* @return self
@@ -67,7 +67,7 @@ public static function getInstance()
/**
* Default theme used in Piwik.
*/
- const DEFAULT_THEME = "Morpheus";
+ public const DEFAULT_THEME = "Morpheus";
protected $doLoadAlwaysActivatedPlugins = true;
@@ -195,7 +195,7 @@ public function getTrackerPluginsNotToLoad()
}
// If a plugin hooks onto at least an event starting with "Tracker.", we load the plugin during tracker
- const TRACKER_EVENT_PREFIX = 'Tracker.';
+ public const TRACKER_EVENT_PREFIX = 'Tracker.';
/**
* @param $pluginName
diff --git a/core/Plugin/MetadataLoader.php b/core/Plugin/MetadataLoader.php
index 865b1c3fd22..a9eeea82a06 100644
--- a/core/Plugin/MetadataLoader.php
+++ b/core/Plugin/MetadataLoader.php
@@ -24,7 +24,7 @@
*/
class MetadataLoader
{
- const PLUGIN_JSON_FILENAME = 'plugin.json';
+ public const PLUGIN_JSON_FILENAME = 'plugin.json';
/**
* The name of the plugin whose metadata will be loaded.
diff --git a/core/Plugin/Metric.php b/core/Plugin/Metric.php
index 8d2d8711146..dd90077e86e 100644
--- a/core/Plugin/Metric.php
+++ b/core/Plugin/Metric.php
@@ -33,7 +33,7 @@ abstract class Metric
/**
* The sub-namespace name in a plugin where Metric components are stored.
*/
- const COMPONENT_SUBNAMESPACE = 'Metrics';
+ public const COMPONENT_SUBNAMESPACE = 'Metrics';
/**
* Returns the column name of this metric, eg, `"nb_visits"` or `"avg_time_on_site"`.
diff --git a/core/Plugin/ProcessedMetric.php b/core/Plugin/ProcessedMetric.php
index ec5e7403f03..982dd7c416d 100644
--- a/core/Plugin/ProcessedMetric.php
+++ b/core/Plugin/ProcessedMetric.php
@@ -21,7 +21,7 @@ abstract class ProcessedMetric extends Metric
/**
* The sub-namespace name in a plugin where ProcessedMetrics are stored.
*/
- const COMPONENT_SUBNAMESPACE = 'Columns\\Metrics';
+ public const COMPONENT_SUBNAMESPACE = 'Columns\\Metrics';
/**
* Computes the metric using the values in a {@link Piwik\DataTable\Row}.
diff --git a/core/Plugin/Report.php b/core/Plugin/Report.php
index 3e3455d456c..c61cd09e6d2 100644
--- a/core/Plugin/Report.php
+++ b/core/Plugin/Report.php
@@ -38,13 +38,13 @@ class Report
/**
* The sub-namespace name in a plugin where Report components are stored.
*/
- const COMPONENT_SUBNAMESPACE = 'Reports';
+ public const COMPONENT_SUBNAMESPACE = 'Reports';
/**
* When added to the menu, a given report eg 'getCampaigns'
* will be routed as &action=menuGetCampaigns
*/
- const PREFIX_ACTION_IN_MENU = 'menu';
+ public const PREFIX_ACTION_IN_MENU = 'menu';
/**
* The name of the module which is supposed to be equal to the name of the plugin. The module is detected
diff --git a/core/Plugin/Segment.php b/core/Plugin/Segment.php
index f3dcb98f71c..81abdfb9f62 100644
--- a/core/Plugin/Segment.php
+++ b/core/Plugin/Segment.php
@@ -36,13 +36,13 @@ class Segment
* Segment type 'dimension'. Can be used along with {@link setType()}.
* @api
*/
- const TYPE_DIMENSION = 'dimension';
+ public const TYPE_DIMENSION = 'dimension';
/**
* Segment type 'metric'. Can be used along with {@link setType()}.
* @api
*/
- const TYPE_METRIC = 'metric';
+ public const TYPE_METRIC = 'metric';
private $type;
private $category;
diff --git a/core/Plugin/Tasks.php b/core/Plugin/Tasks.php
index 43e8bfe74c1..ab7de6d8246 100644
--- a/core/Plugin/Tasks.php
+++ b/core/Plugin/Tasks.php
@@ -25,11 +25,11 @@ class Tasks
*/
private $tasks = array();
- const LOWEST_PRIORITY = Task::LOWEST_PRIORITY;
- const LOW_PRIORITY = Task::LOW_PRIORITY;
- const NORMAL_PRIORITY = Task::NORMAL_PRIORITY;
- const HIGH_PRIORITY = Task::HIGH_PRIORITY;
- const HIGHEST_PRIORITY = Task::HIGHEST_PRIORITY;
+ public const LOWEST_PRIORITY = Task::LOWEST_PRIORITY;
+ public const LOW_PRIORITY = Task::LOW_PRIORITY;
+ public const NORMAL_PRIORITY = Task::NORMAL_PRIORITY;
+ public const HIGH_PRIORITY = Task::HIGH_PRIORITY;
+ public const HIGHEST_PRIORITY = Task::HIGHEST_PRIORITY;
/**
* This method is called to collect all schedule tasks. Register all your tasks here that should be executed
diff --git a/core/Plugin/ViewDataTable.php b/core/Plugin/ViewDataTable.php
index c4b9c93c5f5..ed812c396f7 100644
--- a/core/Plugin/ViewDataTable.php
+++ b/core/Plugin/ViewDataTable.php
@@ -143,7 +143,7 @@
*/
abstract class ViewDataTable implements ViewInterface
{
- const ID = '';
+ public const ID = '';
/**
* DataTable loaded from the API for this ViewDataTable.
diff --git a/core/Plugin/Visualization.php b/core/Plugin/Visualization.php
index 91e8f4e167c..b497793577b 100644
--- a/core/Plugin/Visualization.php
+++ b/core/Plugin/Visualization.php
@@ -154,7 +154,7 @@ class Visualization extends ViewDataTable
*
* @api
*/
- const TEMPLATE_FILE = '';
+ public const TEMPLATE_FILE = '';
private $templateVars = array();
private $reportLastUpdatedMessage = null;
diff --git a/core/ProfessionalServices/Advertising.php b/core/ProfessionalServices/Advertising.php
index 29a0665c702..ce45f127424 100644
--- a/core/ProfessionalServices/Advertising.php
+++ b/core/ProfessionalServices/Advertising.php
@@ -20,7 +20,7 @@
*/
class Advertising
{
- const CAMPAIGN_NAME_PROFESSIONAL_SERVICES = 'App_ProfessionalServices';
+ public const CAMPAIGN_NAME_PROFESSIONAL_SERVICES = 'App_ProfessionalServices';
/**
* @var Plugin\Manager
diff --git a/core/ProxyHttp.php b/core/ProxyHttp.php
index 38aaf848316..d33d13949f4 100644
--- a/core/ProxyHttp.php
+++ b/core/ProxyHttp.php
@@ -16,8 +16,8 @@
*/
class ProxyHttp
{
- const DEFLATE_ENCODING_REGEX = '/(?:^|, ?)(deflate)(?:,|$)/';
- const GZIP_ENCODING_REGEX = '/(?:^|, ?)((x-)?gzip)(?:,|$)/';
+ public const DEFLATE_ENCODING_REGEX = '/(?:^|, ?)(deflate)(?:,|$)/';
+ public const GZIP_ENCODING_REGEX = '/(?:^|, ?)((x-)?gzip)(?:,|$)/';
/**
* Returns true if the current request appears to be a secure HTTPS connection
diff --git a/core/RankingQuery.php b/core/RankingQuery.php
index 1b08e56ae7f..ebeb5ed18b0 100644
--- a/core/RankingQuery.php
+++ b/core/RankingQuery.php
@@ -43,7 +43,7 @@ class RankingQuery
{
// a special label used to mark the 'Others' row in a ranking query result set. this is mapped to the
// datatable summary row during archiving.
- const LABEL_SUMMARY_ROW = '__mtm_ranking_query_others__';
+ public const LABEL_SUMMARY_ROW = '__mtm_ranking_query_others__';
/**
* Contains the labels of the inner query.
diff --git a/core/ReportRenderer.php b/core/ReportRenderer.php
index ee1cd627264..63cfdc619aa 100644
--- a/core/ReportRenderer.php
+++ b/core/ReportRenderer.php
@@ -23,20 +23,20 @@
*/
abstract class ReportRenderer extends BaseFactory
{
- const DEFAULT_REPORT_FONT_FAMILY = 'dejavusans';
- const REPORT_TEXT_COLOR = "13,13,13";
- const REPORT_TITLE_TEXT_COLOR = "13,13,13";
- const TABLE_HEADER_BG_COLOR = "255,255,255";
- const TABLE_HEADER_TEXT_COLOR = "13,13,13";
- const TABLE_HEADER_TEXT_TRANSFORM = "uppercase";
- const TABLE_HEADER_TEXT_WEIGHT = "normal";
- const TABLE_CELL_BORDER_COLOR = "217,217,217";
- const TABLE_BG_COLOR = "242,242,242";
-
- const HTML_FORMAT = 'html';
- const PDF_FORMAT = 'pdf';
- const CSV_FORMAT = 'csv';
- const TSV_FORMAT = 'tsv';
+ public const DEFAULT_REPORT_FONT_FAMILY = 'dejavusans';
+ public const REPORT_TEXT_COLOR = "13,13,13";
+ public const REPORT_TITLE_TEXT_COLOR = "13,13,13";
+ public const TABLE_HEADER_BG_COLOR = "255,255,255";
+ public const TABLE_HEADER_TEXT_COLOR = "13,13,13";
+ public const TABLE_HEADER_TEXT_TRANSFORM = "uppercase";
+ public const TABLE_HEADER_TEXT_WEIGHT = "normal";
+ public const TABLE_CELL_BORDER_COLOR = "217,217,217";
+ public const TABLE_BG_COLOR = "242,242,242";
+
+ public const HTML_FORMAT = 'html';
+ public const PDF_FORMAT = 'pdf';
+ public const CSV_FORMAT = 'csv';
+ public const TSV_FORMAT = 'tsv';
protected $idSite = 'all';
diff --git a/core/ReportRenderer/Html.php b/core/ReportRenderer/Html.php
index 79c28175eda..e78cb2f9856 100644
--- a/core/ReportRenderer/Html.php
+++ b/core/ReportRenderer/Html.php
@@ -17,12 +17,12 @@
*/
class Html extends ReportRenderer
{
- const IMAGE_GRAPH_WIDTH = 700;
- const IMAGE_GRAPH_HEIGHT = 200;
+ public const IMAGE_GRAPH_WIDTH = 700;
+ public const IMAGE_GRAPH_HEIGHT = 200;
- const HTML_CONTENT_TYPE = 'text/html';
- const HTML_FILE_EXTENSION = 'html';
- const UNSUBSCRIBE_LINK_PLACEHOLDER = '__unsubscribeLink__';
+ public const HTML_CONTENT_TYPE = 'text/html';
+ public const HTML_FILE_EXTENSION = 'html';
+ public const UNSUBSCRIBE_LINK_PLACEHOLDER = '__unsubscribeLink__';
protected $renderImageInline = false;
diff --git a/core/ReportRenderer/Pdf.php b/core/ReportRenderer/Pdf.php
index eec163c305a..38dd64d854a 100644
--- a/core/ReportRenderer/Pdf.php
+++ b/core/ReportRenderer/Pdf.php
@@ -27,22 +27,22 @@
*/
class Pdf extends ReportRenderer
{
- const IMAGE_GRAPH_WIDTH_LANDSCAPE = 1050;
- const IMAGE_GRAPH_WIDTH_PORTRAIT = 760;
- const IMAGE_GRAPH_HEIGHT = 220;
+ public const IMAGE_GRAPH_WIDTH_LANDSCAPE = 1050;
+ public const IMAGE_GRAPH_WIDTH_PORTRAIT = 760;
+ public const IMAGE_GRAPH_HEIGHT = 220;
- const LANDSCAPE = 'L';
- const PORTRAIT = 'P';
+ public const LANDSCAPE = 'L';
+ public const PORTRAIT = 'P';
- const MAX_ROW_COUNT = 28;
- const TABLE_HEADER_ROW_COUNT = 6;
- const NO_DATA_ROW_COUNT = 6;
- const MAX_GRAPH_REPORTS = 3;
- const MAX_2COL_TABLE_REPORTS = 2;
+ public const MAX_ROW_COUNT = 28;
+ public const TABLE_HEADER_ROW_COUNT = 6;
+ public const NO_DATA_ROW_COUNT = 6;
+ public const MAX_GRAPH_REPORTS = 3;
+ public const MAX_2COL_TABLE_REPORTS = 2;
- const IMPORT_FONT_PATH = 'plugins/ImageGraph/fonts/unifont.ttf';
+ public const IMPORT_FONT_PATH = 'plugins/ImageGraph/fonts/unifont.ttf';
- const PDF_CONTENT_TYPE = 'pdf';
+ public const PDF_CONTENT_TYPE = 'pdf';
private $reportFontStyle = '';
private $reportSimpleFontSize = 9;
diff --git a/core/Scheduler/Schedule/Schedule.php b/core/Scheduler/Schedule/Schedule.php
index 552d9926c1b..ad13c79d036 100644
--- a/core/Scheduler/Schedule/Schedule.php
+++ b/core/Scheduler/Schedule/Schedule.php
@@ -20,13 +20,13 @@
*/
abstract class Schedule
{
- const PERIOD_NEVER = 'never';
- const PERIOD_DAY = 'day';
- const PERIOD_WEEK = 'week';
- const PERIOD_MONTH = 'month';
- const PERIOD_HOUR = 'hour';
- const PERIOD_YEAR = 'year';
- const PERIOD_RANGE = 'range';
+ public const PERIOD_NEVER = 'never';
+ public const PERIOD_DAY = 'day';
+ public const PERIOD_WEEK = 'week';
+ public const PERIOD_MONTH = 'month';
+ public const PERIOD_HOUR = 'hour';
+ public const PERIOD_YEAR = 'year';
+ public const PERIOD_RANGE = 'range';
/**
* @link http://php.net/manual/en/function.date.php, format string : 'G'
diff --git a/core/Scheduler/Task.php b/core/Scheduler/Task.php
index c7223d06733..ae8ddb8f431 100644
--- a/core/Scheduler/Task.php
+++ b/core/Scheduler/Task.php
@@ -20,11 +20,11 @@
*/
class Task
{
- const LOWEST_PRIORITY = 12;
- const LOW_PRIORITY = 9;
- const NORMAL_PRIORITY = 6;
- const HIGH_PRIORITY = 3;
- const HIGHEST_PRIORITY = 0;
+ public const LOWEST_PRIORITY = 12;
+ public const LOW_PRIORITY = 9;
+ public const NORMAL_PRIORITY = 6;
+ public const HIGH_PRIORITY = 3;
+ public const HIGHEST_PRIORITY = 0;
/**
* Object instance on which the method will be executed by the task scheduler
diff --git a/core/Scheduler/Timetable.php b/core/Scheduler/Timetable.php
index ccf14b4ff96..ddb824b0a3e 100644
--- a/core/Scheduler/Timetable.php
+++ b/core/Scheduler/Timetable.php
@@ -18,8 +18,8 @@
*/
class Timetable
{
- const TIMETABLE_OPTION_STRING = "TaskScheduler.timetable";
- const RETRY_OPTION_STRING = "TaskScheduler.retryList";
+ public const TIMETABLE_OPTION_STRING = "TaskScheduler.timetable";
+ public const RETRY_OPTION_STRING = "TaskScheduler.retryList";
private $timetable;
private $retryList;
diff --git a/core/Segment.php b/core/Segment.php
index 8b30c89b111..67f30532d18 100644
--- a/core/Segment.php
+++ b/core/Segment.php
@@ -101,10 +101,10 @@ class Segment
/**
* Truncate the Segments to 8k
*/
- const SEGMENT_TRUNCATE_LIMIT = 8192;
+ public const SEGMENT_TRUNCATE_LIMIT = 8192;
- const CACHE_KEY = 'segmenthashes';
- const SEGMENT_HAS_BUILT_CACHE_KEY = 'segmenthashbuilt';
+ public const CACHE_KEY = 'segmenthashes';
+ public const SEGMENT_HAS_BUILT_CACHE_KEY = 'segmenthashbuilt';
/**
* Constructor.
diff --git a/core/Segment/SegmentExpression.php b/core/Segment/SegmentExpression.php
index d8f2fd9abfb..e42a3818c16 100644
--- a/core/Segment/SegmentExpression.php
+++ b/core/Segment/SegmentExpression.php
@@ -16,48 +16,48 @@
*/
class SegmentExpression
{
- const AND_DELIMITER = ';';
- const OR_DELIMITER = ',';
-
- const MATCH_EQUAL = '==';
- const MATCH_NOT_EQUAL = '!=';
- const MATCH_GREATER_OR_EQUAL = '>=';
- const MATCH_LESS_OR_EQUAL = '<=';
- const MATCH_GREATER = '>';
- const MATCH_LESS = '<';
- const MATCH_CONTAINS = '=@';
- const MATCH_DOES_NOT_CONTAIN = '!@';
- const MATCH_STARTS_WITH = '=^';
- const MATCH_ENDS_WITH = '=$';
-
- const BOOL_OPERATOR_OR = 'OR';
- const BOOL_OPERATOR_AND = 'AND';
- const BOOL_OPERATOR_END = '';
+ public const AND_DELIMITER = ';';
+ public const OR_DELIMITER = ',';
+
+ public const MATCH_EQUAL = '==';
+ public const MATCH_NOT_EQUAL = '!=';
+ public const MATCH_GREATER_OR_EQUAL = '>=';
+ public const MATCH_LESS_OR_EQUAL = '<=';
+ public const MATCH_GREATER = '>';
+ public const MATCH_LESS = '<';
+ public const MATCH_CONTAINS = '=@';
+ public const MATCH_DOES_NOT_CONTAIN = '!@';
+ public const MATCH_STARTS_WITH = '=^';
+ public const MATCH_ENDS_WITH = '=$';
+
+ public const BOOL_OPERATOR_OR = 'OR';
+ public const BOOL_OPERATOR_AND = 'AND';
+ public const BOOL_OPERATOR_END = '';
// Note: you can't write this in the API, but access this feature
// via field!= <- IS NOT NULL
// or via field== <- IS NULL / empty
- const MATCH_IS_NOT_NULL_NOR_EMPTY = '::NOT_NULL';
- const MATCH_IS_NULL_OR_EMPTY = '::NULL';
+ public const MATCH_IS_NOT_NULL_NOR_EMPTY = '::NOT_NULL';
+ public const MATCH_IS_NULL_OR_EMPTY = '::NULL';
// Special case, since we look up Page URLs/Page titles in a sub SQL query
- const MATCH_ACTIONS_CONTAINS = 'IN';
- const MATCH_ACTIONS_NOT_CONTAINS = 'NOTIN';
+ public const MATCH_ACTIONS_CONTAINS = 'IN';
+ public const MATCH_ACTIONS_NOT_CONTAINS = 'NOTIN';
/**
* A special match type for segments that require rejecting a visit if any action/conversion/etc. in the visit matches a condition.
* These operands result in `idvisit NOT IN (...)` subqueries.
*/
- const MATCH_IDVISIT_NOT_IN = 'IDVISIT_NOTIN';
+ public const MATCH_IDVISIT_NOT_IN = 'IDVISIT_NOTIN';
- const INDEX_OPERAND_NAME = 0;
- const INDEX_OPERAND_OPERATOR = 1;
- const INDEX_OPERAND_VALUE = 2;
- const INDEX_OPERAND_JOIN_COLUMN = 3;
- const INDEX_OPERAND_SEGMENT_INFO = 4;
+ public const INDEX_OPERAND_NAME = 0;
+ public const INDEX_OPERAND_OPERATOR = 1;
+ public const INDEX_OPERAND_VALUE = 2;
+ public const INDEX_OPERAND_JOIN_COLUMN = 3;
+ public const INDEX_OPERAND_SEGMENT_INFO = 4;
- const SQL_WHERE_DO_NOT_MATCH_ANY_ROW = "(1 = 0)";
- const SQL_WHERE_MATCHES_ALL_ROWS = "(1 = 1)";
+ public const SQL_WHERE_DO_NOT_MATCH_ANY_ROW = "(1 = 0)";
+ public const SQL_WHERE_MATCHES_ALL_ROWS = "(1 = 1)";
protected $string;
protected $valuesBind = [];
diff --git a/core/Sequence.php b/core/Sequence.php
index 1d2d3c97c52..7bea6c3bc62 100644
--- a/core/Sequence.php
+++ b/core/Sequence.php
@@ -22,7 +22,7 @@
*/
class Sequence
{
- const TABLE_NAME = 'sequence';
+ public const TABLE_NAME = 'sequence';
/**
* @var string
*/
diff --git a/core/Session.php b/core/Session.php
index 3c7619cb718..e2fdefd6738 100644
--- a/core/Session.php
+++ b/core/Session.php
@@ -21,7 +21,7 @@
*/
class Session extends Zend_Session
{
- const SESSION_NAME = 'MATOMO_SESSID';
+ public const SESSION_NAME = 'MATOMO_SESSID';
public static $sessionName = self::SESSION_NAME;
diff --git a/core/Session/SaveHandler/DbTable.php b/core/Session/SaveHandler/DbTable.php
index 8fee216341d..4e08b744531 100644
--- a/core/Session/SaveHandler/DbTable.php
+++ b/core/Session/SaveHandler/DbTable.php
@@ -28,8 +28,8 @@ class DbTable implements Zend_Session_SaveHandler_Interface
protected $config;
protected $maxLifetime;
- const TABLE_NAME = 'session';
- const TOKEN_HASH_ALGO = 'sha512';
+ public const TABLE_NAME = 'session';
+ public const TOKEN_HASH_ALGO = 'sha512';
/**
* @param array $config
diff --git a/core/Session/SessionFingerprint.php b/core/Session/SessionFingerprint.php
index cfad2df5813..94c3270c6b3 100644
--- a/core/Session/SessionFingerprint.php
+++ b/core/Session/SessionFingerprint.php
@@ -37,12 +37,12 @@
class SessionFingerprint
{
// used in case the global.ini.php becomes corrupt or doesn't update properly
- const DEFAULT_IDLE_TIMEOUT = 3600;
+ public const DEFAULT_IDLE_TIMEOUT = 3600;
- const USER_NAME_SESSION_VAR_NAME = 'user.name';
- const SESSION_INFO_SESSION_VAR_NAME = 'session.info';
- const SESSION_INFO_TWO_FACTOR_AUTH_VERIFIED = 'twofactorauth.verified';
- const SESSION_INFO_TEMP_TOKEN_AUTH = 'user.token_auth_temp';
+ public const USER_NAME_SESSION_VAR_NAME = 'user.name';
+ public const SESSION_INFO_SESSION_VAR_NAME = 'session.info';
+ public const SESSION_INFO_TWO_FACTOR_AUTH_VERIFIED = 'twofactorauth.verified';
+ public const SESSION_INFO_TEMP_TOKEN_AUTH = 'user.token_auth_temp';
public function getUser()
{
diff --git a/core/Settings/FieldConfig.php b/core/Settings/FieldConfig.php
index 255d0b3e26d..339c6b80ca3 100644
--- a/core/Settings/FieldConfig.php
+++ b/core/Settings/FieldConfig.php
@@ -20,94 +20,94 @@ class FieldConfig
/**
* Shows a radio field. To use this field assign it to the `$uiControl` property.
*/
- const UI_CONTROL_RADIO = 'radio';
+ public const UI_CONTROL_RADIO = 'radio';
/**
* Shows a text field. To use this field assign it to the `$uiControl` property.
*/
- const UI_CONTROL_TEXT = 'text';
+ public const UI_CONTROL_TEXT = 'text';
/**
* Shows an email text field. To use this field assign it to the `$uiControl` property.
*/
- const UI_CONTROL_EMAIL = 'email';
+ public const UI_CONTROL_EMAIL = 'email';
/**
* Shows a URL text field. To use this field assign it to the `$uiControl` property.
*/
- const UI_CONTROL_URL = 'url';
+ public const UI_CONTROL_URL = 'url';
/**
* Shows a text area. To use this field assign it to the `$uiControl` property.
*/
- const UI_CONTROL_TEXTAREA = 'textarea';
+ public const UI_CONTROL_TEXTAREA = 'textarea';
/**
* Shows a checkbox. To use this field assign it to the `$uiControl` property.
*/
- const UI_CONTROL_CHECKBOX = 'checkbox';
+ public const UI_CONTROL_CHECKBOX = 'checkbox';
/**
* Shows a password field. To use this field assign it to the `$uiControl` property.
*/
- const UI_CONTROL_PASSWORD = 'password';
+ public const UI_CONTROL_PASSWORD = 'password';
/**
* Shows a select field where a user can select multiple values.
* The type "Array" is required for this ui control. To use this field assign it to the `$uiControl` property.
*/
- const UI_CONTROL_MULTI_SELECT = 'multiselect';
+ public const UI_CONTROL_MULTI_SELECT = 'multiselect';
/**
* Shows a select field. To use this field assign it to the `$uiControl` property.
*/
- const UI_CONTROL_SINGLE_SELECT = 'select';
+ public const UI_CONTROL_SINGLE_SELECT = 'select';
/**
* Shows an expandable select field which is useful when each selectable value belongs to a group.
* To use this field assign it to the `$uiControl` property.
*/
- const UI_CONTROL_SINGLE_EXPANDABLE_SELECT = 'expandable-select';
+ public const UI_CONTROL_SINGLE_EXPANDABLE_SELECT = 'expandable-select';
/**
* Lets a user configure an array of form fields.
*/
- const UI_CONTROL_FIELD_ARRAY = 'field-array';
+ public const UI_CONTROL_FIELD_ARRAY = 'field-array';
/**
* Lets a user configure two form fields next to each other, and add multiple entries of those two pairs.
*/
- const UI_CONTROL_MULTI_TUPLE = 'multituple';
+ public const UI_CONTROL_MULTI_TUPLE = 'multituple';
/**
* Generates a hidden form field. To use this field assign it to the `$uiControl` property.
*/
- const UI_CONTROL_HIDDEN = 'hidden';
+ public const UI_CONTROL_HIDDEN = 'hidden';
/**
* Expects an integer value. Is usually used when creating a setting.
*/
- const TYPE_INT = 'integer';
+ public const TYPE_INT = 'integer';
/**
* Expects a float value. Is usually used when creating a setting.
*/
- const TYPE_FLOAT = 'float';
+ public const TYPE_FLOAT = 'float';
/**
* Expects a string. Is usually used when creating a setting.
*/
- const TYPE_STRING = 'string';
+ public const TYPE_STRING = 'string';
/**
* Expects a boolean. Is usually used when creating a setting.
*/
- const TYPE_BOOL = 'boolean';
+ public const TYPE_BOOL = 'boolean';
/**
* Expects an array containing multiple values.
*/
- const TYPE_ARRAY = 'array';
+ public const TYPE_ARRAY = 'array';
/**
* Describes what HTML element should be used to manipulate the setting through Piwik's UI.
diff --git a/core/Site.php b/core/Site.php
index 1efda88bf85..1f07b727b62 100644
--- a/core/Site.php
+++ b/core/Site.php
@@ -41,7 +41,7 @@
*/
class Site
{
- const DEFAULT_SITE_TYPE = "website";
+ public const DEFAULT_SITE_TYPE = "website";
private static $intProperties = [
'idsite',
diff --git a/core/Tracker.php b/core/Tracker.php
index e7c8eea94c8..b619737b9ad 100644
--- a/core/Tracker.php
+++ b/core/Tracker.php
@@ -39,8 +39,8 @@ class Tracker
private static $db = null;
// We use hex ID that are 16 chars in length, ie. 64 bits IDs
- const LENGTH_HEX_ID_STRING = 16;
- const LENGTH_BINARY_ID = 8;
+ public const LENGTH_HEX_ID_STRING = 16;
+ public const LENGTH_BINARY_ID = 8;
public static $initTrackerMode = false;
diff --git a/core/Tracker/Action.php b/core/Tracker/Action.php
index cc3a6532d84..2ff6d75e35e 100644
--- a/core/Tracker/Action.php
+++ b/core/Tracker/Action.php
@@ -22,27 +22,27 @@
*/
abstract class Action
{
- const TYPE_PAGE_URL = 1;
- const TYPE_OUTLINK = 2;
- const TYPE_DOWNLOAD = 3;
- const TYPE_PAGE_TITLE = 4;
- const TYPE_ECOMMERCE_ITEM_SKU = 5;
- const TYPE_ECOMMERCE_ITEM_NAME = 6;
- const TYPE_ECOMMERCE_ITEM_CATEGORY = 7;
- const TYPE_SITE_SEARCH = 8;
-
- const TYPE_EVENT = 10; // Alias TYPE_EVENT_CATEGORY
- const TYPE_EVENT_CATEGORY = 10;
- const TYPE_EVENT_ACTION = 11;
- const TYPE_EVENT_NAME = 12;
-
- const TYPE_CONTENT = 13; // Alias TYPE_CONTENT_NAME
- const TYPE_CONTENT_NAME = 13;
- const TYPE_CONTENT_PIECE = 14;
- const TYPE_CONTENT_TARGET = 15;
- const TYPE_CONTENT_INTERACTION = 16;
-
- const DB_COLUMN_CUSTOM_FLOAT = 'custom_float';
+ public const TYPE_PAGE_URL = 1;
+ public const TYPE_OUTLINK = 2;
+ public const TYPE_DOWNLOAD = 3;
+ public const TYPE_PAGE_TITLE = 4;
+ public const TYPE_ECOMMERCE_ITEM_SKU = 5;
+ public const TYPE_ECOMMERCE_ITEM_NAME = 6;
+ public const TYPE_ECOMMERCE_ITEM_CATEGORY = 7;
+ public const TYPE_SITE_SEARCH = 8;
+
+ public const TYPE_EVENT = 10; // Alias TYPE_EVENT_CATEGORY
+ public const TYPE_EVENT_CATEGORY = 10;
+ public const TYPE_EVENT_ACTION = 11;
+ public const TYPE_EVENT_NAME = 12;
+
+ public const TYPE_CONTENT = 13; // Alias TYPE_CONTENT_NAME
+ public const TYPE_CONTENT_NAME = 13;
+ public const TYPE_CONTENT_PIECE = 14;
+ public const TYPE_CONTENT_TARGET = 15;
+ public const TYPE_CONTENT_INTERACTION = 16;
+
+ public const DB_COLUMN_CUSTOM_FLOAT = 'custom_float';
private static $factoryPriority = array(
self::TYPE_PAGE_URL,
diff --git a/core/Tracker/Failures.php b/core/Tracker/Failures.php
index a849ffacb46..a741081d411 100644
--- a/core/Tracker/Failures.php
+++ b/core/Tracker/Failures.php
@@ -20,9 +20,9 @@
class Failures
{
- const CLEANUP_OLD_FAILURES_DAYS = 2;
- const FAILURE_ID_INVALID_SITE = 1;
- const FAILURE_ID_NOT_AUTHENTICATED = 2;
+ public const CLEANUP_OLD_FAILURES_DAYS = 2;
+ public const FAILURE_ID_INVALID_SITE = 1;
+ public const FAILURE_ID_NOT_AUTHENTICATED = 2;
private $table = 'tracking_failure';
private $tablePrefixed;
diff --git a/core/Tracker/FingerprintSalt.php b/core/Tracker/FingerprintSalt.php
index c3d056ba74e..592d2dd79ac 100644
--- a/core/Tracker/FingerprintSalt.php
+++ b/core/Tracker/FingerprintSalt.php
@@ -15,8 +15,8 @@
class FingerprintSalt
{
- const OPTION_PREFIX = 'fingerprint_salt_';
- const DELETE_FINGERPRINT_OLDER_THAN_SECONDS = 432000; // 5 days in seconds
+ public const OPTION_PREFIX = 'fingerprint_salt_';
+ public const DELETE_FINGERPRINT_OLDER_THAN_SECONDS = 432000; // 5 days in seconds
public function generateSalt()
{
diff --git a/core/Tracker/GoalManager.php b/core/Tracker/GoalManager.php
index 14e5b6d975e..83ecaa52473 100644
--- a/core/Tracker/GoalManager.php
+++ b/core/Tracker/GoalManager.php
@@ -27,37 +27,37 @@
class GoalManager
{
// log_visit.visit_goal_buyer
- const TYPE_BUYER_OPEN_CART = 2;
- const TYPE_BUYER_ORDERED_AND_OPEN_CART = 3;
+ public const TYPE_BUYER_OPEN_CART = 2;
+ public const TYPE_BUYER_ORDERED_AND_OPEN_CART = 3;
// log_conversion.idorder is NULLable, but not log_conversion_item which defaults to zero for carts
- const ITEM_IDORDER_ABANDONED_CART = 0;
+ public const ITEM_IDORDER_ABANDONED_CART = 0;
// log_conversion.idgoal special values
- const IDGOAL_CART = -1;
- const IDGOAL_ORDER = 0;
+ public const IDGOAL_CART = -1;
+ public const IDGOAL_ORDER = 0;
- const REVENUE_PRECISION = 2;
+ public const REVENUE_PRECISION = 2;
- const MAXIMUM_PRODUCT_CATEGORIES = 5;
+ public const MAXIMUM_PRODUCT_CATEGORIES = 5;
// In the GET items parameter, each item has the following array of information
- const INDEX_ITEM_SKU = 0;
- const INDEX_ITEM_NAME = 1;
- const INDEX_ITEM_CATEGORY = 2;
- const INDEX_ITEM_PRICE = 3;
- const INDEX_ITEM_QUANTITY = 4;
+ public const INDEX_ITEM_SKU = 0;
+ public const INDEX_ITEM_NAME = 1;
+ public const INDEX_ITEM_CATEGORY = 2;
+ public const INDEX_ITEM_PRICE = 3;
+ public const INDEX_ITEM_QUANTITY = 4;
// Used in the array of items, internally to this class
- const INTERNAL_ITEM_SKU = 0;
- const INTERNAL_ITEM_NAME = 1;
- const INTERNAL_ITEM_CATEGORY = 2;
- const INTERNAL_ITEM_CATEGORY2 = 3;
- const INTERNAL_ITEM_CATEGORY3 = 4;
- const INTERNAL_ITEM_CATEGORY4 = 5;
- const INTERNAL_ITEM_CATEGORY5 = 6;
- const INTERNAL_ITEM_PRICE = 7;
- const INTERNAL_ITEM_QUANTITY = 8;
+ public const INTERNAL_ITEM_SKU = 0;
+ public const INTERNAL_ITEM_NAME = 1;
+ public const INTERNAL_ITEM_CATEGORY = 2;
+ public const INTERNAL_ITEM_CATEGORY2 = 3;
+ public const INTERNAL_ITEM_CATEGORY3 = 4;
+ public const INTERNAL_ITEM_CATEGORY4 = 5;
+ public const INTERNAL_ITEM_CATEGORY5 = 6;
+ public const INTERNAL_ITEM_PRICE = 7;
+ public const INTERNAL_ITEM_QUANTITY = 8;
public static $NUMERIC_MATCH_ATTRIBUTES = [
'visit_duration',
diff --git a/core/Tracker/Model.php b/core/Tracker/Model.php
index 80bf32c3c57..3f5b38d5072 100644
--- a/core/Tracker/Model.php
+++ b/core/Tracker/Model.php
@@ -16,7 +16,7 @@
class Model
{
- const CACHE_KEY_INDEX_IDSITE_IDVISITOR_TIME = 'log_visit_has_index_idsite_idvisitor_time';
+ public const CACHE_KEY_INDEX_IDSITE_IDVISITOR_TIME = 'log_visit_has_index_idsite_idvisitor_time';
/**
* Write an visit action record to the database
diff --git a/core/Tracker/Request.php b/core/Tracker/Request.php
index 501aa332031..a6e3e44d8e7 100644
--- a/core/Tracker/Request.php
+++ b/core/Tracker/Request.php
@@ -56,7 +56,7 @@ class Request
*/
private $requestMetadata = array();
- const UNKNOWN_RESOLUTION = 'unknown';
+ public const UNKNOWN_RESOLUTION = 'unknown';
private $customTimestampDoesNotRequireTokenauthWhenNewerThan;
diff --git a/core/Tracker/Settings.php b/core/Tracker/Settings.php
index 96e640164fe..48fac9e46b8 100644
--- a/core/Tracker/Settings.php
+++ b/core/Tracker/Settings.php
@@ -17,7 +17,7 @@
class Settings // TODO: merge w/ visitor recognizer or make it it's own service. the class name is required for BC.
{
- const OS_BOT = 'BOT';
+ public const OS_BOT = 'BOT';
/**
* If `true`, the config ID for a visitor will be the same no matter what site is being tracked.
diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php
index 7e5f542fda1..acc7d4f4abf 100644
--- a/core/Tracker/Visit.php
+++ b/core/Tracker/Visit.php
@@ -36,7 +36,7 @@
*/
class Visit implements VisitInterface
{
- const UNKNOWN_CODE = 'xx';
+ public const UNKNOWN_CODE = 'xx';
/**
* @var GoalManager
diff --git a/core/Tracker/Visit/ReferrerSpamFilter.php b/core/Tracker/Visit/ReferrerSpamFilter.php
index 9b026dfa09a..74188a70899 100644
--- a/core/Tracker/Visit/ReferrerSpamFilter.php
+++ b/core/Tracker/Visit/ReferrerSpamFilter.php
@@ -18,7 +18,7 @@
*/
class ReferrerSpamFilter
{
- const OPTION_STORAGE_NAME = 'referrer_spam_blacklist';
+ public const OPTION_STORAGE_NAME = 'referrer_spam_blacklist';
/**
* @var string[]
*/
diff --git a/core/Tracker/VisitorRecognizer.php b/core/Tracker/VisitorRecognizer.php
index 3c51958f7aa..eb8b53794f8 100644
--- a/core/Tracker/VisitorRecognizer.php
+++ b/core/Tracker/VisitorRecognizer.php
@@ -22,7 +22,7 @@ class VisitorRecognizer
* Set when a visit was found. Stores the original values of the row that is currently stored in the DB when
* the visit was selected.
*/
- const KEY_ORIGINAL_VISIT_ROW = 'originalVisit';
+ public const KEY_ORIGINAL_VISIT_ROW = 'originalVisit';
/**
* Local variable cache for the getVisitFieldsPersist() method.
diff --git a/core/Translation/Loader/DevelopmentLoader.php b/core/Translation/Loader/DevelopmentLoader.php
index 6e9f4b115e1..5bf5c2285b8 100644
--- a/core/Translation/Loader/DevelopmentLoader.php
+++ b/core/Translation/Loader/DevelopmentLoader.php
@@ -13,7 +13,7 @@
*/
class DevelopmentLoader implements LoaderInterface
{
- const LANGUAGE_ID = 'dev';
+ public const LANGUAGE_ID = 'dev';
/**
* Decorated loader.
diff --git a/core/Twig.php b/core/Twig.php
index 8f61ff7dc6c..facc1d9d7b3 100644
--- a/core/Twig.php
+++ b/core/Twig.php
@@ -69,7 +69,7 @@ function piwik_format_money($amount, $idSite)
*/
class Twig
{
- const SPARKLINE_TEMPLATE = '
+ public const SPARKLINE_TEMPLATE = '
';
/**
diff --git a/core/UpdateCheck.php b/core/UpdateCheck.php
index 5842b8a9ab1..dcab0ddabc6 100644
--- a/core/UpdateCheck.php
+++ b/core/UpdateCheck.php
@@ -15,12 +15,12 @@
*/
class UpdateCheck
{
- const CHECK_INTERVAL = 28800; // every 8 hours
- const UI_CLICK_CHECK_INTERVAL = 10; // every 10s when user clicks UI link
- const LAST_CHECK_FAILED = 'UpdateCheck_LastCheckFailed';
- const LAST_TIME_CHECKED = 'UpdateCheck_LastTimeChecked';
- const LATEST_VERSION = 'UpdateCheck_LatestVersion';
- const SOCKET_TIMEOUT = 5;
+ public const CHECK_INTERVAL = 28800; // every 8 hours
+ public const UI_CLICK_CHECK_INTERVAL = 10; // every 10s when user clicks UI link
+ public const LAST_CHECK_FAILED = 'UpdateCheck_LastCheckFailed';
+ public const LAST_TIME_CHECKED = 'UpdateCheck_LastTimeChecked';
+ public const LATEST_VERSION = 'UpdateCheck_LatestVersion';
+ public const SOCKET_TIMEOUT = 5;
/**
* Check for a newer version
diff --git a/core/Updater.php b/core/Updater.php
index ee91bc79832..e52a76410b3 100644
--- a/core/Updater.php
+++ b/core/Updater.php
@@ -23,9 +23,9 @@
*/
class Updater
{
- const INDEX_CURRENT_VERSION = 0;
- const INDEX_NEW_VERSION = 1;
- const OPTION_KEY_MATOMO_UPDATE_HISTORY = 'MatomoUpdateHistory';
+ public const INDEX_CURRENT_VERSION = 0;
+ public const INDEX_NEW_VERSION = 1;
+ public const OPTION_KEY_MATOMO_UPDATE_HISTORY = 'MatomoUpdateHistory';
private $pathUpdateFileCore;
private $pathUpdateFilePlugins;
diff --git a/core/Updater/Migration/Db.php b/core/Updater/Migration/Db.php
index 55e48061242..e88b4940ecc 100644
--- a/core/Updater/Migration/Db.php
+++ b/core/Updater/Migration/Db.php
@@ -19,80 +19,80 @@ abstract class Db extends Migration
/**
* Table '%s' already exists
*/
- const ERROR_CODE_TABLE_EXISTS = 1050;
+ public const ERROR_CODE_TABLE_EXISTS = 1050;
/**
* Unknown table '%s'
*/
- const ERROR_CODE_UNKNOWN_TABLE = 1051;
+ public const ERROR_CODE_UNKNOWN_TABLE = 1051;
/**
* Unknown column '%s' in '%s'
*/
- const ERROR_CODE_UNKNOWN_COLUMN = 1054;
+ public const ERROR_CODE_UNKNOWN_COLUMN = 1054;
/**
* Duplicate column name '%s'
*/
- const ERROR_CODE_DUPLICATE_COLUMN = 1060;
+ public const ERROR_CODE_DUPLICATE_COLUMN = 1060;
/**
* Duplicate key name '%s'
*/
- const ERROR_CODE_DUPLICATE_KEY = 1061;
+ public const ERROR_CODE_DUPLICATE_KEY = 1061;
/**
* Duplicate entry '%s' for key %d
*/
- const ERROR_CODE_DUPLICATE_ENTRY = 1062;
+ public const ERROR_CODE_DUPLICATE_ENTRY = 1062;
/**
* Syntax error
*/
- const ERROR_CODE_SYNTAX_ERROR = 1064;
+ public const ERROR_CODE_SYNTAX_ERROR = 1064;
/**
* Multiple primary key defined
*/
- const ERROR_CODE_DUPLICATE_PRIMARY_KEY = 1068;
+ public const ERROR_CODE_DUPLICATE_PRIMARY_KEY = 1068;
/**
* Key column '%s' doesn't exist in table
*/
- const ERROR_CODE_KEY_COLUMN_NOT_EXISTS = 1072;
+ public const ERROR_CODE_KEY_COLUMN_NOT_EXISTS = 1072;
/**
* Can't DROP '%s'; check that column/key exists
*/
- const ERROR_CODE_COLUMN_NOT_EXISTS = 1091;
+ public const ERROR_CODE_COLUMN_NOT_EXISTS = 1091;
/**
* Table '%s.%s' doesn't exist
*/
- const ERROR_CODE_TABLE_NOT_EXISTS = 1146;
+ public const ERROR_CODE_TABLE_NOT_EXISTS = 1146;
/**
* This table type requires a primary key SQL: CREATE TEMPORARY TABLE %s
*/
- const ERROR_CODE_REQUIRES_PRIMARY_KEY = 1173;
+ public const ERROR_CODE_REQUIRES_PRIMARY_KEY = 1173;
/**
* General error: 3750 Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set.
*/
- const ERROR_CODE_UNABLE_CREATE_TABLE_WITHOUT_PRIMARY_KEY = 3750;
+ public const ERROR_CODE_UNABLE_CREATE_TABLE_WITHOUT_PRIMARY_KEY = 3750;
/**
* Query execution was interrupted, maximum statement execution time exceeded
*/
- const ERROR_CODE_MAX_EXECUTION_TIME_EXCEEDED_QUERY_INTERRUPTED = 3024;
+ public const ERROR_CODE_MAX_EXECUTION_TIME_EXCEEDED_QUERY_INTERRUPTED = 3024;
/**
* Sort aborted: Query execution was interrupted, maximum statement execution time exceeded
*/
- const ERROR_CODE_MAX_EXECUTION_TIME_EXCEEDED_SORT_ABORTED = 1028;
+ public const ERROR_CODE_MAX_EXECUTION_TIME_EXCEEDED_SORT_ABORTED = 1028;
/**
* MySQL server has gone away
*/
- const ERROR_CODE_MYSQL_SERVER_HAS_GONE_AWAY = 2006;
+ public const ERROR_CODE_MYSQL_SERVER_HAS_GONE_AWAY = 2006;
}
diff --git a/core/Updates/3.13.1-b2.php b/core/Updates/3.13.1-b2.php
index d51333ca8ce..c5615e0ea42 100644
--- a/core/Updates/3.13.1-b2.php
+++ b/core/Updates/3.13.1-b2.php
@@ -21,7 +21,7 @@
*/
class Updates_3_13_1_b2 extends PiwikUpdates
{
- const GEO_LITE_COUNTRY_URL = 'https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz';
+ public const GEO_LITE_COUNTRY_URL = 'https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz';
/**
* @var MigrationFactory
diff --git a/core/Validators/NumberRange.php b/core/Validators/NumberRange.php
index 78841a090d6..700ea5ed030 100644
--- a/core/Validators/NumberRange.php
+++ b/core/Validators/NumberRange.php
@@ -13,8 +13,8 @@
class NumberRange extends BaseValidator
{
- const MAX_SMALL_INT_UNSIGNED = 65535;
- const MAX_MEDIUM_INT_UNSIGNED = 16777215;
+ public const MAX_SMALL_INT_UNSIGNED = 65535;
+ public const MAX_MEDIUM_INT_UNSIGNED = 16777215;
/**
* @var null|int
diff --git a/core/Version.php b/core/Version.php
index 8ccc24507ea..44afc0ed801 100644
--- a/core/Version.php
+++ b/core/Version.php
@@ -21,9 +21,9 @@ final class Version
* The current Matomo version.
* @var string
*/
- const VERSION = '5.1.0-b1';
+ public const VERSION = '5.1.0-b1';
- const MAJOR_VERSION = 5;
+ public const MAJOR_VERSION = 5;
public function isStableVersion($version)
{
diff --git a/core/View/HtmlEmailFooterView.php b/core/View/HtmlEmailFooterView.php
index 03bbae02a42..487db8b36ab 100644
--- a/core/View/HtmlEmailFooterView.php
+++ b/core/View/HtmlEmailFooterView.php
@@ -14,7 +14,7 @@
class HtmlEmailFooterView extends View
{
- const TEMPLATE_FILE = '@CoreHome/ReportRenderer/_htmlReportFooter';
+ public const TEMPLATE_FILE = '@CoreHome/ReportRenderer/_htmlReportFooter';
public function __construct($unsubscribeLink = null)
{
diff --git a/core/View/HtmlReportEmailHeaderView.php b/core/View/HtmlReportEmailHeaderView.php
index 360aa1d0b7f..98dc44ec11f 100644
--- a/core/View/HtmlReportEmailHeaderView.php
+++ b/core/View/HtmlReportEmailHeaderView.php
@@ -22,7 +22,7 @@
class HtmlReportEmailHeaderView extends View
{
- const TEMPLATE_FILE = '@CoreHome/ReportRenderer/_htmlReportHeader';
+ public const TEMPLATE_FILE = '@CoreHome/ReportRenderer/_htmlReportHeader';
private static $reportFrequencyTranslationByPeriod = [
Schedule::PERIOD_NEVER => '',
diff --git a/core/View/SecurityPolicy.php b/core/View/SecurityPolicy.php
index 2bdb2cd4dde..4b1f484939b 100644
--- a/core/View/SecurityPolicy.php
+++ b/core/View/SecurityPolicy.php
@@ -19,9 +19,9 @@ class SecurityPolicy
/*
* Commonly used rules
*/
- const RULE_DEFAULT = "'self' 'unsafe-inline' 'unsafe-eval'";
- const RULE_IMG_DEFAULT = "'self' 'unsafe-inline' 'unsafe-eval' data:";
- const RULE_EMBEDDED_FRAME = "'self' 'unsafe-inline' 'unsafe-eval' data: https: http:";
+ public const RULE_DEFAULT = "'self' 'unsafe-inline' 'unsafe-eval'";
+ public const RULE_IMG_DEFAULT = "'self' 'unsafe-inline' 'unsafe-eval' data:";
+ public const RULE_EMBEDDED_FRAME = "'self' 'unsafe-inline' 'unsafe-eval' data: https: http:";
/**
* The policies that will generate the CSP header.
diff --git a/core/View/UIControl.php b/core/View/UIControl.php
index 081462fdba2..b7f2b886e61 100644
--- a/core/View/UIControl.php
+++ b/core/View/UIControl.php
@@ -25,7 +25,7 @@ class UIControl extends \Piwik\View
*
* Derived classes must set this constant.
*/
- const TEMPLATE = '';
+ public const TEMPLATE = '';
/**
* The CSS class that is used to map the root element of this control with the JavaScript class.
diff --git a/core/ViewDataTable/Factory.php b/core/ViewDataTable/Factory.php
index b1fe9b97c55..9909364ce6d 100644
--- a/core/ViewDataTable/Factory.php
+++ b/core/ViewDataTable/Factory.php
@@ -59,7 +59,7 @@
*/
class Factory
{
- const DEFAULT_VIEW = HtmlTable::ID;
+ public const DEFAULT_VIEW = HtmlTable::ID;
/**
* Cache for getDefaultTypeViewDataTable result.
diff --git a/core/Visualization/Sparkline.php b/core/Visualization/Sparkline.php
index afb3bd41317..c2d153fd710 100644
--- a/core/Visualization/Sparkline.php
+++ b/core/Visualization/Sparkline.php
@@ -19,10 +19,10 @@
*/
class Sparkline implements ViewInterface
{
- const DEFAULT_WIDTH = 200;
- const DEFAULT_HEIGHT = 50;
- const MAX_WIDTH = 1000;
- const MAX_HEIGHT = 1000;
+ public const DEFAULT_WIDTH = 200;
+ public const DEFAULT_HEIGHT = 50;
+ public const MAX_WIDTH = 1000;
+ public const MAX_HEIGHT = 1000;
/**
diff --git a/plugins/API/Menu.php b/plugins/API/Menu.php
index 0d01dc31f8c..ca9cc9c1cab 100644
--- a/plugins/API/Menu.php
+++ b/plugins/API/Menu.php
@@ -17,8 +17,8 @@
class Menu extends \Piwik\Plugin\Menu
{
- const DD_SHORT_NAME_ANDROID = 'AND';
- const DD_SHORT_NAME_IOS = 'IOS';
+ public const DD_SHORT_NAME_ANDROID = 'AND';
+ public const DD_SHORT_NAME_IOS = 'IOS';
public function configureTopMenu(MenuTop $menu)
{
diff --git a/plugins/API/tests/Integration/Filter/DataComparisonFilter/ComparisonRowGeneratorTest.php b/plugins/API/tests/Integration/Filter/DataComparisonFilter/ComparisonRowGeneratorTest.php
index 657dd573032..f4b01e46c0e 100644
--- a/plugins/API/tests/Integration/Filter/DataComparisonFilter/ComparisonRowGeneratorTest.php
+++ b/plugins/API/tests/Integration/Filter/DataComparisonFilter/ComparisonRowGeneratorTest.php
@@ -16,8 +16,8 @@
class ComparisonRowGeneratorTest extends IntegrationTestCase
{
- const TEST_SEGMENT = 'browserCode==ff';
- const OTHER_SEGMENT = 'operatingSystemCode=WIN';
+ public const TEST_SEGMENT = 'browserCode==ff';
+ public const OTHER_SEGMENT = 'operatingSystemCode=WIN';
protected static function beforeTableDataCached()
{
diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php
index 49fd0502caa..4ef3517c542 100644
--- a/plugins/Actions/Actions.php
+++ b/plugins/Actions/Actions.php
@@ -21,7 +21,7 @@
*/
class Actions extends \Piwik\Plugin
{
- const ACTIONS_REPORT_ROWS_DISPLAY = 100;
+ public const ACTIONS_REPORT_ROWS_DISPLAY = 100;
/**
* @see \Piwik\Plugin::registerEvents
diff --git a/plugins/Actions/Archiver.php b/plugins/Actions/Archiver.php
index ad9f7f9f4a8..37f2068c278 100644
--- a/plugins/Actions/Archiver.php
+++ b/plugins/Actions/Archiver.php
@@ -14,21 +14,21 @@
*/
class Archiver extends \Piwik\Plugin\Archiver
{
- const DOWNLOADS_RECORD_NAME = 'Actions_downloads';
- const OUTLINKS_RECORD_NAME = 'Actions_outlink';
- const PAGE_TITLES_RECORD_NAME = 'Actions_actions';
- const SITE_SEARCH_RECORD_NAME = 'Actions_sitesearch';
- const SITE_SEARCH_CATEGORY_RECORD_NAME = 'Actions_SiteSearchCategories';
- const PAGE_URLS_RECORD_NAME = 'Actions_actions_url';
+ public const DOWNLOADS_RECORD_NAME = 'Actions_downloads';
+ public const OUTLINKS_RECORD_NAME = 'Actions_outlink';
+ public const PAGE_TITLES_RECORD_NAME = 'Actions_actions';
+ public const SITE_SEARCH_RECORD_NAME = 'Actions_sitesearch';
+ public const SITE_SEARCH_CATEGORY_RECORD_NAME = 'Actions_SiteSearchCategories';
+ public const PAGE_URLS_RECORD_NAME = 'Actions_actions_url';
- const METRIC_PAGEVIEWS_RECORD_NAME = 'Actions_nb_pageviews';
- const METRIC_UNIQ_PAGEVIEWS_RECORD_NAME = 'Actions_nb_uniq_pageviews';
- const METRIC_SUM_TIME_RECORD_NAME = 'Actions_sum_time_generation';
- const METRIC_HITS_TIMED_RECORD_NAME = 'Actions_nb_hits_with_time_generation';
- const METRIC_DOWNLOADS_RECORD_NAME = 'Actions_nb_downloads';
- const METRIC_UNIQ_DOWNLOADS_RECORD_NAME = 'Actions_nb_uniq_downloads';
- const METRIC_OUTLINKS_RECORD_NAME = 'Actions_nb_outlinks';
- const METRIC_UNIQ_OUTLINKS_RECORD_NAME = 'Actions_nb_uniq_outlinks';
- const METRIC_SEARCHES_RECORD_NAME = 'Actions_nb_searches';
- const METRIC_KEYWORDS_RECORD_NAME = 'Actions_nb_keywords';
+ public const METRIC_PAGEVIEWS_RECORD_NAME = 'Actions_nb_pageviews';
+ public const METRIC_UNIQ_PAGEVIEWS_RECORD_NAME = 'Actions_nb_uniq_pageviews';
+ public const METRIC_SUM_TIME_RECORD_NAME = 'Actions_sum_time_generation';
+ public const METRIC_HITS_TIMED_RECORD_NAME = 'Actions_nb_hits_with_time_generation';
+ public const METRIC_DOWNLOADS_RECORD_NAME = 'Actions_nb_downloads';
+ public const METRIC_UNIQ_DOWNLOADS_RECORD_NAME = 'Actions_nb_uniq_downloads';
+ public const METRIC_OUTLINKS_RECORD_NAME = 'Actions_nb_outlinks';
+ public const METRIC_UNIQ_OUTLINKS_RECORD_NAME = 'Actions_nb_uniq_outlinks';
+ public const METRIC_SEARCHES_RECORD_NAME = 'Actions_nb_searches';
+ public const METRIC_KEYWORDS_RECORD_NAME = 'Actions_nb_keywords';
}
diff --git a/plugins/Actions/ArchivingHelper.php b/plugins/Actions/ArchivingHelper.php
index 036394cf35f..346915e2660 100644
--- a/plugins/Actions/ArchivingHelper.php
+++ b/plugins/Actions/ArchivingHelper.php
@@ -29,7 +29,7 @@
*/
class ArchivingHelper
{
- const OTHERS_ROW_KEY = '';
+ public const OTHERS_ROW_KEY = '';
/**
* Ideally this should use the DataArray object instead of custom data structure
diff --git a/plugins/Annotations/AnnotationList.php b/plugins/Annotations/AnnotationList.php
index e3515633e38..ee4a507b315 100644
--- a/plugins/Annotations/AnnotationList.php
+++ b/plugins/Annotations/AnnotationList.php
@@ -33,7 +33,7 @@
*/
class AnnotationList
{
- const ANNOTATION_COLLECTION_OPTION_SUFFIX = '_annotations';
+ public const ANNOTATION_COLLECTION_OPTION_SUFFIX = '_annotations';
/**
* List of site IDs this instance holds annotations for.
diff --git a/plugins/Contents/Archiver.php b/plugins/Contents/Archiver.php
index 76c38544f0b..74c9bcde9b6 100644
--- a/plugins/Contents/Archiver.php
+++ b/plugins/Contents/Archiver.php
@@ -13,8 +13,8 @@
*/
class Archiver extends \Piwik\Plugin\Archiver
{
- const CONTENTS_PIECE_NAME_RECORD_NAME = 'Contents_piece_name';
- const CONTENTS_NAME_PIECE_RECORD_NAME = 'Contents_name_piece';
- const CONTENT_TARGET_NOT_SET = 'Piwik_ContentTargetNotSet';
- const CONTENT_PIECE_NOT_SET = 'Piwik_ContentPieceNotSet';
+ public const CONTENTS_PIECE_NAME_RECORD_NAME = 'Contents_piece_name';
+ public const CONTENTS_NAME_PIECE_RECORD_NAME = 'Contents_name_piece';
+ public const CONTENT_TARGET_NOT_SET = 'Piwik_ContentTargetNotSet';
+ public const CONTENT_PIECE_NOT_SET = 'Piwik_ContentPieceNotSet';
}
diff --git a/plugins/CoreAdminHome/Commands/InvalidateReportData.php b/plugins/CoreAdminHome/Commands/InvalidateReportData.php
index 31dd14742a9..0a59bf84737 100644
--- a/plugins/CoreAdminHome/Commands/InvalidateReportData.php
+++ b/plugins/CoreAdminHome/Commands/InvalidateReportData.php
@@ -27,7 +27,7 @@
*/
class InvalidateReportData extends ConsoleCommand
{
- const ALL_OPTION_VALUE = 'all';
+ public const ALL_OPTION_VALUE = 'all';
/**
* @var null|array
diff --git a/plugins/CoreAdminHome/Commands/OptimizeArchiveTables.php b/plugins/CoreAdminHome/Commands/OptimizeArchiveTables.php
index 4b28cc1b2b4..a0bcd892191 100644
--- a/plugins/CoreAdminHome/Commands/OptimizeArchiveTables.php
+++ b/plugins/CoreAdminHome/Commands/OptimizeArchiveTables.php
@@ -19,8 +19,8 @@
*/
class OptimizeArchiveTables extends ConsoleCommand
{
- const ALL_TABLES_STRING = 'all';
- const CURRENT_MONTH_STRING = 'now';
+ public const ALL_TABLES_STRING = 'all';
+ public const CURRENT_MONTH_STRING = 'now';
protected function configure()
{
diff --git a/plugins/CoreAdminHome/Commands/PurgeOldArchiveData.php b/plugins/CoreAdminHome/Commands/PurgeOldArchiveData.php
index c7556284c02..be278d0760a 100644
--- a/plugins/CoreAdminHome/Commands/PurgeOldArchiveData.php
+++ b/plugins/CoreAdminHome/Commands/PurgeOldArchiveData.php
@@ -22,7 +22,7 @@
*/
class PurgeOldArchiveData extends ConsoleCommand
{
- const ALL_DATES_STRING = 'all';
+ public const ALL_DATES_STRING = 'all';
/**
* For tests.
diff --git a/plugins/CoreAdminHome/CustomLogo.php b/plugins/CoreAdminHome/CustomLogo.php
index 57b293da193..99b1be3d144 100644
--- a/plugins/CoreAdminHome/CustomLogo.php
+++ b/plugins/CoreAdminHome/CustomLogo.php
@@ -19,9 +19,9 @@
class CustomLogo
{
- const LOGO_HEIGHT = 300;
- const LOGO_SMALL_HEIGHT = 100;
- const FAVICON_HEIGHT = 32;
+ public const LOGO_HEIGHT = 300;
+ public const LOGO_SMALL_HEIGHT = 100;
+ public const FAVICON_HEIGHT = 32;
public function getLogoUrl($pathOnly = false)
{
diff --git a/plugins/CoreAdminHome/OptOutManager.php b/plugins/CoreAdminHome/OptOutManager.php
index 3021d463253..c9f989eeb58 100644
--- a/plugins/CoreAdminHome/OptOutManager.php
+++ b/plugins/CoreAdminHome/OptOutManager.php
@@ -420,7 +420,7 @@ function showContent(consent, errorMessage = null, useTracker = false) {
var div = document.getElementById(settings.divId);
if (!div) {
- const warningDiv = document.createElement("div");
+ public const warningDiv = document.createElement("div");
var msg = 'Unable to find opt-out content div: "'+settings.divId+'"';
warningDiv.id = settings.divId+'-warning';
warningDiv.innerHTML = errorBlock+msg+'
';
diff --git a/plugins/CoreAdminHome/Tasks.php b/plugins/CoreAdminHome/Tasks.php
index a2201c0324e..f7b746ed5ba 100644
--- a/plugins/CoreAdminHome/Tasks.php
+++ b/plugins/CoreAdminHome/Tasks.php
@@ -37,7 +37,7 @@
class Tasks extends \Piwik\Plugin\Tasks
{
- const TRACKING_CODE_CHECK_FLAG = 'trackingCodeExistsCheck';
+ public const TRACKING_CODE_CHECK_FLAG = 'trackingCodeExistsCheck';
/**
* @var ArchivePurger
*/
diff --git a/plugins/CoreAdminHome/Tasks/ArchivesToPurgeDistributedList.php b/plugins/CoreAdminHome/Tasks/ArchivesToPurgeDistributedList.php
index c503741bf17..68aaa0992bc 100644
--- a/plugins/CoreAdminHome/Tasks/ArchivesToPurgeDistributedList.php
+++ b/plugins/CoreAdminHome/Tasks/ArchivesToPurgeDistributedList.php
@@ -25,7 +25,7 @@
*/
class ArchivesToPurgeDistributedList extends DistributedList
{
- const OPTION_INVALIDATED_DATES_SITES_TO_PURGE = 'InvalidatedOldReports_DatesWebsiteIds';
+ public const OPTION_INVALIDATED_DATES_SITES_TO_PURGE = 'InvalidatedOldReports_DatesWebsiteIds';
public function __construct()
{
diff --git a/plugins/CoreAdminHome/tests/Fixture/DuplicateActions.php b/plugins/CoreAdminHome/tests/Fixture/DuplicateActions.php
index 8ed3b0fc31a..2bbe1e6f5f5 100644
--- a/plugins/CoreAdminHome/tests/Fixture/DuplicateActions.php
+++ b/plugins/CoreAdminHome/tests/Fixture/DuplicateActions.php
@@ -16,7 +16,7 @@
*/
class DuplicateActions extends Fixture
{
- const DUMMY_IDVISITOR = 'c1d2a36653fd88e2';
+ public const DUMMY_IDVISITOR = 'c1d2a36653fd88e2';
private static $dataToInsert = array(
'log_action' => array(
diff --git a/plugins/CoreAdminHome/tests/Integration/Commands/SetConfigTest.php b/plugins/CoreAdminHome/tests/Integration/Commands/SetConfigTest.php
index 8f652f1c2f3..37a260ef3a0 100644
--- a/plugins/CoreAdminHome/tests/Integration/Commands/SetConfigTest.php
+++ b/plugins/CoreAdminHome/tests/Integration/Commands/SetConfigTest.php
@@ -20,7 +20,7 @@
*/
class SetConfigTest extends ConsoleCommandTestCase
{
- const TEST_CONFIG_PATH = '/tmp/test.config.ini.php';
+ public const TEST_CONFIG_PATH = '/tmp/test.config.ini.php';
public static function setUpBeforeClass(): void
{
diff --git a/plugins/CoreConsole/Commands/BuildTracker.php b/plugins/CoreConsole/Commands/BuildTracker.php
index 63f7cb22d3b..82a1bbec290 100644
--- a/plugins/CoreConsole/Commands/BuildTracker.php
+++ b/plugins/CoreConsole/Commands/BuildTracker.php
@@ -15,7 +15,7 @@
class BuildTracker extends ConsoleCommand
{
- const YUI_COMPRESSOR_URL = 'https://github.com/yui/yuicompressor/releases/download/v2.4.8/yuicompressor-2.4.8.zip';
+ public const YUI_COMPRESSOR_URL = 'https://github.com/yui/yuicompressor/releases/download/v2.4.8/yuicompressor-2.4.8.zip';
protected function configure()
{
diff --git a/plugins/CoreConsole/tests/System/ArchiveCronTest.php b/plugins/CoreConsole/tests/System/ArchiveCronTest.php
index 8b40ccf17a6..3e4cd0d2ae9 100644
--- a/plugins/CoreConsole/tests/System/ArchiveCronTest.php
+++ b/plugins/CoreConsole/tests/System/ArchiveCronTest.php
@@ -42,10 +42,10 @@
*/
class ArchiveCronTest extends SystemTestCase
{
- const NEW_SEGMENT = 'operatingSystemCode==IOS';
- const NEW_SEGMENT_NAME = 'segmentForToday';
- const ENCODED_SEGMENT = 'pageUrl=@%252F';
- const ENCODED_SEGMENT_NAME = 'segmentWithEncoding';
+ public const NEW_SEGMENT = 'operatingSystemCode==IOS';
+ public const NEW_SEGMENT_NAME = 'segmentForToday';
+ public const ENCODED_SEGMENT = 'pageUrl=@%252F';
+ public const ENCODED_SEGMENT_NAME = 'segmentWithEncoding';
/**
* @var ManySitesImportedLogs
diff --git a/plugins/CoreHome/Columns/Profilable.php b/plugins/CoreHome/Columns/Profilable.php
index dea65ed2cb2..2954a549fe9 100644
--- a/plugins/CoreHome/Columns/Profilable.php
+++ b/plugins/CoreHome/Columns/Profilable.php
@@ -14,7 +14,7 @@
class Profilable extends VisitDimension
{
- const COLUMN_TYPE = 'TINYINT(1) NULL';
+ public const COLUMN_TYPE = 'TINYINT(1) NULL';
protected $columnName = 'profilable';
protected $columnType = self::COLUMN_TYPE;
protected $nameSingular = 'CoreHome_Profilable';
diff --git a/plugins/CoreHome/Columns/UserId.php b/plugins/CoreHome/Columns/UserId.php
index d8165aae79b..490535b0282 100644
--- a/plugins/CoreHome/Columns/UserId.php
+++ b/plugins/CoreHome/Columns/UserId.php
@@ -26,7 +26,7 @@
*/
class UserId extends VisitDimension
{
- const MAXLENGTH = 200;
+ public const MAXLENGTH = 200;
/**
* @var string
diff --git a/plugins/CoreHome/Columns/VisitGoalBuyer.php b/plugins/CoreHome/Columns/VisitGoalBuyer.php
index a4dfa389e5b..1cd18319b2b 100644
--- a/plugins/CoreHome/Columns/VisitGoalBuyer.php
+++ b/plugins/CoreHome/Columns/VisitGoalBuyer.php
@@ -19,10 +19,10 @@
class VisitGoalBuyer extends VisitDimension
{
// log_visit.visit_goal_buyer
- const TYPE_BUYER_NONE = 0;
- const TYPE_BUYER_ORDERED = 1;
- const TYPE_BUYER_OPEN_CART = GoalManager::TYPE_BUYER_OPEN_CART;
- const TYPE_BUYER_ORDERED_AND_OPEN_CART = GoalManager::TYPE_BUYER_ORDERED_AND_OPEN_CART;
+ public const TYPE_BUYER_NONE = 0;
+ public const TYPE_BUYER_ORDERED = 1;
+ public const TYPE_BUYER_OPEN_CART = GoalManager::TYPE_BUYER_OPEN_CART;
+ public const TYPE_BUYER_ORDERED_AND_OPEN_CART = GoalManager::TYPE_BUYER_ORDERED_AND_OPEN_CART;
protected static $visitEcommerceStatus = array(
self::TYPE_BUYER_NONE => 'none',
diff --git a/plugins/CoreHome/Columns/VisitorReturning.php b/plugins/CoreHome/Columns/VisitorReturning.php
index c4ec7d977c5..3f5b8f88781 100644
--- a/plugins/CoreHome/Columns/VisitorReturning.php
+++ b/plugins/CoreHome/Columns/VisitorReturning.php
@@ -17,9 +17,9 @@
class VisitorReturning extends VisitDimension
{
- const IS_RETURNING_CUSTOMER = 2;
- const IS_RETURNING = 1;
- const IS_NEW = 0;
+ public const IS_RETURNING_CUSTOMER = 2;
+ public const IS_RETURNING = 1;
+ public const IS_NEW = 0;
protected $columnName = 'visitor_returning';
protected $columnType = 'TINYINT(1) NULL';
diff --git a/plugins/CoreHome/Columns/VisitorSecondsSinceFirst.php b/plugins/CoreHome/Columns/VisitorSecondsSinceFirst.php
index 6d3cac42b20..a772cf4ffe7 100644
--- a/plugins/CoreHome/Columns/VisitorSecondsSinceFirst.php
+++ b/plugins/CoreHome/Columns/VisitorSecondsSinceFirst.php
@@ -17,7 +17,7 @@
class VisitorSecondsSinceFirst extends VisitDimension
{
- const COLUMN_TYPE = 'INT(11) UNSIGNED NULL';
+ public const COLUMN_TYPE = 'INT(11) UNSIGNED NULL';
protected $columnName = 'visitor_seconds_since_first';
protected $columnType = self::COLUMN_TYPE;
diff --git a/plugins/CoreHome/Columns/VisitorSecondsSinceOrder.php b/plugins/CoreHome/Columns/VisitorSecondsSinceOrder.php
index a133f42149f..0462a13d7da 100644
--- a/plugins/CoreHome/Columns/VisitorSecondsSinceOrder.php
+++ b/plugins/CoreHome/Columns/VisitorSecondsSinceOrder.php
@@ -16,7 +16,7 @@
class VisitorSecondsSinceOrder extends VisitDimension
{
- const COLUMN_TYPE = 'INT(11) UNSIGNED NULL';
+ public const COLUMN_TYPE = 'INT(11) UNSIGNED NULL';
protected $columnName = 'visitor_seconds_since_order';
protected $columnType = self::COLUMN_TYPE;
diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php
index 662272f2b19..c8480a28ff5 100644
--- a/plugins/CoreHome/CoreHome.php
+++ b/plugins/CoreHome/CoreHome.php
@@ -35,7 +35,7 @@ class CoreHome extends \Piwik\Plugin
* where on the left side a link is shown for each widget and on the right side the selected widget.
* @api
*/
- const WIDGET_CONTAINER_LAYOUT_BY_DIMENSION = 'ByDimension';
+ public const WIDGET_CONTAINER_LAYOUT_BY_DIMENSION = 'ByDimension';
/**
* @see \Piwik\Plugin::registerEvents
diff --git a/plugins/CoreHome/Widgets/GetSystemSummary.php b/plugins/CoreHome/Widgets/GetSystemSummary.php
index 41b34f3f72b..b1feb1f568d 100644
--- a/plugins/CoreHome/Widgets/GetSystemSummary.php
+++ b/plugins/CoreHome/Widgets/GetSystemSummary.php
@@ -19,8 +19,8 @@
class GetSystemSummary extends Widget
{
- const TEST_MYSQL_VERSION = 'mysql-version-redacted';
- const TEST_PHP_VERSION = 'php-version-redacted';
+ public const TEST_MYSQL_VERSION = 'mysql-version-redacted';
+ public const TEST_PHP_VERSION = 'php-version-redacted';
/**
* @var StoredSegmentService
*/
diff --git a/plugins/CorePluginsAdmin/Controller.php b/plugins/CorePluginsAdmin/Controller.php
index 0781da1d257..a81867aa8d1 100644
--- a/plugins/CorePluginsAdmin/Controller.php
+++ b/plugins/CorePluginsAdmin/Controller.php
@@ -34,9 +34,9 @@
class Controller extends Plugin\ControllerAdmin
{
- const ACTIVATE_NONCE = 'CorePluginsAdmin.activatePlugin';
- const DEACTIVATE_NONCE = 'CorePluginsAdmin.deactivatePlugin';
- const UNINSTALL_NONCE = 'CorePluginsAdmin.uninstallPlugin';
+ public const ACTIVATE_NONCE = 'CorePluginsAdmin.activatePlugin';
+ public const DEACTIVATE_NONCE = 'CorePluginsAdmin.deactivatePlugin';
+ public const UNINSTALL_NONCE = 'CorePluginsAdmin.uninstallPlugin';
/**
* @var Translator
diff --git a/plugins/CorePluginsAdmin/Model/TagManagerTeaser.php b/plugins/CorePluginsAdmin/Model/TagManagerTeaser.php
index ce7aceee0b1..3e1a26f7d41 100644
--- a/plugins/CorePluginsAdmin/Model/TagManagerTeaser.php
+++ b/plugins/CorePluginsAdmin/Model/TagManagerTeaser.php
@@ -16,7 +16,7 @@
class TagManagerTeaser
{
- const DISABLE_GLOBALLY_KEY = 'CorePluginsAdmin.disableTagManagerTeaser';
+ public const DISABLE_GLOBALLY_KEY = 'CorePluginsAdmin.disableTagManagerTeaser';
/**
* @var string
diff --git a/plugins/CorePluginsAdmin/PluginInstaller.php b/plugins/CorePluginsAdmin/PluginInstaller.php
index d99ded3c8b0..10d0b3cb454 100644
--- a/plugins/CorePluginsAdmin/PluginInstaller.php
+++ b/plugins/CorePluginsAdmin/PluginInstaller.php
@@ -26,7 +26,7 @@
*/
class PluginInstaller
{
- const PATH_TO_DOWNLOAD = '/latest/plugins/';
+ public const PATH_TO_DOWNLOAD = '/latest/plugins/';
private $pluginName;
diff --git a/plugins/CorePluginsAdmin/SettingsMetadata.php b/plugins/CorePluginsAdmin/SettingsMetadata.php
index 0f56722d662..3e560401f35 100644
--- a/plugins/CorePluginsAdmin/SettingsMetadata.php
+++ b/plugins/CorePluginsAdmin/SettingsMetadata.php
@@ -17,7 +17,7 @@
class SettingsMetadata
{
- const PASSWORD_PLACEHOLDER = '******';
+ public const PASSWORD_PLACEHOLDER = '******';
/**
* @param Settings[] $settingsInstances
diff --git a/plugins/CorePluginsAdmin/tests/Integration/ApiTest.php b/plugins/CorePluginsAdmin/tests/Integration/ApiTest.php
index d78de94429a..abcaa1bd5c0 100644
--- a/plugins/CorePluginsAdmin/tests/Integration/ApiTest.php
+++ b/plugins/CorePluginsAdmin/tests/Integration/ApiTest.php
@@ -19,8 +19,8 @@
class ApiTest extends IntegrationTestCase
{
- const TEST_USER = 'atestuser';
- const TEST_PASSWORD = 'testpassword';
+ public const TEST_USER = 'atestuser';
+ public const TEST_PASSWORD = 'testpassword';
private $testSystemSettingsPayload = [
'CoreUpdater' => [
diff --git a/plugins/CoreUpdater/Updater.php b/plugins/CoreUpdater/Updater.php
index dbd41143b32..5acff942d21 100644
--- a/plugins/CoreUpdater/Updater.php
+++ b/plugins/CoreUpdater/Updater.php
@@ -30,9 +30,9 @@
class Updater
{
- const OPTION_LATEST_VERSION = 'UpdateCheck_LatestVersion';
- const PATH_TO_EXTRACT_LATEST_VERSION = '/latest/';
- const DOWNLOAD_TIMEOUT = 720;
+ public const OPTION_LATEST_VERSION = 'UpdateCheck_LatestVersion';
+ public const PATH_TO_EXTRACT_LATEST_VERSION = '/latest/';
+ public const DOWNLOAD_TIMEOUT = 720;
/**
* @var Translator
diff --git a/plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php b/plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php
index 6a223684e00..ed2c246c646 100644
--- a/plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php
+++ b/plugins/CoreUpdater/tests/Integration/Commands/UpdateTest.php
@@ -23,8 +23,8 @@
*/
class UpdateTest extends ConsoleCommandTestCase
{
- const VERSION_TO_UPDATE_FROM = '2.9.0';
- const EXPECTED_SQL_FROM_2_10 = "UPDATE report SET reports = REPLACE(reports, 'UserSettings_getBrowserVersion', 'DevicesDetection_getBrowserVersions');";
+ public const VERSION_TO_UPDATE_FROM = '2.9.0';
+ public const EXPECTED_SQL_FROM_2_10 = "UPDATE report SET reports = REPLACE(reports, 'UserSettings_getBrowserVersion', 'DevicesDetection_getBrowserVersions');";
private $oldScriptName = null;
diff --git a/plugins/CoreVisualizations/Visualizations/Cloud.php b/plugins/CoreVisualizations/Visualizations/Cloud.php
index dad7efa4a51..b0e9f7cb824 100644
--- a/plugins/CoreVisualizations/Visualizations/Cloud.php
+++ b/plugins/CoreVisualizations/Visualizations/Cloud.php
@@ -22,10 +22,10 @@
*/
class Cloud extends Visualization
{
- const ID = 'cloud';
- const TEMPLATE_FILE = "@CoreVisualizations/_dataTableViz_tagCloud.twig";
- const FOOTER_ICON = 'icon-tag-cloud';
- const FOOTER_ICON_TITLE = 'General_TagCloud';
+ public const ID = 'cloud';
+ public const TEMPLATE_FILE = "@CoreVisualizations/_dataTableViz_tagCloud.twig";
+ public const FOOTER_ICON = 'icon-tag-cloud';
+ public const FOOTER_ICON_TITLE = 'General_TagCloud';
/** Used by system tests to make sure output is consistent. */
public static $debugDisableShuffle = false;
diff --git a/plugins/CoreVisualizations/Visualizations/Graph.php b/plugins/CoreVisualizations/Visualizations/Graph.php
index 6f8d4edf6e7..03698789323 100644
--- a/plugins/CoreVisualizations/Visualizations/Graph.php
+++ b/plugins/CoreVisualizations/Visualizations/Graph.php
@@ -27,7 +27,7 @@
*/
abstract class Graph extends Visualization
{
- const ID = 'graph';
+ public const ID = 'graph';
public $selectableRows = array();
diff --git a/plugins/CoreVisualizations/Visualizations/HtmlTable.php b/plugins/CoreVisualizations/Visualizations/HtmlTable.php
index 198e1db138c..30eb80a67aa 100644
--- a/plugins/CoreVisualizations/Visualizations/HtmlTable.php
+++ b/plugins/CoreVisualizations/Visualizations/HtmlTable.php
@@ -26,10 +26,10 @@
*/
class HtmlTable extends Visualization
{
- const ID = 'table';
- const TEMPLATE_FILE = "@CoreVisualizations/_dataTableViz_htmlTable.twig";
- const FOOTER_ICON = 'icon-table';
- const FOOTER_ICON_TITLE = 'General_DisplaySimpleTable';
+ public const ID = 'table';
+ public const TEMPLATE_FILE = "@CoreVisualizations/_dataTableViz_htmlTable.twig";
+ public const FOOTER_ICON = 'icon-table';
+ public const FOOTER_ICON_TITLE = 'General_DisplaySimpleTable';
protected $siteSummary;
diff --git a/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php b/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php
index 448d68ecc8c..37db16d657e 100644
--- a/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php
+++ b/plugins/CoreVisualizations/Visualizations/HtmlTable/AllColumns.php
@@ -17,9 +17,9 @@
*/
class AllColumns extends HtmlTable
{
- const ID = 'tableAllColumns';
- const FOOTER_ICON = 'icon-table-more';
- const FOOTER_ICON_TITLE = 'General_DisplayTableWithMoreMetrics';
+ public const ID = 'tableAllColumns';
+ public const FOOTER_ICON = 'icon-table-more';
+ public const FOOTER_ICON_TITLE = 'General_DisplayTableWithMoreMetrics';
public function beforeRender()
{
diff --git a/plugins/CoreVisualizations/Visualizations/JqplotGraph.php b/plugins/CoreVisualizations/Visualizations/JqplotGraph.php
index 8f5799f91dc..d301ea1b5ab 100644
--- a/plugins/CoreVisualizations/Visualizations/JqplotGraph.php
+++ b/plugins/CoreVisualizations/Visualizations/JqplotGraph.php
@@ -18,8 +18,8 @@
*/
abstract class JqplotGraph extends Graph
{
- const ID = 'jqplot_graph';
- const TEMPLATE_FILE = '@CoreVisualizations/_dataTableViz_jqplotGraph.twig';
+ public const ID = 'jqplot_graph';
+ public const TEMPLATE_FILE = '@CoreVisualizations/_dataTableViz_jqplotGraph.twig';
public static function getDefaultConfig()
{
diff --git a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Bar.php b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Bar.php
index 7c5c0587b4c..a2c159b07ff 100644
--- a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Bar.php
+++ b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Bar.php
@@ -17,9 +17,9 @@
*/
class Bar extends JqplotGraph
{
- const ID = 'graphVerticalBar';
- const FOOTER_ICON = 'icon-chart-bar';
- const FOOTER_ICON_TITLE = 'General_VBarGraph';
+ public const ID = 'graphVerticalBar';
+ public const FOOTER_ICON = 'icon-chart-bar';
+ public const FOOTER_ICON_TITLE = 'General_VBarGraph';
public function beforeLoadDataTable()
{
diff --git a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php
index 662f89e31e2..6d4f829d215 100644
--- a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php
+++ b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Evolution.php
@@ -27,8 +27,8 @@
*/
class Evolution extends JqplotGraph
{
- const ID = 'graphEvolution';
- const SERIES_COLOR_COUNT = 8;
+ public const ID = 'graphEvolution';
+ public const SERIES_COLOR_COUNT = 8;
public static function getDefaultConfig()
{
diff --git a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Pie.php b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Pie.php
index 34b10ee8e10..5183052070a 100644
--- a/plugins/CoreVisualizations/Visualizations/JqplotGraph/Pie.php
+++ b/plugins/CoreVisualizations/Visualizations/JqplotGraph/Pie.php
@@ -17,9 +17,9 @@
*/
class Pie extends JqplotGraph
{
- const ID = 'graphPie';
- const FOOTER_ICON = 'icon-chart-pie';
- const FOOTER_ICON_TITLE = 'General_Piechart';
+ public const ID = 'graphPie';
+ public const FOOTER_ICON = 'icon-chart-pie';
+ public const FOOTER_ICON_TITLE = 'General_Piechart';
public static function getDefaultConfig()
{
diff --git a/plugins/CoreVisualizations/Visualizations/Sparkline.php b/plugins/CoreVisualizations/Visualizations/Sparkline.php
index a3f33481793..676a951e643 100644
--- a/plugins/CoreVisualizations/Visualizations/Sparkline.php
+++ b/plugins/CoreVisualizations/Visualizations/Sparkline.php
@@ -20,7 +20,7 @@
*/
class Sparkline extends ViewDataTable
{
- const ID = 'sparkline';
+ public const ID = 'sparkline';
public function supportsComparison()
{
diff --git a/plugins/CoreVisualizations/Visualizations/Sparklines.php b/plugins/CoreVisualizations/Visualizations/Sparklines.php
index 2736566ed97..47ff0c223ff 100644
--- a/plugins/CoreVisualizations/Visualizations/Sparklines.php
+++ b/plugins/CoreVisualizations/Visualizations/Sparklines.php
@@ -49,7 +49,7 @@
*/
class Sparklines extends ViewDataTable
{
- const ID = 'sparklines';
+ public const ID = 'sparklines';
public static function getDefaultConfig()
{
diff --git a/plugins/CoreVue/Commands/Build.php b/plugins/CoreVue/Commands/Build.php
index a554fccbfa6..0b2adefb254 100644
--- a/plugins/CoreVue/Commands/Build.php
+++ b/plugins/CoreVue/Commands/Build.php
@@ -17,9 +17,9 @@
class Build extends ConsoleCommand
{
- const RECOMMENDED_NODE_VERSION = '16.0.0';
- const RECOMMENDED_NPM_VERSION = '7.0.0';
- const RETRY_COUNT = 2;
+ public const RECOMMENDED_NODE_VERSION = '16.0.0';
+ public const RECOMMENDED_NPM_VERSION = '7.0.0';
+ public const RETRY_COUNT = 2;
protected function configure()
{
diff --git a/plugins/CustomDimensions/Archiver.php b/plugins/CustomDimensions/Archiver.php
index 5bdda86efa0..ec9a6ae6eb5 100644
--- a/plugins/CustomDimensions/Archiver.php
+++ b/plugins/CustomDimensions/Archiver.php
@@ -13,7 +13,7 @@
*/
class Archiver extends \Piwik\Plugin\Archiver
{
- const LABEL_CUSTOM_VALUE_NOT_DEFINED = "Value not defined";
+ public const LABEL_CUSTOM_VALUE_NOT_DEFINED = "Value not defined";
public static function buildRecordNameForCustomDimensionId($id)
{
diff --git a/plugins/CustomDimensions/CustomDimensions.php b/plugins/CustomDimensions/CustomDimensions.php
index f2ac4ae43e0..b9817d1f0e1 100644
--- a/plugins/CustomDimensions/CustomDimensions.php
+++ b/plugins/CustomDimensions/CustomDimensions.php
@@ -20,9 +20,9 @@
class CustomDimensions extends Plugin
{
- const SCOPE_ACTION = 'action';
- const SCOPE_VISIT = 'visit';
- const SCOPE_CONVERSION = 'conversion';
+ public const SCOPE_ACTION = 'action';
+ public const SCOPE_VISIT = 'visit';
+ public const SCOPE_CONVERSION = 'conversion';
/**
* @var Configuration
diff --git a/plugins/CustomDimensions/Dao/LogTable.php b/plugins/CustomDimensions/Dao/LogTable.php
index 4301d8c8712..a0516468d70 100644
--- a/plugins/CustomDimensions/Dao/LogTable.php
+++ b/plugins/CustomDimensions/Dao/LogTable.php
@@ -17,7 +17,7 @@
class LogTable
{
- const DEFAULT_CUSTOM_DIMENSION_COUNT = 5;
+ public const DEFAULT_CUSTOM_DIMENSION_COUNT = 5;
private $scope = null;
private $table = null;
diff --git a/plugins/CustomJsTracker/TrackerUpdater.php b/plugins/CustomJsTracker/TrackerUpdater.php
index 856416bafc0..860023d8fd1 100644
--- a/plugins/CustomJsTracker/TrackerUpdater.php
+++ b/plugins/CustomJsTracker/TrackerUpdater.php
@@ -22,9 +22,9 @@
*/
class TrackerUpdater
{
- const DEVELOPMENT_PIWIK_JS = '/js/piwik.js';
- const ORIGINAL_PIWIK_JS = '/js/piwik.min.js';
- const TARGET_MATOMO_JS = '/matomo.js';
+ public const DEVELOPMENT_PIWIK_JS = '/js/piwik.js';
+ public const ORIGINAL_PIWIK_JS = '/js/piwik.min.js';
+ public const TARGET_MATOMO_JS = '/matomo.js';
/**
* @var File
diff --git a/plugins/CustomJsTracker/TrackingCode/PiwikJsManipulator.php b/plugins/CustomJsTracker/TrackingCode/PiwikJsManipulator.php
index 81d07bb3e02..3cc1b978f0e 100644
--- a/plugins/CustomJsTracker/TrackingCode/PiwikJsManipulator.php
+++ b/plugins/CustomJsTracker/TrackingCode/PiwikJsManipulator.php
@@ -12,7 +12,7 @@
class PiwikJsManipulator
{
- const HOOK = '/*!!! pluginTrackerHook */';
+ public const HOOK = '/*!!! pluginTrackerHook */';
/**
* @var string
*/
diff --git a/plugins/CustomJsTracker/TrackingCode/PluginTrackerFiles.php b/plugins/CustomJsTracker/TrackingCode/PluginTrackerFiles.php
index 98fee4696fb..7c3ab56a50f 100644
--- a/plugins/CustomJsTracker/TrackingCode/PluginTrackerFiles.php
+++ b/plugins/CustomJsTracker/TrackingCode/PluginTrackerFiles.php
@@ -13,8 +13,8 @@
class PluginTrackerFiles
{
- const TRACKER_FILE = 'tracker.js';
- const MIN_TRACKER_FILE = 'tracker.min.js';
+ public const TRACKER_FILE = 'tracker.js';
+ public const MIN_TRACKER_FILE = 'tracker.min.js';
/**
* @var Plugin\Manager
diff --git a/plugins/CustomJsTracker/tests/Integration/FileTest.php b/plugins/CustomJsTracker/tests/Integration/FileTest.php
index fb881ff2933..8535bf67b0a 100644
--- a/plugins/CustomJsTracker/tests/Integration/FileTest.php
+++ b/plugins/CustomJsTracker/tests/Integration/FileTest.php
@@ -23,8 +23,8 @@ class CustomTestFile extends File
*/
class FileTest extends IntegrationTestCase
{
- const NOT_EXISTING_FILE_IN_WRITABLE_DIRECTORY = 'notExisTinGFile.js';
- const NOT_EXISTING_FILE_IN_NON_WRITABLE_DIRECTORY = 'is-not-writable/notExisTinGFile.js';
+ public const NOT_EXISTING_FILE_IN_WRITABLE_DIRECTORY = 'notExisTinGFile.js';
+ public const NOT_EXISTING_FILE_IN_NON_WRITABLE_DIRECTORY = 'is-not-writable/notExisTinGFile.js';
/**
* @var string
diff --git a/plugins/DBStats/DBStats.php b/plugins/DBStats/DBStats.php
index fa9b9c2d7ce..c618e79a1bb 100644
--- a/plugins/DBStats/DBStats.php
+++ b/plugins/DBStats/DBStats.php
@@ -13,7 +13,7 @@
class DBStats extends \Piwik\Plugin
{
- const TIME_OF_LAST_TASK_RUN_OPTION = 'dbstats_time_of_last_cache_task_run';
+ public const TIME_OF_LAST_TASK_RUN_OPTION = 'dbstats_time_of_last_cache_task_run';
/**
* @see \Piwik\Plugin::registerEvents
diff --git a/plugins/DevicePlugins/Archiver.php b/plugins/DevicePlugins/Archiver.php
index bc20de30f8c..f119f744943 100644
--- a/plugins/DevicePlugins/Archiver.php
+++ b/plugins/DevicePlugins/Archiver.php
@@ -18,5 +18,5 @@
*/
class Archiver extends \Piwik\Plugin\Archiver
{
- const PLUGIN_RECORD_NAME = 'DevicePlugins_plugin';
+ public const PLUGIN_RECORD_NAME = 'DevicePlugins_plugin';
}
diff --git a/plugins/DevicePlugins/VisitorDetails.php b/plugins/DevicePlugins/VisitorDetails.php
index d093be66a9b..b9fd526f853 100644
--- a/plugins/DevicePlugins/VisitorDetails.php
+++ b/plugins/DevicePlugins/VisitorDetails.php
@@ -14,7 +14,7 @@
class VisitorDetails extends VisitorDetailsAbstract
{
- const DELIMITER_PLUGIN_NAME = ", ";
+ public const DELIMITER_PLUGIN_NAME = ", ";
public function extendVisitorDetails(&$visitor)
{
diff --git a/plugins/DevicesDetection/Archiver.php b/plugins/DevicesDetection/Archiver.php
index 69cb713260c..ce8b42c691b 100644
--- a/plugins/DevicesDetection/Archiver.php
+++ b/plugins/DevicesDetection/Archiver.php
@@ -11,22 +11,22 @@
class Archiver extends \Piwik\Plugin\Archiver
{
- const BROWSER_SEPARATOR = ';';
- const DEVICE_TYPE_RECORD_NAME = 'DevicesDetection_types';
- const DEVICE_BRAND_RECORD_NAME = 'DevicesDetection_brands';
- const DEVICE_MODEL_RECORD_NAME = 'DevicesDetection_models';
- const OS_RECORD_NAME = 'DevicesDetection_os';
- const OS_VERSION_RECORD_NAME = 'DevicesDetection_osVersions';
- const BROWSER_RECORD_NAME = 'DevicesDetection_browsers';
- const BROWSER_ENGINE_RECORD_NAME = 'DevicesDetection_browserEngines';
- const BROWSER_VERSION_RECORD_NAME = 'DevicesDetection_browserVersions';
+ public const BROWSER_SEPARATOR = ';';
+ public const DEVICE_TYPE_RECORD_NAME = 'DevicesDetection_types';
+ public const DEVICE_BRAND_RECORD_NAME = 'DevicesDetection_brands';
+ public const DEVICE_MODEL_RECORD_NAME = 'DevicesDetection_models';
+ public const OS_RECORD_NAME = 'DevicesDetection_os';
+ public const OS_VERSION_RECORD_NAME = 'DevicesDetection_osVersions';
+ public const BROWSER_RECORD_NAME = 'DevicesDetection_browsers';
+ public const BROWSER_ENGINE_RECORD_NAME = 'DevicesDetection_browserEngines';
+ public const BROWSER_VERSION_RECORD_NAME = 'DevicesDetection_browserVersions';
- const DEVICE_TYPE_FIELD = "config_device_type";
- const DEVICE_BRAND_FIELD = "config_device_brand";
- const DEVICE_MODEL_FIELD = "CONCAT(log_visit.config_device_brand, ';', log_visit.config_device_model)";
- const OS_FIELD = "config_os";
- const OS_VERSION_FIELD = "CONCAT(log_visit.config_os, ';', COALESCE(log_visit.config_os_version, ''))";
- const BROWSER_FIELD = "config_browser_name";
- const BROWSER_ENGINE_FIELD = "config_browser_engine";
- const BROWSER_VERSION_DIMENSION = "CONCAT(log_visit.config_browser_name, ';', log_visit.config_browser_version)";
+ public const DEVICE_TYPE_FIELD = "config_device_type";
+ public const DEVICE_BRAND_FIELD = "config_device_brand";
+ public const DEVICE_MODEL_FIELD = "CONCAT(log_visit.config_device_brand, ';', log_visit.config_device_model)";
+ public const OS_FIELD = "config_os";
+ public const OS_VERSION_FIELD = "CONCAT(log_visit.config_os, ';', COALESCE(log_visit.config_os_version, ''))";
+ public const BROWSER_FIELD = "config_browser_name";
+ public const BROWSER_ENGINE_FIELD = "config_browser_engine";
+ public const BROWSER_VERSION_DIMENSION = "CONCAT(log_visit.config_browser_name, ';', log_visit.config_browser_version)";
}
diff --git a/plugins/Diagnostics/Diagnostic/CronArchivingLastRunCheck.php b/plugins/Diagnostics/Diagnostic/CronArchivingLastRunCheck.php
index f1e45b50e2e..e24df9b0201 100644
--- a/plugins/Diagnostics/Diagnostic/CronArchivingLastRunCheck.php
+++ b/plugins/Diagnostics/Diagnostic/CronArchivingLastRunCheck.php
@@ -24,7 +24,7 @@
*/
class CronArchivingLastRunCheck implements Diagnostic
{
- const SECONDS_IN_DAY = 86400;
+ public const SECONDS_IN_DAY = 86400;
/**
* @var Translator
diff --git a/plugins/Diagnostics/Diagnostic/DbMaxPacket.php b/plugins/Diagnostics/Diagnostic/DbMaxPacket.php
index cc0ca14da89..d9179940d1e 100644
--- a/plugins/Diagnostics/Diagnostic/DbMaxPacket.php
+++ b/plugins/Diagnostics/Diagnostic/DbMaxPacket.php
@@ -18,7 +18,7 @@ class DbMaxPacket implements Diagnostic
*/
private $translator;
- const MIN_VALUE_MAX_PACKET_MB = 64;
+ public const MIN_VALUE_MAX_PACKET_MB = 64;
public function __construct(Translator $translator)
{
diff --git a/plugins/Diagnostics/Diagnostic/DiagnosticResult.php b/plugins/Diagnostics/Diagnostic/DiagnosticResult.php
index 7869a3c98a1..8897a24d166 100644
--- a/plugins/Diagnostics/Diagnostic/DiagnosticResult.php
+++ b/plugins/Diagnostics/Diagnostic/DiagnosticResult.php
@@ -17,10 +17,10 @@
*/
class DiagnosticResult implements \JsonSerializable
{
- const STATUS_ERROR = 'error';
- const STATUS_WARNING = 'warning';
- const STATUS_OK = 'ok';
- const STATUS_INFORMATIONAL = 'informational';
+ public const STATUS_ERROR = 'error';
+ public const STATUS_WARNING = 'warning';
+ public const STATUS_OK = 'ok';
+ public const STATUS_INFORMATIONAL = 'informational';
/**
* @var string
diff --git a/plugins/Diagnostics/Diagnostics.php b/plugins/Diagnostics/Diagnostics.php
index 6edbee3c91b..8705e4ea320 100644
--- a/plugins/Diagnostics/Diagnostics.php
+++ b/plugins/Diagnostics/Diagnostics.php
@@ -18,7 +18,7 @@
class Diagnostics extends Plugin
{
- const NO_DATA_ARCHIVING_NOT_RUN_NOTIFICATION_ID = 'DiagnosticsNoDataArchivingNotRun';
+ public const NO_DATA_ARCHIVING_NOT_RUN_NOTIFICATION_ID = 'DiagnosticsNoDataArchivingNotRun';
/**
* @see \Piwik\Plugin::registerEvents
diff --git a/plugins/Ecommerce/Columns/ProductCategory.php b/plugins/Ecommerce/Columns/ProductCategory.php
index 606eb55ad0a..5153581f4ed 100644
--- a/plugins/Ecommerce/Columns/ProductCategory.php
+++ b/plugins/Ecommerce/Columns/ProductCategory.php
@@ -19,7 +19,7 @@
class ProductCategory extends Dimension
{
- const PRODUCT_CATEGORY_COUNT = 5;
+ public const PRODUCT_CATEGORY_COUNT = 5;
protected $type = self::TYPE_TEXT;
protected $category = 'Goals_Ecommerce';
diff --git a/plugins/Ecommerce/VisitorDetails.php b/plugins/Ecommerce/VisitorDetails.php
index e3625e0a247..de63802f07e 100644
--- a/plugins/Ecommerce/VisitorDetails.php
+++ b/plugins/Ecommerce/VisitorDetails.php
@@ -23,8 +23,8 @@
class VisitorDetails extends VisitorDetailsAbstract
{
- const CATEGORY_COUNT = 5;
- const DEFAULT_LIFETIME_STAT = array(
+ public const CATEGORY_COUNT = 5;
+ public const DEFAULT_LIFETIME_STAT = array(
'lifeTimeRevenue' => 0,
'lifeTimeConversions' => 0,
'lifeTimeEcommerceItems' => 0);
diff --git a/plugins/Events/Archiver.php b/plugins/Events/Archiver.php
index 0c2b1791767..51a728d840d 100644
--- a/plugins/Events/Archiver.php
+++ b/plugins/Events/Archiver.php
@@ -55,11 +55,11 @@
*/
class Archiver extends \Piwik\Plugin\Archiver
{
- const EVENTS_CATEGORY_ACTION_RECORD_NAME = 'Events_category_action';
- const EVENTS_CATEGORY_NAME_RECORD_NAME = 'Events_category_name';
- const EVENTS_ACTION_CATEGORY_RECORD_NAME = 'Events_action_category';
- const EVENTS_ACTION_NAME_RECORD_NAME = 'Events_action_name';
- const EVENTS_NAME_ACTION_RECORD_NAME = 'Events_name_action';
- const EVENTS_NAME_CATEGORY_RECORD_NAME = 'Events_name_category';
- const EVENT_NAME_NOT_SET = 'Piwik_EventNameNotSet';
+ public const EVENTS_CATEGORY_ACTION_RECORD_NAME = 'Events_category_action';
+ public const EVENTS_CATEGORY_NAME_RECORD_NAME = 'Events_category_name';
+ public const EVENTS_ACTION_CATEGORY_RECORD_NAME = 'Events_action_category';
+ public const EVENTS_ACTION_NAME_RECORD_NAME = 'Events_action_name';
+ public const EVENTS_NAME_ACTION_RECORD_NAME = 'Events_name_action';
+ public const EVENTS_NAME_CATEGORY_RECORD_NAME = 'Events_name_category';
+ public const EVENT_NAME_NOT_SET = 'Piwik_EventNameNotSet';
}
diff --git a/plugins/Events/VisitorDetails.php b/plugins/Events/VisitorDetails.php
index e0d17973107..b704032eaa7 100644
--- a/plugins/Events/VisitorDetails.php
+++ b/plugins/Events/VisitorDetails.php
@@ -15,7 +15,7 @@
class VisitorDetails extends VisitorDetailsAbstract
{
- const EVENT_VALUE_PRECISION = 3;
+ public const EVENT_VALUE_PRECISION = 3;
public function extendActionDetails(&$action, $nextAction, $visitorDetails)
{
diff --git a/plugins/ExamplePlugin/RecordBuilders/ExampleBlob.php b/plugins/ExamplePlugin/RecordBuilders/ExampleBlob.php
index 367f4ca65e1..0d8b64539dd 100644
--- a/plugins/ExamplePlugin/RecordBuilders/ExampleBlob.php
+++ b/plugins/ExamplePlugin/RecordBuilders/ExampleBlob.php
@@ -27,7 +27,7 @@
*/
class ExampleBlob extends RecordBuilder
{
- const EXAMPLEPLUGIN_BLOB_RECORD_NAME = 'ExamplePlugin_exampleBlob';
+ public const EXAMPLEPLUGIN_BLOB_RECORD_NAME = 'ExamplePlugin_exampleBlob';
/**
* This method should return the list of records this RecordBuilder creates. This example
diff --git a/plugins/ExamplePlugin/RecordBuilders/ExampleMetric.php b/plugins/ExamplePlugin/RecordBuilders/ExampleMetric.php
index 293cc462921..b490cc5343b 100644
--- a/plugins/ExamplePlugin/RecordBuilders/ExampleMetric.php
+++ b/plugins/ExamplePlugin/RecordBuilders/ExampleMetric.php
@@ -36,8 +36,8 @@ class ExampleMetric extends RecordBuilder
*
* These are only example record names, so feel free to change them to suit your needs.
*/
- const EXAMPLEPLUGIN_ARCHIVE_RECORD = "ExamplePlugin_archive_record";
- const EXAMPLEPLUGIN_METRIC_NAME = 'ExamplePlugin_example_metric';
+ public const EXAMPLEPLUGIN_ARCHIVE_RECORD = "ExamplePlugin_archive_record";
+ public const EXAMPLEPLUGIN_METRIC_NAME = 'ExamplePlugin_example_metric';
private $daysFrom = '2016-07-08';
diff --git a/plugins/ExamplePlugin/RecordBuilders/ExampleMetric2.php b/plugins/ExamplePlugin/RecordBuilders/ExampleMetric2.php
index e3cf6a3285e..4d15b3702e6 100644
--- a/plugins/ExamplePlugin/RecordBuilders/ExampleMetric2.php
+++ b/plugins/ExamplePlugin/RecordBuilders/ExampleMetric2.php
@@ -27,7 +27,7 @@
*/
class ExampleMetric2 extends RecordBuilder
{
- const EXAMPLEPLUGIN_CONST_METRIC_NAME = 'ExamplePlugin_example_metric2';
+ public const EXAMPLEPLUGIN_CONST_METRIC_NAME = 'ExamplePlugin_example_metric2';
/**
* This method should return the list of records this RecordBuilder creates. This example
diff --git a/plugins/ExampleVisualization/Visualizations/SimpleTable.php b/plugins/ExampleVisualization/Visualizations/SimpleTable.php
index 26f6625812d..63892dea6fe 100644
--- a/plugins/ExampleVisualization/Visualizations/SimpleTable.php
+++ b/plugins/ExampleVisualization/Visualizations/SimpleTable.php
@@ -17,10 +17,10 @@
*/
class SimpleTable extends Visualization
{
- const ID = 'simpleTable';
- const TEMPLATE_FILE = '@ExampleVisualization/simpleTable.twig';
- const FOOTER_ICON_TITLE = 'Simple Table';
- const FOOTER_ICON = 'plugins/ExampleVisualization/images/table.png';
+ public const ID = 'simpleTable';
+ public const TEMPLATE_FILE = '@ExampleVisualization/simpleTable.twig';
+ public const FOOTER_ICON_TITLE = 'Simple Table';
+ public const FOOTER_ICON = 'plugins/ExampleVisualization/images/table.png';
public function beforeLoadDataTable()
{
diff --git a/plugins/Feedback/Feedback.php b/plugins/Feedback/Feedback.php
index dc8389c5b71..4028471d2e0 100644
--- a/plugins/Feedback/Feedback.php
+++ b/plugins/Feedback/Feedback.php
@@ -19,7 +19,7 @@
*/
class Feedback extends \Piwik\Plugin
{
- const NEVER_REMIND_ME_AGAIN = "-1";
+ public const NEVER_REMIND_ME_AGAIN = "-1";
/**
* @see \Piwik\Plugin::registerEvents
diff --git a/plugins/GeoIp2/Commands/ConvertRegionCodesToIso.php b/plugins/GeoIp2/Commands/ConvertRegionCodesToIso.php
index 15436bd37f8..6f60111d78d 100644
--- a/plugins/GeoIp2/Commands/ConvertRegionCodesToIso.php
+++ b/plugins/GeoIp2/Commands/ConvertRegionCodesToIso.php
@@ -18,8 +18,8 @@
class ConvertRegionCodesToIso extends ConsoleCommand
{
- const OPTION_NAME = 'regioncodes_converted';
- const MAPPING_TABLE_NAME = 'fips2iso';
+ public const OPTION_NAME = 'regioncodes_converted';
+ public const MAPPING_TABLE_NAME = 'fips2iso';
protected function configure()
{
diff --git a/plugins/GeoIp2/GeoIP2AutoUpdater.php b/plugins/GeoIp2/GeoIP2AutoUpdater.php
index 0a90f4a1693..df0f138e4e2 100644
--- a/plugins/GeoIp2/GeoIP2AutoUpdater.php
+++ b/plugins/GeoIp2/GeoIP2AutoUpdater.php
@@ -38,17 +38,17 @@
*/
class GeoIP2AutoUpdater extends Task
{
- const SCHEDULE_PERIOD_MONTHLY = 'month';
- const SCHEDULE_PERIOD_WEEKLY = 'week';
+ public const SCHEDULE_PERIOD_MONTHLY = 'month';
+ public const SCHEDULE_PERIOD_WEEKLY = 'week';
- const SCHEDULE_PERIOD_OPTION_NAME = 'geoip2.updater_period';
+ public const SCHEDULE_PERIOD_OPTION_NAME = 'geoip2.updater_period';
- const LOC_URL_OPTION_NAME = 'geoip2.loc_db_url';
- const ISP_URL_OPTION_NAME = 'geoip2.isp_db_url';
+ public const LOC_URL_OPTION_NAME = 'geoip2.loc_db_url';
+ public const ISP_URL_OPTION_NAME = 'geoip2.isp_db_url';
- const LAST_RUN_TIME_OPTION_NAME = 'geoip2.updater_last_run_time';
+ public const LAST_RUN_TIME_OPTION_NAME = 'geoip2.updater_last_run_time';
- const AUTO_SETUP_OPTION_NAME = 'geoip2.autosetup';
+ public const AUTO_SETUP_OPTION_NAME = 'geoip2.autosetup';
private static $urlOptions = array(
'loc' => self::LOC_URL_OPTION_NAME,
diff --git a/plugins/GeoIp2/LocationProvider/GeoIp2.php b/plugins/GeoIp2/LocationProvider/GeoIp2.php
index 67d244576b6..41bb6b72c2f 100644
--- a/plugins/GeoIp2/LocationProvider/GeoIp2.php
+++ b/plugins/GeoIp2/LocationProvider/GeoIp2.php
@@ -21,8 +21,8 @@
*/
abstract class GeoIp2 extends LocationProvider
{
- const TEST_IP = '194.57.91.215';
- const SWITCH_TO_ISO_REGIONS_OPTION_NAME = 'usercountry.switchtoisoregions';
+ public const TEST_IP = '194.57.91.215';
+ public const SWITCH_TO_ISO_REGIONS_OPTION_NAME = 'usercountry.switchtoisoregions';
/**
* Cached region name array. Data is from geoipregionvars.php.
diff --git a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php
index 2734c1f87eb..1f028a97203 100644
--- a/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php
+++ b/plugins/GeoIp2/LocationProvider/GeoIp2/Php.php
@@ -29,8 +29,8 @@
*/
class Php extends GeoIp2
{
- const ID = 'geoip2php';
- const TITLE = 'DBIP / GeoIP 2 (Php)';
+ public const ID = 'geoip2php';
+ public const TITLE = 'DBIP / GeoIP 2 (Php)';
/**
* The GeoIP2 reader instances used. This array will contain at most two
diff --git a/plugins/GeoIp2/LocationProvider/GeoIp2/ServerModule.php b/plugins/GeoIp2/LocationProvider/GeoIp2/ServerModule.php
index 7c01fa895c2..2836992f78a 100644
--- a/plugins/GeoIp2/LocationProvider/GeoIp2/ServerModule.php
+++ b/plugins/GeoIp2/LocationProvider/GeoIp2/ServerModule.php
@@ -27,8 +27,8 @@
*/
class ServerModule extends GeoIp2
{
- const ID = 'geoip2server';
- const TITLE = 'DBIP / GeoIP 2 (%s)';
+ public const ID = 'geoip2server';
+ public const TITLE = 'DBIP / GeoIP 2 (%s)';
public static $defaultGeoIpServerVars = array(
parent::CONTINENT_CODE_KEY => 'MM_CONTINENT_CODE',
diff --git a/plugins/Goals/API.php b/plugins/Goals/API.php
index f817094e6bd..2f6c9c1fbd3 100644
--- a/plugins/Goals/API.php
+++ b/plugins/Goals/API.php
@@ -55,7 +55,7 @@
*/
class API extends \Piwik\Plugin\API
{
- const AVG_PRICE_VIEWED = 'avg_price_viewed';
+ public const AVG_PRICE_VIEWED = 'avg_price_viewed';
/**
* Return a single goal.
diff --git a/plugins/Goals/Archiver.php b/plugins/Goals/Archiver.php
index 0e84c22b905..071ea262882 100644
--- a/plugins/Goals/Archiver.php
+++ b/plugins/Goals/Archiver.php
@@ -13,22 +13,22 @@
class Archiver extends \Piwik\Plugin\Archiver
{
- const VISITS_UNTIL_RECORD_NAME = 'visits_until_conv';
- const DAYS_UNTIL_CONV_RECORD_NAME = 'days_until_conv';
- const ITEMS_SKU_RECORD_NAME = 'Goals_ItemsSku';
- const ITEMS_NAME_RECORD_NAME = 'Goals_ItemsName';
- const ITEMS_CATEGORY_RECORD_NAME = 'Goals_ItemsCategory';
- const SKU_FIELD = 'idaction_sku';
- const NAME_FIELD = 'idaction_name';
- const CATEGORY_FIELD = 'idaction_category';
- const CATEGORY2_FIELD = 'idaction_category2';
- const CATEGORY3_FIELD = 'idaction_category3';
- const CATEGORY4_FIELD = 'idaction_category4';
- const CATEGORY5_FIELD = 'idaction_category5';
- const NO_LABEL = ':';
- const LOG_CONVERSION_TABLE = 'log_conversion';
- const VISITS_COUNT_FIELD = 'visitor_count_visits';
- const SECONDS_SINCE_FIRST_VISIT_FIELD = 'visitor_seconds_since_first';
+ public const VISITS_UNTIL_RECORD_NAME = 'visits_until_conv';
+ public const DAYS_UNTIL_CONV_RECORD_NAME = 'days_until_conv';
+ public const ITEMS_SKU_RECORD_NAME = 'Goals_ItemsSku';
+ public const ITEMS_NAME_RECORD_NAME = 'Goals_ItemsName';
+ public const ITEMS_CATEGORY_RECORD_NAME = 'Goals_ItemsCategory';
+ public const SKU_FIELD = 'idaction_sku';
+ public const NAME_FIELD = 'idaction_name';
+ public const CATEGORY_FIELD = 'idaction_category';
+ public const CATEGORY2_FIELD = 'idaction_category2';
+ public const CATEGORY3_FIELD = 'idaction_category3';
+ public const CATEGORY4_FIELD = 'idaction_category4';
+ public const CATEGORY5_FIELD = 'idaction_category5';
+ public const NO_LABEL = ':';
+ public const LOG_CONVERSION_TABLE = 'log_conversion';
+ public const VISITS_COUNT_FIELD = 'visitor_count_visits';
+ public const SECONDS_SINCE_FIRST_VISIT_FIELD = 'visitor_seconds_since_first';
public function getDependentSegmentsToArchive(): array
{
diff --git a/plugins/Goals/Controller.php b/plugins/Goals/Controller.php
index 6baa182ed9f..8da946f77fb 100644
--- a/plugins/Goals/Controller.php
+++ b/plugins/Goals/Controller.php
@@ -36,7 +36,7 @@ class Controller extends \Piwik\Plugin\Controller
* Number of "Your top converting keywords/etc are" to display in the per Goal overview page
* @var int
*/
- const COUNT_TOP_ROWS_TO_DISPLAY = 3;
+ public const COUNT_TOP_ROWS_TO_DISPLAY = 3;
protected $goalColumnNameToLabel = array(
'avg_order_revenue' => 'General_AverageOrderValue',
diff --git a/plugins/Goals/RecordBuilders/GeneralGoalsRecords.php b/plugins/Goals/RecordBuilders/GeneralGoalsRecords.php
index 283192e868d..317007159fc 100644
--- a/plugins/Goals/RecordBuilders/GeneralGoalsRecords.php
+++ b/plugins/Goals/RecordBuilders/GeneralGoalsRecords.php
@@ -22,9 +22,9 @@
class GeneralGoalsRecords extends Base
{
- const VISITS_COUNT_FIELD = 'visitor_count_visits';
- const LOG_CONVERSION_TABLE = 'log_conversion';
- const SECONDS_SINCE_FIRST_VISIT_FIELD = 'visitor_seconds_since_first';
+ public const VISITS_COUNT_FIELD = 'visitor_count_visits';
+ public const LOG_CONVERSION_TABLE = 'log_conversion';
+ public const SECONDS_SINCE_FIRST_VISIT_FIELD = 'visitor_seconds_since_first';
protected function aggregate(ArchiveProcessor $archiveProcessor): array
{
diff --git a/plugins/Goals/RecordBuilders/ProductRecord.php b/plugins/Goals/RecordBuilders/ProductRecord.php
index aab618a5312..b37d6e1849f 100644
--- a/plugins/Goals/RecordBuilders/ProductRecord.php
+++ b/plugins/Goals/RecordBuilders/ProductRecord.php
@@ -22,17 +22,17 @@
class ProductRecord extends Base
{
- const SKU_FIELD = 'idaction_sku';
- const NAME_FIELD = 'idaction_name';
- const CATEGORY_FIELD = 'idaction_category';
- const CATEGORY2_FIELD = 'idaction_category2';
- const CATEGORY3_FIELD = 'idaction_category3';
- const CATEGORY4_FIELD = 'idaction_category4';
- const CATEGORY5_FIELD = 'idaction_category5';
-
- const ITEMS_SKU_RECORD_NAME = 'Goals_ItemsSku';
- const ITEMS_NAME_RECORD_NAME = 'Goals_ItemsName';
- const ITEMS_CATEGORY_RECORD_NAME = 'Goals_ItemsCategory';
+ public const SKU_FIELD = 'idaction_sku';
+ public const NAME_FIELD = 'idaction_name';
+ public const CATEGORY_FIELD = 'idaction_category';
+ public const CATEGORY2_FIELD = 'idaction_category2';
+ public const CATEGORY3_FIELD = 'idaction_category3';
+ public const CATEGORY4_FIELD = 'idaction_category4';
+ public const CATEGORY5_FIELD = 'idaction_category5';
+
+ public const ITEMS_SKU_RECORD_NAME = 'Goals_ItemsSku';
+ public const ITEMS_NAME_RECORD_NAME = 'Goals_ItemsName';
+ public const ITEMS_CATEGORY_RECORD_NAME = 'Goals_ItemsCategory';
protected $actionMapping = [
self::SKU_FIELD => 'idaction_product_sku',
diff --git a/plugins/Goals/Visualizations/Goals.php b/plugins/Goals/Visualizations/Goals.php
index 94d10182d35..038b2b68647 100644
--- a/plugins/Goals/Visualizations/Goals.php
+++ b/plugins/Goals/Visualizations/Goals.php
@@ -25,13 +25,13 @@
*/
class Goals extends HtmlTable
{
- const ID = 'tableGoals';
- const FOOTER_ICON = 'icon-goal';
- const FOOTER_ICON_TITLE = 'General_DisplayTableWithGoalMetrics';
+ public const ID = 'tableGoals';
+ public const FOOTER_ICON = 'icon-goal';
+ public const FOOTER_ICON_TITLE = 'General_DisplayTableWithGoalMetrics';
- const GOALS_DISPLAY_NORMAL = 0;
- const GOALS_DISPLAY_PAGES = 1;
- const GOALS_DISPLAY_ENTRY_PAGES = 2;
+ public const GOALS_DISPLAY_NORMAL = 0;
+ public const GOALS_DISPLAY_PAGES = 1;
+ public const GOALS_DISPLAY_ENTRY_PAGES = 2;
private $displayType = self::GOALS_DISPLAY_NORMAL;
diff --git a/plugins/ImageGraph/API.php b/plugins/ImageGraph/API.php
index 75fb376f55d..d51f1a23a64 100644
--- a/plugins/ImageGraph/API.php
+++ b/plugins/ImageGraph/API.php
@@ -36,12 +36,12 @@
*/
class API extends \Piwik\Plugin\API
{
- const FILENAME_KEY = 'filename';
- const TRUNCATE_KEY = 'truncate';
- const WIDTH_KEY = 'width';
- const HEIGHT_KEY = 'height';
- const MAX_WIDTH = 2048;
- const MAX_HEIGHT = 2048;
+ public const FILENAME_KEY = 'filename';
+ public const TRUNCATE_KEY = 'truncate';
+ public const WIDTH_KEY = 'width';
+ public const HEIGHT_KEY = 'height';
+ public const MAX_WIDTH = 2048;
+ public const MAX_HEIGHT = 2048;
private static $DEFAULT_PARAMETERS = array(
StaticGraph::GRAPH_TYPE_BASIC_LINE => array(
@@ -83,23 +83,23 @@ class API extends \Piwik\Plugin\API
),
);
- const GRAPH_OUTPUT_INLINE = 0;
- const GRAPH_OUTPUT_FILE = 1;
- const GRAPH_OUTPUT_PHP = 2;
+ public const GRAPH_OUTPUT_INLINE = 0;
+ public const GRAPH_OUTPUT_FILE = 1;
+ public const GRAPH_OUTPUT_PHP = 2;
- const DEFAULT_ORDINATE_METRIC = 'nb_visits';
- const FONT_DIR = '/plugins/ImageGraph/fonts/';
- const DEFAULT_FONT = 'tahoma.ttf';
- const UNICODE_FONT = 'unifont.ttf';
- const DEFAULT_FONT_SIZE = 9;
- const DEFAULT_LEGEND_FONT_SIZE_OFFSET = 2;
- const DEFAULT_TEXT_COLOR = '222222';
- const DEFAULT_BACKGROUND_COLOR = 'FFFFFF';
- const DEFAULT_GRID_COLOR = 'CCCCCC';
+ public const DEFAULT_ORDINATE_METRIC = 'nb_visits';
+ public const FONT_DIR = '/plugins/ImageGraph/fonts/';
+ public const DEFAULT_FONT = 'tahoma.ttf';
+ public const UNICODE_FONT = 'unifont.ttf';
+ public const DEFAULT_FONT_SIZE = 9;
+ public const DEFAULT_LEGEND_FONT_SIZE_OFFSET = 2;
+ public const DEFAULT_TEXT_COLOR = '222222';
+ public const DEFAULT_BACKGROUND_COLOR = 'FFFFFF';
+ public const DEFAULT_GRID_COLOR = 'CCCCCC';
// number of row evolutions to plot when no labels are specified, can be overridden using &filter_limit
- const DEFAULT_NB_ROW_EVOLUTIONS = 5;
- const MAX_NB_ROW_LABELS = 10;
+ public const DEFAULT_NB_ROW_EVOLUTIONS = 5;
+ public const MAX_NB_ROW_LABELS = 10;
public function get(
$idSite,
diff --git a/plugins/ImageGraph/ImageGraph.php b/plugins/ImageGraph/ImageGraph.php
index e85135827c7..2d10d78e35c 100644
--- a/plugins/ImageGraph/ImageGraph.php
+++ b/plugins/ImageGraph/ImageGraph.php
@@ -43,7 +43,7 @@ public function registerEvents()
}
// Number of periods to plot on an evolution graph
- const GRAPH_EVOLUTION_LAST_PERIODS = 30;
+ public const GRAPH_EVOLUTION_LAST_PERIODS = 30;
/**
* @param array $reports
diff --git a/plugins/ImageGraph/StaticGraph.php b/plugins/ImageGraph/StaticGraph.php
index a2830d16476..477048b6b9b 100644
--- a/plugins/ImageGraph/StaticGraph.php
+++ b/plugins/ImageGraph/StaticGraph.php
@@ -22,11 +22,11 @@
*/
abstract class StaticGraph extends BaseFactory
{
- const GRAPH_TYPE_BASIC_LINE = "evolution";
- const GRAPH_TYPE_VERTICAL_BAR = "verticalBar";
- const GRAPH_TYPE_HORIZONTAL_BAR = "horizontalBar";
- const GRAPH_TYPE_3D_PIE = "3dPie";
- const GRAPH_TYPE_BASIC_PIE = "pie";
+ public const GRAPH_TYPE_BASIC_LINE = "evolution";
+ public const GRAPH_TYPE_VERTICAL_BAR = "verticalBar";
+ public const GRAPH_TYPE_HORIZONTAL_BAR = "horizontalBar";
+ public const GRAPH_TYPE_3D_PIE = "3dPie";
+ public const GRAPH_TYPE_BASIC_PIE = "pie";
private static $availableStaticGraphTypes = array(
self::GRAPH_TYPE_BASIC_LINE => 'Evolution',
@@ -36,7 +36,7 @@ abstract class StaticGraph extends BaseFactory
self::GRAPH_TYPE_3D_PIE => 'Pie3D',
);
- const ABSCISSA_SERIE_NAME = 'ABSCISSA';
+ public const ABSCISSA_SERIE_NAME = 'ABSCISSA';
private $aliasedGraph;
diff --git a/plugins/ImageGraph/StaticGraph/Exception.php b/plugins/ImageGraph/StaticGraph/Exception.php
index 17976106d60..2e21b47ce44 100644
--- a/plugins/ImageGraph/StaticGraph/Exception.php
+++ b/plugins/ImageGraph/StaticGraph/Exception.php
@@ -16,7 +16,7 @@
*/
class Exception extends StaticGraph
{
- const MESSAGE_RIGHT_MARGIN = 5;
+ public const MESSAGE_RIGHT_MARGIN = 5;
/**
* @var \Exception
diff --git a/plugins/ImageGraph/StaticGraph/GridGraph.php b/plugins/ImageGraph/StaticGraph/GridGraph.php
index d4e0484e947..d39ebb77384 100644
--- a/plugins/ImageGraph/StaticGraph/GridGraph.php
+++ b/plugins/ImageGraph/StaticGraph/GridGraph.php
@@ -16,35 +16,35 @@
*/
abstract class GridGraph extends StaticGraph
{
- const GRAPHIC_COLOR_KEY = 'GRAPHIC_COLOR';
-
- const TRUNCATION_TEXT = '...';
-
- const DEFAULT_TICK_ALPHA = 20;
- const DEFAULT_SERIE_WEIGHT = 0.5;
- const LEFT_GRID_MARGIN = 20;
- const BOTTOM_GRID_MARGIN = 10;
- const TOP_GRID_MARGIN_HORIZONTAL_GRAPH = 10;
- const RIGHT_GRID_MARGIN_HORIZONTAL_GRAPH = 20;
- const OUTER_TICK_WIDTH = 5;
- const INNER_TICK_WIDTH = 0;
- const LABEL_SPACE_VERTICAL_GRAPH = 7;
-
- const HORIZONTAL_LEGEND_TOP_MARGIN = 5;
- const HORIZONTAL_LEGEND_LEFT_MARGIN = 10;
- const HORIZONTAL_LEGEND_BOTTOM_MARGIN = 10;
- const VERTICAL_LEGEND_TOP_MARGIN = 10;
- const VERTICAL_LEGEND_LEFT_MARGIN = 6;
- const VERTICAL_LEGEND_MAX_WIDTH_PCT = 0.70;
- const LEGEND_LINE_BULLET_WIDTH = 14;
- const LEGEND_BOX_BULLET_WIDTH = 5;
- const LEGEND_BULLET_RIGHT_PADDING = 5;
- const LEGEND_ITEM_HORIZONTAL_INTERSTICE = 6;
- const LEGEND_ITEM_VERTICAL_INTERSTICE_OFFSET = 4;
- const LEGEND_SHADOW_OPACITY = 25;
- const LEGEND_VERTICAL_SHADOW_PADDING = 3;
- const LEGEND_HORIZONTAL_SHADOW_PADDING = 2;
- const PCHART_HARD_CODED_VERTICAL_LEGEND_INTERSTICE = 5;
+ public const GRAPHIC_COLOR_KEY = 'GRAPHIC_COLOR';
+
+ public const TRUNCATION_TEXT = '...';
+
+ public const DEFAULT_TICK_ALPHA = 20;
+ public const DEFAULT_SERIE_WEIGHT = 0.5;
+ public const LEFT_GRID_MARGIN = 20;
+ public const BOTTOM_GRID_MARGIN = 10;
+ public const TOP_GRID_MARGIN_HORIZONTAL_GRAPH = 10;
+ public const RIGHT_GRID_MARGIN_HORIZONTAL_GRAPH = 20;
+ public const OUTER_TICK_WIDTH = 5;
+ public const INNER_TICK_WIDTH = 0;
+ public const LABEL_SPACE_VERTICAL_GRAPH = 7;
+
+ public const HORIZONTAL_LEGEND_TOP_MARGIN = 5;
+ public const HORIZONTAL_LEGEND_LEFT_MARGIN = 10;
+ public const HORIZONTAL_LEGEND_BOTTOM_MARGIN = 10;
+ public const VERTICAL_LEGEND_TOP_MARGIN = 10;
+ public const VERTICAL_LEGEND_LEFT_MARGIN = 6;
+ public const VERTICAL_LEGEND_MAX_WIDTH_PCT = 0.70;
+ public const LEGEND_LINE_BULLET_WIDTH = 14;
+ public const LEGEND_BOX_BULLET_WIDTH = 5;
+ public const LEGEND_BULLET_RIGHT_PADDING = 5;
+ public const LEGEND_ITEM_HORIZONTAL_INTERSTICE = 6;
+ public const LEGEND_ITEM_VERTICAL_INTERSTICE_OFFSET = 4;
+ public const LEGEND_SHADOW_OPACITY = 25;
+ public const LEGEND_VERTICAL_SHADOW_PADDING = 3;
+ public const LEGEND_HORIZONTAL_SHADOW_PADDING = 2;
+ public const PCHART_HARD_CODED_VERTICAL_LEGEND_INTERSTICE = 5;
protected function getDefaultColors()
{
diff --git a/plugins/ImageGraph/StaticGraph/HorizontalBar.php b/plugins/ImageGraph/StaticGraph/HorizontalBar.php
index 70afd18f986..67f11d23d52 100644
--- a/plugins/ImageGraph/StaticGraph/HorizontalBar.php
+++ b/plugins/ImageGraph/StaticGraph/HorizontalBar.php
@@ -14,11 +14,11 @@
*/
class HorizontalBar extends GridGraph
{
- const INTERLEAVE = 0.30;
- const PADDING_CHARS = ' ';
- const LEGEND_SQUARE_WIDTH = 11;
- const MIN_SPACE_BETWEEN_HORIZONTAL_VALUES = 5;
- const LOGO_MIN_RIGHT_MARGIN = 3;
+ public const INTERLEAVE = 0.30;
+ public const PADDING_CHARS = ' ';
+ public const LEGEND_SQUARE_WIDTH = 11;
+ public const MIN_SPACE_BETWEEN_HORIZONTAL_VALUES = 5;
+ public const LOGO_MIN_RIGHT_MARGIN = 3;
public function renderGraph()
{
diff --git a/plugins/ImageGraph/StaticGraph/PieGraph.php b/plugins/ImageGraph/StaticGraph/PieGraph.php
index 90de5b14cb3..619c7e74232 100644
--- a/plugins/ImageGraph/StaticGraph/PieGraph.php
+++ b/plugins/ImageGraph/StaticGraph/PieGraph.php
@@ -17,11 +17,11 @@
*/
abstract class PieGraph extends StaticGraph
{
- const RADIUS_MARGIN = 40;
- const PIE_RIGHT_MARGIN = 20;
- const SECTOR_GAP = 2.5;
+ public const RADIUS_MARGIN = 40;
+ public const PIE_RIGHT_MARGIN = 20;
+ public const SECTOR_GAP = 2.5;
- const SLICE_COLOR_KEY = "SLICE_COLOR";
+ public const SLICE_COLOR_KEY = "SLICE_COLOR";
/**
* @var Pie
diff --git a/plugins/ImageGraph/StaticGraph/VerticalBar.php b/plugins/ImageGraph/StaticGraph/VerticalBar.php
index 69d2edc5187..ad53138d11d 100644
--- a/plugins/ImageGraph/StaticGraph/VerticalBar.php
+++ b/plugins/ImageGraph/StaticGraph/VerticalBar.php
@@ -13,7 +13,7 @@
*/
class VerticalBar extends GridGraph
{
- const INTERLEAVE = 0.10;
+ public const INTERLEAVE = 0.10;
public function renderGraph()
{
diff --git a/plugins/Insights/API.php b/plugins/Insights/API.php
index 5c37a7a6049..26608c4b380 100644
--- a/plugins/Insights/API.php
+++ b/plugins/Insights/API.php
@@ -22,17 +22,17 @@ class API extends \Piwik\Plugin\API
/**
* Include only 'movers' which are existing in the current and past report.
*/
- const FILTER_BY_MOVERS = 'movers';
+ public const FILTER_BY_MOVERS = 'movers';
/**
* Include only 'new' rows which were not existing in the past report.
*/
- const FILTER_BY_NEW = 'new';
+ public const FILTER_BY_NEW = 'new';
/**
* Include only 'disappeared' rows which were existing in the past report but no longer in the current report.
*/
- const FILTER_BY_DISAPPEARED = 'disappeared';
+ public const FILTER_BY_DISAPPEARED = 'disappeared';
/**
* @var Model
diff --git a/plugins/Insights/InsightReport.php b/plugins/Insights/InsightReport.php
index 5108f2d579e..462c494964e 100644
--- a/plugins/Insights/InsightReport.php
+++ b/plugins/Insights/InsightReport.php
@@ -16,9 +16,9 @@
*/
class InsightReport
{
- const ORDER_BY_RELATIVE = 'relative';
- const ORDER_BY_ABSOLUTE = 'absolute';
- const ORDER_BY_IMPORTANCE = 'importance';
+ public const ORDER_BY_RELATIVE = 'relative';
+ public const ORDER_BY_ABSOLUTE = 'absolute';
+ public const ORDER_BY_IMPORTANCE = 'importance';
/**
* @param array $reportMetadata
diff --git a/plugins/Insights/Visualizations/Insight.php b/plugins/Insights/Visualizations/Insight.php
index d21913a5b63..7c4f5ec5c8f 100644
--- a/plugins/Insights/Visualizations/Insight.php
+++ b/plugins/Insights/Visualizations/Insight.php
@@ -21,10 +21,10 @@
*/
class Insight extends Visualization
{
- const ID = 'insightsVisualization';
- const TEMPLATE_FILE = '@Insights/insightVisualization.twig';
- const FOOTER_ICON_TITLE = 'Insights';
- const FOOTER_ICON = 'icon-insights';
+ public const ID = 'insightsVisualization';
+ public const TEMPLATE_FILE = '@Insights/insightVisualization.twig';
+ public const FOOTER_ICON_TITLE = 'Insights';
+ public const FOOTER_ICON = 'icon-insights';
public function beforeLoadDataTable()
{
diff --git a/plugins/Installation/FormDatabaseSetup.php b/plugins/Installation/FormDatabaseSetup.php
index 267f27aba86..a1581d77b37 100644
--- a/plugins/Installation/FormDatabaseSetup.php
+++ b/plugins/Installation/FormDatabaseSetup.php
@@ -190,8 +190,8 @@ public function createDatabaseObject()
*/
class RuleCheckUserPrivileges extends HTML_QuickForm2_Rule
{
- const TEST_TABLE_NAME = 'piwik_test_table';
- const TEST_TEMP_TABLE_NAME = 'piwik_test_table_temp';
+ public const TEST_TABLE_NAME = 'piwik_test_table';
+ public const TEST_TEMP_TABLE_NAME = 'piwik_test_table_temp';
/**
* Checks that the DB user entered in the form has the necessary privileges for Piwik
diff --git a/plugins/Installation/Onboarding.php b/plugins/Installation/Onboarding.php
index b6fe7334878..5e8ffe9ef6c 100644
--- a/plugins/Installation/Onboarding.php
+++ b/plugins/Installation/Onboarding.php
@@ -15,7 +15,7 @@
class Onboarding
{
- const OPTION_NAME_INSTALL_MAIL = 'install_mail_sent';
+ public const OPTION_NAME_INSTALL_MAIL = 'install_mail_sent';
public static function sendSysAdminMail($email)
{
diff --git a/plugins/IntranetMeasurable/Type.php b/plugins/IntranetMeasurable/Type.php
index da0b306af40..66a2cc02b75 100644
--- a/plugins/IntranetMeasurable/Type.php
+++ b/plugins/IntranetMeasurable/Type.php
@@ -10,7 +10,7 @@
class Type extends \Piwik\Measurable\Type
{
- const ID = 'intranet';
+ public const ID = 'intranet';
protected $name = 'IntranetMeasurable_Intranet';
protected $namePlural = 'IntranetMeasurable_Intranets';
protected $description = 'IntranetMeasurable_IntranetDescription';
diff --git a/plugins/JsTrackerInstallCheck/JsTrackerInstallCheck.php b/plugins/JsTrackerInstallCheck/JsTrackerInstallCheck.php
index bf4e8a8ba66..21d66061370 100644
--- a/plugins/JsTrackerInstallCheck/JsTrackerInstallCheck.php
+++ b/plugins/JsTrackerInstallCheck/JsTrackerInstallCheck.php
@@ -16,7 +16,7 @@
class JsTrackerInstallCheck extends \Piwik\Plugin
{
- const QUERY_PARAM_NAME = 'tracker_install_check';
+ public const QUERY_PARAM_NAME = 'tracker_install_check';
public function registerEvents()
{
diff --git a/plugins/JsTrackerInstallCheck/NonceOption/JsTrackerInstallCheckOption.php b/plugins/JsTrackerInstallCheck/NonceOption/JsTrackerInstallCheckOption.php
index 216495fa78e..b6fa7edc3e1 100644
--- a/plugins/JsTrackerInstallCheck/NonceOption/JsTrackerInstallCheckOption.php
+++ b/plugins/JsTrackerInstallCheck/NonceOption/JsTrackerInstallCheckOption.php
@@ -9,11 +9,11 @@
class JsTrackerInstallCheckOption
{
- const OPTION_NAME_PREFIX = 'JsTrackerInstallCheck_';
- const MAX_NONCE_AGE_SECONDS = 30;
- const NONCE_DATA_TIME = 'time';
- const NONCE_DATA_URL = 'url';
- const NONCE_DATA_IS_SUCCESS = 'isSuccessful';
+ public const OPTION_NAME_PREFIX = 'JsTrackerInstallCheck_';
+ public const MAX_NONCE_AGE_SECONDS = 30;
+ public const NONCE_DATA_TIME = 'time';
+ public const NONCE_DATA_URL = 'url';
+ public const NONCE_DATA_IS_SUCCESS = 'isSuccessful';
/**
* Look up a specific nonce for a site. If none exists, an empty array is returned.
diff --git a/plugins/JsTrackerInstallCheck/tests/Integration/JsTrackerInstallCheckIntegrationTestCase.php b/plugins/JsTrackerInstallCheck/tests/Integration/JsTrackerInstallCheckIntegrationTestCase.php
index 99b9ca1578a..eeb60bec8a6 100644
--- a/plugins/JsTrackerInstallCheck/tests/Integration/JsTrackerInstallCheckIntegrationTestCase.php
+++ b/plugins/JsTrackerInstallCheck/tests/Integration/JsTrackerInstallCheckIntegrationTestCase.php
@@ -13,11 +13,11 @@
class JsTrackerInstallCheckIntegrationTestCase extends IntegrationTestCase
{
- const TEST_URL1 = 'https://some-test-site.local';
- const TEST_URL2 = 'https://another-test-site.local';
- const TEST_URL3 = 'https://nonexistent-test-site.local';
- const TEST_NONCE1 = '7fa8282ad93047a4d6fe6111c93b308a';
- const TEST_NONCE2 = '79d886010186eb60e3611cd4a5d0bcae';
+ public const TEST_URL1 = 'https://some-test-site.local';
+ public const TEST_URL2 = 'https://another-test-site.local';
+ public const TEST_URL3 = 'https://nonexistent-test-site.local';
+ public const TEST_NONCE1 = '7fa8282ad93047a4d6fe6111c93b308a';
+ public const TEST_NONCE2 = '79d886010186eb60e3611cd4a5d0bcae';
/**
* @var int
diff --git a/plugins/JsTrackerInstallCheck/tests/Unit/JsTrackerInstallCheckOptionTest.php b/plugins/JsTrackerInstallCheck/tests/Unit/JsTrackerInstallCheckOptionTest.php
index be8aa7ca3c2..6d1930792ac 100644
--- a/plugins/JsTrackerInstallCheck/tests/Unit/JsTrackerInstallCheckOptionTest.php
+++ b/plugins/JsTrackerInstallCheck/tests/Unit/JsTrackerInstallCheckOptionTest.php
@@ -16,11 +16,11 @@
class JsTrackerInstallCheckOptionTest extends TestCase
{
- const TEST_URL1 = 'https://some-test-site.local';
- const TEST_URL2 = 'https://another-test-site.local';
- const TEST_URL3 = 'https://nonexistent-test-site.local';
- const TEST_NONCE1 = '7fa8282ad93047a4d6fe6111c93b308a';
- const TEST_NONCE2 = '79d886010186eb60e3611cd4a5d0bcae';
+ public const TEST_URL1 = 'https://some-test-site.local';
+ public const TEST_URL2 = 'https://another-test-site.local';
+ public const TEST_URL3 = 'https://nonexistent-test-site.local';
+ public const TEST_NONCE1 = '7fa8282ad93047a4d6fe6111c93b308a';
+ public const TEST_NONCE2 = '79d886010186eb60e3611cd4a5d0bcae';
/**
* @var JsTrackerInstallCheckOption
diff --git a/plugins/LanguagesManager/Commands/FetchTranslations.php b/plugins/LanguagesManager/Commands/FetchTranslations.php
index 86e97a89e53..44146017f0c 100644
--- a/plugins/LanguagesManager/Commands/FetchTranslations.php
+++ b/plugins/LanguagesManager/Commands/FetchTranslations.php
@@ -18,7 +18,7 @@
*/
class FetchTranslations extends TranslationBase
{
- const DOWNLOAD_PATH = '/weblate';
+ public const DOWNLOAD_PATH = '/weblate';
protected function configure()
{
diff --git a/plugins/LanguagesManager/LanguagesManager.php b/plugins/LanguagesManager/LanguagesManager.php
index a21f26c7607..69f839520ef 100644
--- a/plugins/LanguagesManager/LanguagesManager.php
+++ b/plugins/LanguagesManager/LanguagesManager.php
@@ -28,7 +28,7 @@
*/
class LanguagesManager extends \Piwik\Plugin
{
- const LANGUAGE_SELECTION_NONCE = 'LanguagesManager.selection';
+ public const LANGUAGE_SELECTION_NONCE = 'LanguagesManager.selection';
/**
* @see \Piwik\Plugin::registerEvents
diff --git a/plugins/LanguagesManager/TranslationWriter/Validate/CoreTranslations.php b/plugins/LanguagesManager/TranslationWriter/Validate/CoreTranslations.php
index 19094c01fb6..3f663d9037e 100644
--- a/plugins/LanguagesManager/TranslationWriter/Validate/CoreTranslations.php
+++ b/plugins/LanguagesManager/TranslationWriter/Validate/CoreTranslations.php
@@ -18,11 +18,11 @@ class CoreTranslations extends ValidateAbstract
/**
* Error States
*/
- const ERRORSTATE_LOCALEREQUIRED = 'Locale required';
- const ERRORSTATE_TRANSLATORINFOREQUIRED = 'Translator info required';
- const ERRORSTATE_LOCALEINVALID = 'Locale is invalid';
- const ERRORSTATE_LOCALEINVALIDLANGUAGE = 'Locale is invalid - invalid language code';
- const ERRORSTATE_LOCALEINVALIDCOUNTRY = 'Locale is invalid - invalid country code';
+ public const ERRORSTATE_LOCALEREQUIRED = 'Locale required';
+ public const ERRORSTATE_TRANSLATORINFOREQUIRED = 'Translator info required';
+ public const ERRORSTATE_LOCALEINVALID = 'Locale is invalid';
+ public const ERRORSTATE_LOCALEINVALIDLANGUAGE = 'Locale is invalid - invalid language code';
+ public const ERRORSTATE_LOCALEINVALIDCOUNTRY = 'Locale is invalid - invalid country code';
protected $baseTranslations = array();
diff --git a/plugins/LanguagesManager/TranslationWriter/Writer.php b/plugins/LanguagesManager/TranslationWriter/Writer.php
index 66ef856ff47..35421317675 100644
--- a/plugins/LanguagesManager/TranslationWriter/Writer.php
+++ b/plugins/LanguagesManager/TranslationWriter/Writer.php
@@ -77,8 +77,8 @@ class Writer
*/
protected $filteredData = array();
- const UNFILTERED = 'unfiltered';
- const FILTERED = 'filtered';
+ public const UNFILTERED = 'unfiltered';
+ public const FILTERED = 'filtered';
protected $currentState = self::UNFILTERED;
diff --git a/plugins/Live/Controller.php b/plugins/Live/Controller.php
index a50ba4682fd..8bf78dff50d 100644
--- a/plugins/Live/Controller.php
+++ b/plugins/Live/Controller.php
@@ -22,7 +22,7 @@
*/
class Controller extends \Piwik\Plugin\Controller
{
- const SIMPLE_VISIT_COUNT_WIDGET_LAST_MINUTES_CONFIG_KEY = 'live_widget_visitor_count_last_minutes';
+ public const SIMPLE_VISIT_COUNT_WIDGET_LAST_MINUTES_CONFIG_KEY = 'live_widget_visitor_count_last_minutes';
private $profileSummaryProvider;
diff --git a/plugins/Live/VisitorProfile.php b/plugins/Live/VisitorProfile.php
index a092ac152a9..8ce975e0579 100644
--- a/plugins/Live/VisitorProfile.php
+++ b/plugins/Live/VisitorProfile.php
@@ -15,7 +15,7 @@
class VisitorProfile
{
- const VISITOR_PROFILE_MAX_VISITS_TO_SHOW = 10;
+ public const VISITOR_PROFILE_MAX_VISITS_TO_SHOW = 10;
protected $profile = [];
diff --git a/plugins/Live/Visualizations/VisitorLog.php b/plugins/Live/Visualizations/VisitorLog.php
index 69754fcf7ba..a05b75aa500 100644
--- a/plugins/Live/Visualizations/VisitorLog.php
+++ b/plugins/Live/Visualizations/VisitorLog.php
@@ -27,10 +27,10 @@
*/
class VisitorLog extends Visualization
{
- const ID = 'VisitorLog';
- const TEMPLATE_FILE = "@Live/_dataTableViz_visitorLog.twig";
- const FOOTER_ICON_TITLE = '';
- const FOOTER_ICON = '';
+ public const ID = 'VisitorLog';
+ public const TEMPLATE_FILE = "@Live/_dataTableViz_visitorLog.twig";
+ public const FOOTER_ICON_TITLE = '';
+ public const FOOTER_ICON = '';
public static function getDefaultConfig()
{
diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php
index 542c4658f93..f1aaf5409ca 100644
--- a/plugins/Login/Controller.php
+++ b/plugins/Login/Controller.php
@@ -42,7 +42,7 @@
*/
class Controller extends \Piwik\Plugin\ControllerAdmin
{
- const NONCE_CONFIRMRESETPASSWORD = 'loginConfirmResetPassword';
+ public const NONCE_CONFIRMRESETPASSWORD = 'loginConfirmResetPassword';
/**
* @var PasswordResetter
diff --git a/plugins/Login/Model.php b/plugins/Login/Model.php
index 83da03eb5c2..29693918077 100644
--- a/plugins/Login/Model.php
+++ b/plugins/Login/Model.php
@@ -17,7 +17,7 @@
class Model
{
- const NOTIFIED_USER_ABOUT_LOGIN_ATTEMPTS_OPTION_PREFIX = 'BruteForceDetection.suspiciousLoginCountNotified.';
+ public const NOTIFIED_USER_ABOUT_LOGIN_ATTEMPTS_OPTION_PREFIX = 'BruteForceDetection.suspiciousLoginCountNotified.';
/**
* @var
diff --git a/plugins/Login/PasswordVerifier.php b/plugins/Login/PasswordVerifier.php
index 33e267b1ef9..845a97c6140 100644
--- a/plugins/Login/PasswordVerifier.php
+++ b/plugins/Login/PasswordVerifier.php
@@ -15,8 +15,8 @@
class PasswordVerifier
{
- const VERIFY_VALID_FOR_MINUTES = 30;
- const VERIFY_REVALIDATE_X_MINUTES_LEFT = 15;
+ public const VERIFY_VALID_FOR_MINUTES = 30;
+ public const VERIFY_REVALIDATE_X_MINUTES_LEFT = 15;
/**
* @var Date|null
diff --git a/plugins/Login/Security/BruteForceDetection.php b/plugins/Login/Security/BruteForceDetection.php
index 8057f9452c5..984c31de91e 100644
--- a/plugins/Login/Security/BruteForceDetection.php
+++ b/plugins/Login/Security/BruteForceDetection.php
@@ -20,8 +20,8 @@
class BruteForceDetection
{
- const OVERALL_LOGIN_LOCKOUT_THRESHOLD_MIN = 10;
- const TABLE_NAME = 'brute_force_log';
+ public const OVERALL_LOGIN_LOCKOUT_THRESHOLD_MIN = 10;
+ public const TABLE_NAME = 'brute_force_log';
private $minutesTimeRange;
private $maxLogAttempts;
diff --git a/plugins/Login/tests/Integration/PasswordResetterTest.php b/plugins/Login/tests/Integration/PasswordResetterTest.php
index f5578c0d196..466e272a6a8 100644
--- a/plugins/Login/tests/Integration/PasswordResetterTest.php
+++ b/plugins/Login/tests/Integration/PasswordResetterTest.php
@@ -26,7 +26,7 @@
*/
class PasswordResetterTest extends IntegrationTestCase
{
- const NEWPASSWORD = 'newpassword';
+ public const NEWPASSWORD = 'newpassword';
/**
* @var string
diff --git a/plugins/Marketplace/Api/Client.php b/plugins/Marketplace/Api/Client.php
index 4737b8adc51..bc858558ace 100644
--- a/plugins/Marketplace/Api/Client.php
+++ b/plugins/Marketplace/Api/Client.php
@@ -26,8 +26,8 @@
*/
class Client
{
- const CACHE_TIMEOUT_IN_SECONDS = 3600;
- const HTTP_REQUEST_TIMEOUT = 60;
+ public const CACHE_TIMEOUT_IN_SECONDS = 3600;
+ public const HTTP_REQUEST_TIMEOUT = 60;
/**
* @var Service
diff --git a/plugins/Marketplace/Api/Service.php b/plugins/Marketplace/Api/Service.php
index 2b774b3ef24..755a28e93af 100644
--- a/plugins/Marketplace/Api/Service.php
+++ b/plugins/Marketplace/Api/Service.php
@@ -15,8 +15,8 @@
*/
class Service
{
- const CACHE_TIMEOUT_IN_SECONDS = 1200;
- const HTTP_REQUEST_TIMEOUT = 60;
+ public const CACHE_TIMEOUT_IN_SECONDS = 1200;
+ public const HTTP_REQUEST_TIMEOUT = 60;
/**
* @var string
diff --git a/plugins/Marketplace/Api/Service/Exception.php b/plugins/Marketplace/Api/Service/Exception.php
index 467fe5b4920..57f5168e846 100644
--- a/plugins/Marketplace/Api/Service/Exception.php
+++ b/plugins/Marketplace/Api/Service/Exception.php
@@ -13,6 +13,6 @@
*/
class Exception extends \Exception
{
- const HTTP_ERROR = 100;
- const API_ERROR = 101;
+ public const HTTP_ERROR = 100;
+ public const API_ERROR = 101;
}
diff --git a/plugins/Marketplace/Controller.php b/plugins/Marketplace/Controller.php
index 2a7a1e72643..763753cd1ce 100644
--- a/plugins/Marketplace/Controller.php
+++ b/plugins/Marketplace/Controller.php
@@ -34,9 +34,9 @@
class Controller extends \Piwik\Plugin\ControllerAdmin
{
- const UPDATE_NONCE = 'Marketplace.updatePlugin';
- const INSTALL_NONCE = 'Marketplace.installPlugin';
- const DOWNLOAD_NONCE_PREFIX = 'Marketplace.downloadPlugin.';
+ public const UPDATE_NONCE = 'Marketplace.updatePlugin';
+ public const INSTALL_NONCE = 'Marketplace.installPlugin';
+ public const DOWNLOAD_NONCE_PREFIX = 'Marketplace.downloadPlugin.';
/**
* @var LicenseKey
diff --git a/plugins/Marketplace/Input/PurchaseType.php b/plugins/Marketplace/Input/PurchaseType.php
index 71adf2a5cef..75a493ba6c6 100644
--- a/plugins/Marketplace/Input/PurchaseType.php
+++ b/plugins/Marketplace/Input/PurchaseType.php
@@ -14,9 +14,9 @@
*/
class PurchaseType
{
- const TYPE_FREE = 'free';
- const TYPE_PAID = 'paid';
- const TYPE_ALL = '';
+ public const TYPE_FREE = 'free';
+ public const TYPE_PAID = 'paid';
+ public const TYPE_ALL = '';
public function getPurchaseType(string $type): string
{
diff --git a/plugins/Marketplace/Input/Sort.php b/plugins/Marketplace/Input/Sort.php
index c0dd40e262a..2a8b1ed0671 100644
--- a/plugins/Marketplace/Input/Sort.php
+++ b/plugins/Marketplace/Input/Sort.php
@@ -13,11 +13,11 @@
*/
class Sort
{
- const METHOD_POPULAR = 'popular';
- const METHOD_ALPHA = 'alpha';
- const METHOD_LAST_UPDATED = 'lastupdated';
- const METHOD_NEWEST = 'newest';
- const DEFAULT_SORT = self::METHOD_LAST_UPDATED;
+ public const METHOD_POPULAR = 'popular';
+ public const METHOD_ALPHA = 'alpha';
+ public const METHOD_LAST_UPDATED = 'lastupdated';
+ public const METHOD_NEWEST = 'newest';
+ public const DEFAULT_SORT = self::METHOD_LAST_UPDATED;
public function getSort(string $sort): string
{
diff --git a/plugins/MobileAppMeasurable/Type.php b/plugins/MobileAppMeasurable/Type.php
index e6024e33f92..9601eece0d2 100644
--- a/plugins/MobileAppMeasurable/Type.php
+++ b/plugins/MobileAppMeasurable/Type.php
@@ -12,7 +12,7 @@
class Type extends \Piwik\Measurable\Type
{
- const ID = 'mobileapp';
+ public const ID = 'mobileapp';
protected $name = 'MobileAppMeasurable_MobileApp';
protected $namePlural = 'MobileAppMeasurable_MobileApps';
protected $description = 'MobileAppMeasurable_MobileAppDescription';
diff --git a/plugins/MobileMessaging/API.php b/plugins/MobileMessaging/API.php
index baa9bf72597..c82d5614973 100644
--- a/plugins/MobileMessaging/API.php
+++ b/plugins/MobileMessaging/API.php
@@ -22,8 +22,8 @@
*/
class API extends \Piwik\Plugin\API
{
- const VERIFICATION_CODE_LENGTH = 5;
- const SMS_FROM = 'Matomo';
+ public const VERIFICATION_CODE_LENGTH = 5;
+ public const SMS_FROM = 'Matomo';
/** @var Model $model */
protected $model;
diff --git a/plugins/MobileMessaging/MobileMessaging.php b/plugins/MobileMessaging/MobileMessaging.php
index ab79d947578..1460d2fa312 100644
--- a/plugins/MobileMessaging/MobileMessaging.php
+++ b/plugins/MobileMessaging/MobileMessaging.php
@@ -22,19 +22,19 @@
*/
class MobileMessaging extends \Piwik\Plugin
{
- const DELEGATED_MANAGEMENT_OPTION = 'MobileMessaging_DelegatedManagement';
- const PROVIDER_OPTION = 'Provider';
- const API_KEY_OPTION = 'APIKey';
- const PHONE_NUMBERS_OPTION = 'PhoneNumbers';
- const PHONE_NUMBER_VALIDATION_REQUEST_COUNT_OPTION = 'PhoneNumberValidationRequestCount';
- const SMS_SENT_COUNT_OPTION = 'SMSSentCount';
- const DELEGATED_MANAGEMENT_OPTION_DEFAULT = 'false';
- const USER_SETTINGS_POSTFIX_OPTION = '_MobileMessagingSettings';
-
- const PHONE_NUMBERS_PARAMETER = 'phoneNumbers';
-
- const MOBILE_TYPE = 'mobile';
- const SMS_FORMAT = 'sms';
+ public const DELEGATED_MANAGEMENT_OPTION = 'MobileMessaging_DelegatedManagement';
+ public const PROVIDER_OPTION = 'Provider';
+ public const API_KEY_OPTION = 'APIKey';
+ public const PHONE_NUMBERS_OPTION = 'PhoneNumbers';
+ public const PHONE_NUMBER_VALIDATION_REQUEST_COUNT_OPTION = 'PhoneNumberValidationRequestCount';
+ public const SMS_SENT_COUNT_OPTION = 'SMSSentCount';
+ public const DELEGATED_MANAGEMENT_OPTION_DEFAULT = 'false';
+ public const USER_SETTINGS_POSTFIX_OPTION = '_MobileMessagingSettings';
+
+ public const PHONE_NUMBERS_PARAMETER = 'phoneNumbers';
+
+ public const MOBILE_TYPE = 'mobile';
+ public const SMS_FORMAT = 'sms';
private static $availableParameters = array(
self::PHONE_NUMBERS_PARAMETER => true,
diff --git a/plugins/MobileMessaging/ReportRenderer/Sms.php b/plugins/MobileMessaging/ReportRenderer/Sms.php
index a6e7e32e4aa..4699d00bc4e 100644
--- a/plugins/MobileMessaging/ReportRenderer/Sms.php
+++ b/plugins/MobileMessaging/ReportRenderer/Sms.php
@@ -19,9 +19,9 @@
*/
class Sms extends ReportRenderer
{
- const FLOAT_REGEXP = '/[-+]?[0-9]*[\.,]?[0-9]+/';
- const SMS_CONTENT_TYPE = 'text/plain';
- const SMS_FILE_EXTENSION = 'sms';
+ public const FLOAT_REGEXP = '/[-+]?[0-9]*[\.,]?[0-9]+/';
+ public const SMS_CONTENT_TYPE = 'text/plain';
+ public const SMS_FILE_EXTENSION = 'sms';
private $rendering = "";
diff --git a/plugins/MobileMessaging/SMSProvider.php b/plugins/MobileMessaging/SMSProvider.php
index 7a1ab89c137..d16bd9f9d4d 100644
--- a/plugins/MobileMessaging/SMSProvider.php
+++ b/plugins/MobileMessaging/SMSProvider.php
@@ -21,10 +21,10 @@
*/
abstract class SMSProvider
{
- const MAX_GSM_CHARS_IN_ONE_UNIQUE_SMS = 160;
- const MAX_GSM_CHARS_IN_ONE_CONCATENATED_SMS = 153;
- const MAX_UCS2_CHARS_IN_ONE_UNIQUE_SMS = 70;
- const MAX_UCS2_CHARS_IN_ONE_CONCATENATED_SMS = 67;
+ public const MAX_GSM_CHARS_IN_ONE_UNIQUE_SMS = 160;
+ public const MAX_GSM_CHARS_IN_ONE_CONCATENATED_SMS = 153;
+ public const MAX_UCS2_CHARS_IN_ONE_UNIQUE_SMS = 70;
+ public const MAX_UCS2_CHARS_IN_ONE_CONCATENATED_SMS = 67;
/**
* Get the ID of the SMS Provider. Eg 'Clockwork' or 'FreeMobile'
diff --git a/plugins/MobileMessaging/SMSProvider/ASPSMS.php b/plugins/MobileMessaging/SMSProvider/ASPSMS.php
index f13d67516ac..b51b60df660 100644
--- a/plugins/MobileMessaging/SMSProvider/ASPSMS.php
+++ b/plugins/MobileMessaging/SMSProvider/ASPSMS.php
@@ -22,14 +22,14 @@
*/
class ASPSMS extends SMSProvider
{
- const SOCKET_TIMEOUT = 15;
+ public const SOCKET_TIMEOUT = 15;
- const BASE_API_URL = 'https://json.aspsms.com/';
- const CHECK_CREDIT_RESOURCE = 'CheckCredits';
- const SEND_SMS_RESOURCE = 'SendTextSMS';
+ public const BASE_API_URL = 'https://json.aspsms.com/';
+ public const CHECK_CREDIT_RESOURCE = 'CheckCredits';
+ public const SEND_SMS_RESOURCE = 'SendTextSMS';
- const MAXIMUM_FROM_LENGTH = 11;
- const MAXIMUM_CONCATENATED_SMS = 9;
+ public const MAXIMUM_FROM_LENGTH = 11;
+ public const MAXIMUM_CONCATENATED_SMS = 9;
public function getId()
{
diff --git a/plugins/MobileMessaging/SMSProvider/Clockwork.php b/plugins/MobileMessaging/SMSProvider/Clockwork.php
index 7ff6d072ed9..7e505336097 100644
--- a/plugins/MobileMessaging/SMSProvider/Clockwork.php
+++ b/plugins/MobileMessaging/SMSProvider/Clockwork.php
@@ -21,16 +21,16 @@
*/
class Clockwork extends SMSProvider
{
- const SOCKET_TIMEOUT = 15;
+ public const SOCKET_TIMEOUT = 15;
- const BASE_API_URL = 'https://api.mediaburst.co.uk/http';
- const CHECK_CREDIT_RESOURCE = '/credit.aspx';
- const SEND_SMS_RESOURCE = '/send.aspx';
+ public const BASE_API_URL = 'https://api.mediaburst.co.uk/http';
+ public const CHECK_CREDIT_RESOURCE = '/credit.aspx';
+ public const SEND_SMS_RESOURCE = '/send.aspx';
- const ERROR_STRING = 'Error';
+ public const ERROR_STRING = 'Error';
- const MAXIMUM_FROM_LENGTH = 11;
- const MAXIMUM_CONCATENATED_SMS = 3;
+ public const MAXIMUM_FROM_LENGTH = 11;
+ public const MAXIMUM_CONCATENATED_SMS = 3;
public function getId()
{
diff --git a/plugins/Monolog/Handler/WebNotificationHandler.php b/plugins/Monolog/Handler/WebNotificationHandler.php
index d99413aeeb7..4876145559d 100644
--- a/plugins/Monolog/Handler/WebNotificationHandler.php
+++ b/plugins/Monolog/Handler/WebNotificationHandler.php
@@ -20,7 +20,7 @@
*/
class WebNotificationHandler extends AbstractProcessingHandler
{
- const MAX_NOTIFICATION_MESSAGE_LENGTH = 512;
+ public const MAX_NOTIFICATION_MESSAGE_LENGTH = 512;
public function isHandling(array $record)
{
diff --git a/plugins/Monolog/tests/Integration/LogTest.php b/plugins/Monolog/tests/Integration/LogTest.php
index 1cbebf09e97..53d6efa12e7 100644
--- a/plugins/Monolog/tests/Integration/LogTest.php
+++ b/plugins/Monolog/tests/Integration/LogTest.php
@@ -23,9 +23,9 @@
*/
class LogTest extends IntegrationTestCase
{
- const TESTMESSAGE = 'test%smessage';
- const STRING_MESSAGE_FORMAT = '[%tag%] %message%';
- const STRING_MESSAGE_FORMAT_SPRINTF = "[%s] [%s] %s";
+ public const TESTMESSAGE = 'test%smessage';
+ public const STRING_MESSAGE_FORMAT = '[%tag%] %message%';
+ public const STRING_MESSAGE_FORMAT_SPRINTF = "[%s] [%s] %s";
public static $expectedExceptionOutput = '[Monolog] [] LogTest.php(%d): dummy error message
dummy backtrace [Query: , CLI mode: 1]';
diff --git a/plugins/MultiSites/API.php b/plugins/MultiSites/API.php
index e40dc27d9d9..cf81b2be751 100644
--- a/plugins/MultiSites/API.php
+++ b/plugins/MultiSites/API.php
@@ -30,20 +30,20 @@
*/
class API extends \Piwik\Plugin\API
{
- const METRIC_TRANSLATION_KEY = 'translation';
- const METRIC_EVOLUTION_COL_NAME_KEY = 'evolution_column_name';
- const METRIC_RECORD_NAME_KEY = 'record_name';
- const METRIC_COL_NAME_KEY = 'metric_column_name';
- const METRIC_IS_ECOMMERCE_KEY = 'is_ecommerce';
-
- const NB_VISITS_METRIC = 'nb_visits';
- const NB_ACTIONS_METRIC = 'nb_actions';
- const NB_PAGEVIEWS_LABEL = 'nb_pageviews';
- const NB_PAGEVIEWS_METRIC = 'Actions_nb_pageviews';
- const GOAL_REVENUE_METRIC = 'revenue';
- const GOAL_CONVERSION_METRIC = 'nb_conversions';
- const ECOMMERCE_ORDERS_METRIC = 'orders';
- const ECOMMERCE_REVENUE_METRIC = 'ecommerce_revenue';
+ public const METRIC_TRANSLATION_KEY = 'translation';
+ public const METRIC_EVOLUTION_COL_NAME_KEY = 'evolution_column_name';
+ public const METRIC_RECORD_NAME_KEY = 'record_name';
+ public const METRIC_COL_NAME_KEY = 'metric_column_name';
+ public const METRIC_IS_ECOMMERCE_KEY = 'is_ecommerce';
+
+ public const NB_VISITS_METRIC = 'nb_visits';
+ public const NB_ACTIONS_METRIC = 'nb_actions';
+ public const NB_PAGEVIEWS_LABEL = 'nb_pageviews';
+ public const NB_PAGEVIEWS_METRIC = 'Actions_nb_pageviews';
+ public const GOAL_REVENUE_METRIC = 'revenue';
+ public const GOAL_CONVERSION_METRIC = 'nb_conversions';
+ public const ECOMMERCE_ORDERS_METRIC = 'orders';
+ public const ECOMMERCE_REVENUE_METRIC = 'ecommerce_revenue';
private static $baseMetrics = array(
self::NB_VISITS_METRIC => array(
diff --git a/plugins/PagePerformance/Archiver.php b/plugins/PagePerformance/Archiver.php
index f2687a758ad..77e281cac21 100644
--- a/plugins/PagePerformance/Archiver.php
+++ b/plugins/PagePerformance/Archiver.php
@@ -14,18 +14,18 @@
*/
class Archiver extends \Piwik\Plugin\Archiver
{
- const PAGEPERFORMANCE_TOTAL_NETWORK_TIME = 'PagePerformance_network_time';
- const PAGEPERFORMANCE_TOTAL_NETWORK_HITS = 'PagePerformance_network_hits';
- const PAGEPERFORMANCE_TOTAL_SERVER_TIME = 'PagePerformance_servery_time';
- const PAGEPERFORMANCE_TOTAL_SERVER_HITS = 'PagePerformance_server_hits';
- const PAGEPERFORMANCE_TOTAL_TRANSFER_TIME = 'PagePerformance_transfer_time';
- const PAGEPERFORMANCE_TOTAL_TRANSFER_HITS = 'PagePerformance_transfer_hits';
- const PAGEPERFORMANCE_TOTAL_DOMPROCESSING_TIME = 'PagePerformance_domprocessing_time';
- const PAGEPERFORMANCE_TOTAL_DOMPROCESSING_HITS = 'PagePerformance_domprocessing_hits';
- const PAGEPERFORMANCE_TOTAL_DOMCOMPLETION_TIME = 'PagePerformance_domcompletion_time';
- const PAGEPERFORMANCE_TOTAL_DOMCOMPLETION_HITS = 'PagePerformance_domcompletion_hits';
- const PAGEPERFORMANCE_TOTAL_ONLOAD_TIME = 'PagePerformance_onload_time';
- const PAGEPERFORMANCE_TOTAL_ONLOAD_HITS = 'PagePerformance_onload_hits';
- const PAGEPERFORMANCE_TOTAL_PAGE_LOAD_TIME = 'PagePerformance_pageload_time';
- const PAGEPERFORMANCE_TOTAL_PAGE_LOAD_HITS = 'PagePerformance_pageload_hits';
+ public const PAGEPERFORMANCE_TOTAL_NETWORK_TIME = 'PagePerformance_network_time';
+ public const PAGEPERFORMANCE_TOTAL_NETWORK_HITS = 'PagePerformance_network_hits';
+ public const PAGEPERFORMANCE_TOTAL_SERVER_TIME = 'PagePerformance_servery_time';
+ public const PAGEPERFORMANCE_TOTAL_SERVER_HITS = 'PagePerformance_server_hits';
+ public const PAGEPERFORMANCE_TOTAL_TRANSFER_TIME = 'PagePerformance_transfer_time';
+ public const PAGEPERFORMANCE_TOTAL_TRANSFER_HITS = 'PagePerformance_transfer_hits';
+ public const PAGEPERFORMANCE_TOTAL_DOMPROCESSING_TIME = 'PagePerformance_domprocessing_time';
+ public const PAGEPERFORMANCE_TOTAL_DOMPROCESSING_HITS = 'PagePerformance_domprocessing_hits';
+ public const PAGEPERFORMANCE_TOTAL_DOMCOMPLETION_TIME = 'PagePerformance_domcompletion_time';
+ public const PAGEPERFORMANCE_TOTAL_DOMCOMPLETION_HITS = 'PagePerformance_domcompletion_hits';
+ public const PAGEPERFORMANCE_TOTAL_ONLOAD_TIME = 'PagePerformance_onload_time';
+ public const PAGEPERFORMANCE_TOTAL_ONLOAD_HITS = 'PagePerformance_onload_hits';
+ public const PAGEPERFORMANCE_TOTAL_PAGE_LOAD_TIME = 'PagePerformance_pageload_time';
+ public const PAGEPERFORMANCE_TOTAL_PAGE_LOAD_HITS = 'PagePerformance_pageload_hits';
}
diff --git a/plugins/PagePerformance/Columns/Metrics/AveragePerformanceMetric.php b/plugins/PagePerformance/Columns/Metrics/AveragePerformanceMetric.php
index 1b0c60773c2..91114b03d25 100644
--- a/plugins/PagePerformance/Columns/Metrics/AveragePerformanceMetric.php
+++ b/plugins/PagePerformance/Columns/Metrics/AveragePerformanceMetric.php
@@ -24,7 +24,7 @@
*/
abstract class AveragePerformanceMetric extends ProcessedMetric
{
- const ID = '';
+ public const ID = '';
public function getName()
{
diff --git a/plugins/PagePerformance/Columns/Metrics/AverageTimeDomCompletion.php b/plugins/PagePerformance/Columns/Metrics/AverageTimeDomCompletion.php
index 5f1ab77613a..598d72204ac 100644
--- a/plugins/PagePerformance/Columns/Metrics/AverageTimeDomCompletion.php
+++ b/plugins/PagePerformance/Columns/Metrics/AverageTimeDomCompletion.php
@@ -20,7 +20,7 @@
*/
class AverageTimeDomCompletion extends AveragePerformanceMetric
{
- const ID = 'time_dom_completion';
+ public const ID = 'time_dom_completion';
public function getTranslatedName()
{
diff --git a/plugins/PagePerformance/Columns/Metrics/AverageTimeDomProcessing.php b/plugins/PagePerformance/Columns/Metrics/AverageTimeDomProcessing.php
index 48881b15a99..4bc327a8e34 100644
--- a/plugins/PagePerformance/Columns/Metrics/AverageTimeDomProcessing.php
+++ b/plugins/PagePerformance/Columns/Metrics/AverageTimeDomProcessing.php
@@ -19,7 +19,7 @@
*/
class AverageTimeDomProcessing extends AveragePerformanceMetric
{
- const ID = 'time_dom_processing';
+ public const ID = 'time_dom_processing';
public function getTranslatedName()
{
diff --git a/plugins/PagePerformance/Columns/Metrics/AverageTimeNetwork.php b/plugins/PagePerformance/Columns/Metrics/AverageTimeNetwork.php
index 7f7787c27f3..4b60a0513bc 100644
--- a/plugins/PagePerformance/Columns/Metrics/AverageTimeNetwork.php
+++ b/plugins/PagePerformance/Columns/Metrics/AverageTimeNetwork.php
@@ -19,7 +19,7 @@
*/
class AverageTimeNetwork extends AveragePerformanceMetric
{
- const ID = 'time_network';
+ public const ID = 'time_network';
public function getTranslatedName()
{
diff --git a/plugins/PagePerformance/Columns/Metrics/AverageTimeOnLoad.php b/plugins/PagePerformance/Columns/Metrics/AverageTimeOnLoad.php
index e3aa271e678..a384efc1f96 100644
--- a/plugins/PagePerformance/Columns/Metrics/AverageTimeOnLoad.php
+++ b/plugins/PagePerformance/Columns/Metrics/AverageTimeOnLoad.php
@@ -19,7 +19,7 @@
*/
class AverageTimeOnLoad extends AveragePerformanceMetric
{
- const ID = 'time_on_load';
+ public const ID = 'time_on_load';
public function getTranslatedName()
{
diff --git a/plugins/PagePerformance/Columns/Metrics/AverageTimeServer.php b/plugins/PagePerformance/Columns/Metrics/AverageTimeServer.php
index b1fa12b37fb..dad3731518e 100644
--- a/plugins/PagePerformance/Columns/Metrics/AverageTimeServer.php
+++ b/plugins/PagePerformance/Columns/Metrics/AverageTimeServer.php
@@ -19,7 +19,7 @@
*/
class AverageTimeServer extends AveragePerformanceMetric
{
- const ID = 'time_server';
+ public const ID = 'time_server';
public function getTranslatedName()
{
diff --git a/plugins/PagePerformance/Columns/Metrics/AverageTimeTransfer.php b/plugins/PagePerformance/Columns/Metrics/AverageTimeTransfer.php
index d8dc062adbd..b66eb077cad 100644
--- a/plugins/PagePerformance/Columns/Metrics/AverageTimeTransfer.php
+++ b/plugins/PagePerformance/Columns/Metrics/AverageTimeTransfer.php
@@ -19,7 +19,7 @@
*/
class AverageTimeTransfer extends AveragePerformanceMetric
{
- const ID = 'time_transfer';
+ public const ID = 'time_transfer';
public function getTranslatedName()
{
diff --git a/plugins/PagePerformance/Columns/TimeDomCompletion.php b/plugins/PagePerformance/Columns/TimeDomCompletion.php
index c4715c5dbc2..d59abee7e38 100644
--- a/plugins/PagePerformance/Columns/TimeDomCompletion.php
+++ b/plugins/PagePerformance/Columns/TimeDomCompletion.php
@@ -16,8 +16,8 @@
class TimeDomCompletion extends Base
{
- const COLUMN_TYPE = 'MEDIUMINT(10) UNSIGNED NULL';
- const COLUMN_NAME = 'time_dom_completion';
+ public const COLUMN_TYPE = 'MEDIUMINT(10) UNSIGNED NULL';
+ public const COLUMN_NAME = 'time_dom_completion';
protected $columnName = self::COLUMN_NAME;
protected $columnType = self::COLUMN_TYPE;
diff --git a/plugins/PagePerformance/Columns/TimeDomProcessing.php b/plugins/PagePerformance/Columns/TimeDomProcessing.php
index 380167d3c9f..e35d55d5465 100644
--- a/plugins/PagePerformance/Columns/TimeDomProcessing.php
+++ b/plugins/PagePerformance/Columns/TimeDomProcessing.php
@@ -16,8 +16,8 @@
class TimeDomProcessing extends Base
{
- const COLUMN_TYPE = 'MEDIUMINT(10) UNSIGNED NULL';
- const COLUMN_NAME = 'time_dom_processing';
+ public const COLUMN_TYPE = 'MEDIUMINT(10) UNSIGNED NULL';
+ public const COLUMN_NAME = 'time_dom_processing';
protected $columnName = self::COLUMN_NAME;
protected $columnType = self::COLUMN_TYPE;
diff --git a/plugins/PagePerformance/Columns/TimeNetwork.php b/plugins/PagePerformance/Columns/TimeNetwork.php
index f3b5b810852..eff0574f836 100644
--- a/plugins/PagePerformance/Columns/TimeNetwork.php
+++ b/plugins/PagePerformance/Columns/TimeNetwork.php
@@ -16,8 +16,8 @@
class TimeNetwork extends Base
{
- const COLUMN_TYPE = 'MEDIUMINT(10) UNSIGNED NULL';
- const COLUMN_NAME = 'time_network';
+ public const COLUMN_TYPE = 'MEDIUMINT(10) UNSIGNED NULL';
+ public const COLUMN_NAME = 'time_network';
protected $columnName = self::COLUMN_NAME;
protected $columnType = self::COLUMN_TYPE;
diff --git a/plugins/PagePerformance/Columns/TimeOnLoad.php b/plugins/PagePerformance/Columns/TimeOnLoad.php
index 178affda86e..41cf489d2f5 100644
--- a/plugins/PagePerformance/Columns/TimeOnLoad.php
+++ b/plugins/PagePerformance/Columns/TimeOnLoad.php
@@ -16,8 +16,8 @@
class TimeOnLoad extends Base
{
- const COLUMN_TYPE = 'MEDIUMINT(10) UNSIGNED NULL';
- const COLUMN_NAME = 'time_on_load';
+ public const COLUMN_TYPE = 'MEDIUMINT(10) UNSIGNED NULL';
+ public const COLUMN_NAME = 'time_on_load';
protected $columnName = self::COLUMN_NAME;
protected $columnType = self::COLUMN_TYPE;
diff --git a/plugins/PagePerformance/Columns/TimeServer.php b/plugins/PagePerformance/Columns/TimeServer.php
index 3a21673fca6..3db572353c6 100644
--- a/plugins/PagePerformance/Columns/TimeServer.php
+++ b/plugins/PagePerformance/Columns/TimeServer.php
@@ -16,8 +16,8 @@
class TimeServer extends Base
{
- const COLUMN_TYPE = 'MEDIUMINT(10) UNSIGNED NULL';
- const COLUMN_NAME = 'time_server';
+ public const COLUMN_TYPE = 'MEDIUMINT(10) UNSIGNED NULL';
+ public const COLUMN_NAME = 'time_server';
protected $columnName = self::COLUMN_NAME;
protected $columnType = self::COLUMN_TYPE;
diff --git a/plugins/PagePerformance/Columns/TimeTransfer.php b/plugins/PagePerformance/Columns/TimeTransfer.php
index 1310ab2036c..4a20c732b5b 100644
--- a/plugins/PagePerformance/Columns/TimeTransfer.php
+++ b/plugins/PagePerformance/Columns/TimeTransfer.php
@@ -16,8 +16,8 @@
class TimeTransfer extends Base
{
- const COLUMN_TYPE = 'MEDIUMINT(10) UNSIGNED NULL';
- const COLUMN_NAME = 'time_transfer';
+ public const COLUMN_TYPE = 'MEDIUMINT(10) UNSIGNED NULL';
+ public const COLUMN_NAME = 'time_transfer';
protected $columnName = self::COLUMN_NAME;
protected $columnType = self::COLUMN_TYPE;
diff --git a/plugins/PagePerformance/Visualizations/JqplotGraph/StackedBarEvolution.php b/plugins/PagePerformance/Visualizations/JqplotGraph/StackedBarEvolution.php
index 4603a05dc4e..470f69aea0d 100644
--- a/plugins/PagePerformance/Visualizations/JqplotGraph/StackedBarEvolution.php
+++ b/plugins/PagePerformance/Visualizations/JqplotGraph/StackedBarEvolution.php
@@ -22,9 +22,9 @@
*/
class StackedBarEvolution extends Evolution
{
- const ID = 'graphStackedBarEvolution';
- const FOOTER_ICON_TITLE = '';
- const FOOTER_ICON = '';
+ public const ID = 'graphStackedBarEvolution';
+ public const FOOTER_ICON_TITLE = '';
+ public const FOOTER_ICON = '';
public function beforeRender()
{
diff --git a/plugins/PagePerformance/Visualizations/PerformanceColumns.php b/plugins/PagePerformance/Visualizations/PerformanceColumns.php
index 317d614bc03..f9ec34efe20 100644
--- a/plugins/PagePerformance/Visualizations/PerformanceColumns.php
+++ b/plugins/PagePerformance/Visualizations/PerformanceColumns.php
@@ -20,9 +20,9 @@
*/
class PerformanceColumns extends HtmlTable
{
- const ID = 'tablePerformanceColumns';
- const FOOTER_ICON = 'icon-page-performance';
- const FOOTER_ICON_TITLE = 'PagePerformance_PerformanceTable';
+ public const ID = 'tablePerformanceColumns';
+ public const FOOTER_ICON = 'icon-page-performance';
+ public const FOOTER_ICON_TITLE = 'PagePerformance_PerformanceTable';
public function beforeRender()
{
diff --git a/plugins/PrivacyManager/Controller.php b/plugins/PrivacyManager/Controller.php
index 1b886ed1c31..a603935faa9 100644
--- a/plugins/PrivacyManager/Controller.php
+++ b/plugins/PrivacyManager/Controller.php
@@ -33,9 +33,9 @@
*/
class Controller extends \Piwik\Plugin\ControllerAdmin
{
- const OPTION_LAST_DELETE_PIWIK_LOGS = "lastDelete_piwik_logs";
- const ACTIVATE_DNT_NONCE = 'PrivacyManager.activateDnt';
- const DEACTIVATE_DNT_NONCE = 'PrivacyManager.deactivateDnt';
+ public const OPTION_LAST_DELETE_PIWIK_LOGS = "lastDelete_piwik_logs";
+ public const ACTIVATE_DNT_NONCE = 'PrivacyManager.activateDnt';
+ public const DEACTIVATE_DNT_NONCE = 'PrivacyManager.deactivateDnt';
/**
* @var ReferrerAnonymizer
diff --git a/plugins/PrivacyManager/Dao/LogDataAnonymizer.php b/plugins/PrivacyManager/Dao/LogDataAnonymizer.php
index 38a58e70dcc..d5a627bfdb5 100644
--- a/plugins/PrivacyManager/Dao/LogDataAnonymizer.php
+++ b/plugins/PrivacyManager/Dao/LogDataAnonymizer.php
@@ -22,7 +22,7 @@
class LogDataAnonymizer
{
- const NUM_ROWS_UPDATE_AT_ONCE = 10000;
+ public const NUM_ROWS_UPDATE_AT_ONCE = 10000;
protected $COLUMNS_BLACKLISTED = array('idvisit', 'idvisitor', 'idsite', 'visit_last_action_time', 'config_id', 'location_ip', 'idlink_va', 'server_time', 'idgoal', 'buster', 'idorder');
/**
diff --git a/plugins/PrivacyManager/PrivacyManager.php b/plugins/PrivacyManager/PrivacyManager.php
index 00351aa96e2..a881f210de3 100644
--- a/plugins/PrivacyManager/PrivacyManager.php
+++ b/plugins/PrivacyManager/PrivacyManager.php
@@ -42,11 +42,11 @@
*/
class PrivacyManager extends Plugin
{
- const OPTION_LAST_DELETE_PIWIK_LOGS = "lastDelete_piwik_logs";
- const OPTION_LAST_DELETE_UNUSED_LOG_ACTIONS = "lastDelete_piwik_unused_log_actions";
- const OPTION_LAST_DELETE_PIWIK_REPORTS = 'lastDelete_piwik_reports';
- const OPTION_LAST_DELETE_PIWIK_LOGS_INITIAL = "lastDelete_piwik_logs_initial";
- const OPTION_USERID_SALT = 'useridsalt';
+ public const OPTION_LAST_DELETE_PIWIK_LOGS = "lastDelete_piwik_logs";
+ public const OPTION_LAST_DELETE_UNUSED_LOG_ACTIONS = "lastDelete_piwik_unused_log_actions";
+ public const OPTION_LAST_DELETE_PIWIK_REPORTS = 'lastDelete_piwik_reports';
+ public const OPTION_LAST_DELETE_PIWIK_LOGS_INITIAL = "lastDelete_piwik_logs_initial";
+ public const OPTION_USERID_SALT = 'useridsalt';
// options for data purging feature array[configName => configSection]
diff --git a/plugins/PrivacyManager/ReferrerAnonymizer.php b/plugins/PrivacyManager/ReferrerAnonymizer.php
index 88755be9276..d3ae72191f6 100644
--- a/plugins/PrivacyManager/ReferrerAnonymizer.php
+++ b/plugins/PrivacyManager/ReferrerAnonymizer.php
@@ -13,10 +13,10 @@
class ReferrerAnonymizer
{
- const EXCLUDE_QUERY = 'exclude_query';
- const EXCLUDE_PATH = 'exclude_path';
- const EXCLUDE_ALL = 'exclude_all';
- const EXCLUDE_NONE = '';
+ public const EXCLUDE_QUERY = 'exclude_query';
+ public const EXCLUDE_PATH = 'exclude_path';
+ public const EXCLUDE_ALL = 'exclude_all';
+ public const EXCLUDE_NONE = '';
public function getAvailableAnonymizationOptions()
{
diff --git a/plugins/PrivacyManager/ReportsPurger.php b/plugins/PrivacyManager/ReportsPurger.php
index 8d5b9bfa6b9..a77e5cdd0f5 100644
--- a/plugins/PrivacyManager/ReportsPurger.php
+++ b/plugins/PrivacyManager/ReportsPurger.php
@@ -21,7 +21,7 @@
class ReportsPurger
{
// constant used in database purging estimate to signify a table should be dropped
- const DROP_TABLE = -1;
+ public const DROP_TABLE = -1;
/**
* The max set of rows each table scan select should query at one time.
diff --git a/plugins/PrivacyManager/tests/Fixtures/MultipleSitesMultipleVisitsFixture.php b/plugins/PrivacyManager/tests/Fixtures/MultipleSitesMultipleVisitsFixture.php
index 39f4f8da986..91294f785c3 100644
--- a/plugins/PrivacyManager/tests/Fixtures/MultipleSitesMultipleVisitsFixture.php
+++ b/plugins/PrivacyManager/tests/Fixtures/MultipleSitesMultipleVisitsFixture.php
@@ -29,7 +29,7 @@
class TestLogFooBarBaz extends LogTable
{
- const TABLE = 'log_foo_bar_baz';
+ public const TABLE = 'log_foo_bar_baz';
public function install()
{
@@ -66,7 +66,7 @@ public function getWaysToJoinToOtherLogTables()
class TestLogFooBar extends LogTable
{
- const TABLE = 'log_foo_bar';
+ public const TABLE = 'log_foo_bar';
public function install()
{
@@ -103,7 +103,7 @@ public function getWaysToJoinToOtherLogTables()
class TestLogFoo extends LogTable
{
- const TABLE = 'log_foo';
+ public const TABLE = 'log_foo';
public function install()
{
diff --git a/plugins/PrivacyManager/tests/Integration/DataPurgingTest.php b/plugins/PrivacyManager/tests/Integration/DataPurgingTest.php
index f83351740b0..1535ff20af4 100644
--- a/plugins/PrivacyManager/tests/Integration/DataPurgingTest.php
+++ b/plugins/PrivacyManager/tests/Integration/DataPurgingTest.php
@@ -58,18 +58,18 @@ class DataPurgingTest extends IntegrationTestCase
// constants used in checking whether numeric tables are populated correctly.
// 'done' entries exist for every period, even if there's no metric data, so we need the
// total archive count for each month.
- const TOTAL_JAN_ARCHIVE_COUNT = 37; // 31 + 4 + 1 + 1;
- const TOTAL_FEB_ARCHIVE_COUNT = 34; // 29 + 4 + 1;
+ public const TOTAL_JAN_ARCHIVE_COUNT = 37; // 31 + 4 + 1 + 1;
+ public const TOTAL_FEB_ARCHIVE_COUNT = 34; // 29 + 4 + 1;
// the number of archive entries for a single metric if no purging is done. this #
// is dependent on the number of periods for which there were visits.
- const JAN_METRIC_ARCHIVE_COUNT = 11; // 5 days + 4 weeks + 1 month + 1 year
- const FEB_METRIC_ARCHIVE_COUNT = 11; // 6 days + 4 weeks + 1 month
+ public const JAN_METRIC_ARCHIVE_COUNT = 11; // 5 days + 4 weeks + 1 month + 1 year
+ public const FEB_METRIC_ARCHIVE_COUNT = 11; // 6 days + 4 weeks + 1 month
- const JAN_DONE_FLAGS_COUNT = 61;
+ public const JAN_DONE_FLAGS_COUNT = 61;
// fake metric/report name used to make sure unwanted metrics are purged
- const GARBAGE_FIELD = 'abcdefg';
+ public const GARBAGE_FIELD = 'abcdefg';
private static $idSite = 1;
private static $dateTime = '2012-02-28';
diff --git a/plugins/PrivacyManager/tests/Integration/PrivacyManagerTest.php b/plugins/PrivacyManager/tests/Integration/PrivacyManagerTest.php
index df4cef041b8..7c293b03509 100644
--- a/plugins/PrivacyManager/tests/Integration/PrivacyManagerTest.php
+++ b/plugins/PrivacyManager/tests/Integration/PrivacyManagerTest.php
@@ -20,7 +20,7 @@
*/
class PrivacyManagerTest extends IntegrationTestCase
{
- const DELETE_LOGS_OLDER_THAN = 270;
+ public const DELETE_LOGS_OLDER_THAN = 270;
/**
* @var PrivacyManager
diff --git a/plugins/Proxy/Controller.php b/plugins/Proxy/Controller.php
index 97263cb2bb6..3e23c7d2001 100644
--- a/plugins/Proxy/Controller.php
+++ b/plugins/Proxy/Controller.php
@@ -21,7 +21,7 @@
*/
class Controller extends \Piwik\Plugin\Controller
{
- const JS_MIME_TYPE = "application/javascript; charset=UTF-8";
+ public const JS_MIME_TYPE = "application/javascript; charset=UTF-8";
/**
* Output the merged CSS file.
diff --git a/plugins/Referrers/API.php b/plugins/Referrers/API.php
index 659d4389809..256a831249d 100644
--- a/plugins/Referrers/API.php
+++ b/plugins/Referrers/API.php
@@ -241,7 +241,7 @@ public function getKeywords($idSite, $period, $date, $segment = false, $expanded
return $dataTable;
}
- const LABEL_KEYWORD_NOT_DEFINED = "";
+ public const LABEL_KEYWORD_NOT_DEFINED = "";
/**
* @ignore
diff --git a/plugins/Referrers/Archiver.php b/plugins/Referrers/Archiver.php
index fb2ff9ca2e2..eb967e449b6 100644
--- a/plugins/Referrers/Archiver.php
+++ b/plugins/Referrers/Archiver.php
@@ -10,16 +10,16 @@
class Archiver extends \Piwik\Plugin\Archiver
{
- const SEARCH_ENGINES_RECORD_NAME = 'Referrers_keywordBySearchEngine';
- const SOCIAL_NETWORKS_RECORD_NAME = 'Referrers_urlBySocialNetwork';
- const KEYWORDS_RECORD_NAME = 'Referrers_searchEngineByKeyword';
- const CAMPAIGNS_RECORD_NAME = 'Referrers_keywordByCampaign';
- const WEBSITES_RECORD_NAME = 'Referrers_urlByWebsite';
- const REFERRER_TYPE_RECORD_NAME = 'Referrers_type';
- const METRIC_DISTINCT_SEARCH_ENGINE_RECORD_NAME = 'Referrers_distinctSearchEngines';
- const METRIC_DISTINCT_SOCIAL_NETWORK_RECORD_NAME = 'Referrers_distinctSocialNetworks';
- const METRIC_DISTINCT_KEYWORD_RECORD_NAME = 'Referrers_distinctKeywords';
- const METRIC_DISTINCT_CAMPAIGN_RECORD_NAME = 'Referrers_distinctCampaigns';
- const METRIC_DISTINCT_WEBSITE_RECORD_NAME = 'Referrers_distinctWebsites';
- const METRIC_DISTINCT_URLS_RECORD_NAME = 'Referrers_distinctWebsitesUrls';
+ public const SEARCH_ENGINES_RECORD_NAME = 'Referrers_keywordBySearchEngine';
+ public const SOCIAL_NETWORKS_RECORD_NAME = 'Referrers_urlBySocialNetwork';
+ public const KEYWORDS_RECORD_NAME = 'Referrers_searchEngineByKeyword';
+ public const CAMPAIGNS_RECORD_NAME = 'Referrers_keywordByCampaign';
+ public const WEBSITES_RECORD_NAME = 'Referrers_urlByWebsite';
+ public const REFERRER_TYPE_RECORD_NAME = 'Referrers_type';
+ public const METRIC_DISTINCT_SEARCH_ENGINE_RECORD_NAME = 'Referrers_distinctSearchEngines';
+ public const METRIC_DISTINCT_SOCIAL_NETWORK_RECORD_NAME = 'Referrers_distinctSocialNetworks';
+ public const METRIC_DISTINCT_KEYWORD_RECORD_NAME = 'Referrers_distinctKeywords';
+ public const METRIC_DISTINCT_CAMPAIGN_RECORD_NAME = 'Referrers_distinctCampaigns';
+ public const METRIC_DISTINCT_WEBSITE_RECORD_NAME = 'Referrers_distinctWebsites';
+ public const METRIC_DISTINCT_URLS_RECORD_NAME = 'Referrers_distinctWebsitesUrls';
}
diff --git a/plugins/Referrers/Columns/Base.php b/plugins/Referrers/Columns/Base.php
index 2924d8c774a..672ec098648 100644
--- a/plugins/Referrers/Columns/Base.php
+++ b/plugins/Referrers/Columns/Base.php
@@ -38,8 +38,8 @@ abstract class Base extends VisitDimension
protected $campaignKeywords;
// Used to prefix when a adsense referrer is detected
- const LABEL_PREFIX_ADWORDS_KEYWORD = '(adwords) ';
- const LABEL_ADWORDS_NAME = 'AdWords';
+ public const LABEL_PREFIX_ADWORDS_KEYWORD = '(adwords) ';
+ public const LABEL_ADWORDS_NAME = 'AdWords';
/**
diff --git a/plugins/Referrers/Columns/ReferrerUrl.php b/plugins/Referrers/Columns/ReferrerUrl.php
index 03041d20143..7ab6980f315 100644
--- a/plugins/Referrers/Columns/ReferrerUrl.php
+++ b/plugins/Referrers/Columns/ReferrerUrl.php
@@ -15,7 +15,7 @@
class ReferrerUrl extends Base
{
- const MAX_LEN = 1500;
+ public const MAX_LEN = 1500;
protected $columnName = 'referer_url';
protected $type = self::TYPE_TEXT;
protected $segmentName = 'referrerUrl';
diff --git a/plugins/Referrers/Reports/Get.php b/plugins/Referrers/Reports/Get.php
index 256873fd4ab..e0daa23f1c0 100644
--- a/plugins/Referrers/Reports/Get.php
+++ b/plugins/Referrers/Reports/Get.php
@@ -30,7 +30,7 @@
class Get extends Base
{
- const TOTAL_DIRECT_ENTRIES_METRIC_NAME = 'Referrers_directEntries';
+ public const TOTAL_DIRECT_ENTRIES_METRIC_NAME = 'Referrers_directEntries';
protected function init()
{
diff --git a/plugins/Referrers/SearchEngine.php b/plugins/Referrers/SearchEngine.php
index 6da82c1e994..eeac5995b8e 100644
--- a/plugins/Referrers/SearchEngine.php
+++ b/plugins/Referrers/SearchEngine.php
@@ -23,10 +23,10 @@
*/
class SearchEngine extends Singleton
{
- const OPTION_STORAGE_NAME = 'SearchEngineDefinitions';
+ public const OPTION_STORAGE_NAME = 'SearchEngineDefinitions';
/** @var string location of definition file (relative to PIWIK_INCLUDE_PATH) */
- const DEFINITION_FILE = '/vendor/matomo/searchengine-and-social-list/SearchEngines.yml';
+ public const DEFINITION_FILE = '/vendor/matomo/searchengine-and-social-list/SearchEngines.yml';
protected $definitionList = null;
diff --git a/plugins/Referrers/Social.php b/plugins/Referrers/Social.php
index 3a7a0e24ad8..7b4d357f038 100644
--- a/plugins/Referrers/Social.php
+++ b/plugins/Referrers/Social.php
@@ -20,10 +20,10 @@
*/
class Social extends Singleton
{
- const OPTION_STORAGE_NAME = 'SocialDefinitions';
+ public const OPTION_STORAGE_NAME = 'SocialDefinitions';
/** @var string location of definition file (relative to PIWIK_INCLUDE_PATH) */
- const DEFINITION_FILE = '/vendor/matomo/searchengine-and-social-list/Socials.yml';
+ public const DEFINITION_FILE = '/vendor/matomo/searchengine-and-social-list/Socials.yml';
protected $definitionList = null;
diff --git a/plugins/Resolution/Archiver.php b/plugins/Resolution/Archiver.php
index be8e5231fec..9407a84154a 100644
--- a/plugins/Resolution/Archiver.php
+++ b/plugins/Resolution/Archiver.php
@@ -16,8 +16,8 @@
*/
class Archiver extends \Piwik\Plugin\Archiver
{
- const RESOLUTION_RECORD_NAME = 'Resolution_resolution';
- const CONFIGURATION_RECORD_NAME = 'Resolution_configuration';
- const RESOLUTION_DIMENSION = "log_visit.config_resolution";
- const CONFIGURATION_DIMENSION = "CONCAT(log_visit.config_os, ';', log_visit.config_browser_name, ';', log_visit.config_resolution)";
+ public const RESOLUTION_RECORD_NAME = 'Resolution_resolution';
+ public const CONFIGURATION_RECORD_NAME = 'Resolution_configuration';
+ public const RESOLUTION_DIMENSION = "log_visit.config_resolution";
+ public const CONFIGURATION_DIMENSION = "CONCAT(log_visit.config_os, ';', log_visit.config_browser_name, ';', log_visit.config_resolution)";
}
diff --git a/plugins/SEO/Metric/Bing.php b/plugins/SEO/Metric/Bing.php
index b58cae23b0d..7c4f2cbaa21 100644
--- a/plugins/SEO/Metric/Bing.php
+++ b/plugins/SEO/Metric/Bing.php
@@ -18,7 +18,7 @@
*/
class Bing implements MetricsProvider
{
- const URL = 'https://www.bing.com/search?setlang=en-US&rdr=1&q=site%3A';
+ public const URL = 'https://www.bing.com/search?setlang=en-US&rdr=1&q=site%3A';
/**
* @var LoggerInterface
diff --git a/plugins/SEO/Metric/Google.php b/plugins/SEO/Metric/Google.php
index d3309342aa7..f1ef43c22d6 100644
--- a/plugins/SEO/Metric/Google.php
+++ b/plugins/SEO/Metric/Google.php
@@ -18,7 +18,7 @@
*/
class Google implements MetricsProvider
{
- const SEARCH_URL = 'https://www.google.com/search?hl=en&q=site%3A';
+ public const SEARCH_URL = 'https://www.google.com/search?hl=en&q=site%3A';
/**
* @var LoggerInterface
diff --git a/plugins/ScheduledReports/API.php b/plugins/ScheduledReports/API.php
index 5223e59041f..44f0d4810a4 100644
--- a/plugins/ScheduledReports/API.php
+++ b/plugins/ScheduledReports/API.php
@@ -50,21 +50,21 @@
*/
class API extends \Piwik\Plugin\API
{
- const VALIDATE_PARAMETERS_EVENT = 'ScheduledReports.validateReportParameters';
- const GET_REPORT_PARAMETERS_EVENT = 'ScheduledReports.getReportParameters';
- const GET_REPORT_METADATA_EVENT = 'ScheduledReports.getReportMetadata';
- const GET_REPORT_TYPES_EVENT = 'ScheduledReports.getReportTypes';
- const GET_REPORT_FORMATS_EVENT = 'ScheduledReports.getReportFormats';
- const GET_RENDERER_INSTANCE_EVENT = 'ScheduledReports.getRendererInstance';
- const PROCESS_REPORTS_EVENT = 'ScheduledReports.processReports';
- const GET_REPORT_RECIPIENTS_EVENT = 'ScheduledReports.getReportRecipients';
- const ALLOW_MULTIPLE_REPORTS_EVENT = 'ScheduledReports.allowMultipleReports';
- const SEND_REPORT_EVENT = 'ScheduledReports.sendReport';
-
- const OUTPUT_DOWNLOAD = 1;
- const OUTPUT_SAVE_ON_DISK = 2;
- const OUTPUT_INLINE = 3;
- const OUTPUT_RETURN = 4;
+ public const VALIDATE_PARAMETERS_EVENT = 'ScheduledReports.validateReportParameters';
+ public const GET_REPORT_PARAMETERS_EVENT = 'ScheduledReports.getReportParameters';
+ public const GET_REPORT_METADATA_EVENT = 'ScheduledReports.getReportMetadata';
+ public const GET_REPORT_TYPES_EVENT = 'ScheduledReports.getReportTypes';
+ public const GET_REPORT_FORMATS_EVENT = 'ScheduledReports.getReportFormats';
+ public const GET_RENDERER_INSTANCE_EVENT = 'ScheduledReports.getRendererInstance';
+ public const PROCESS_REPORTS_EVENT = 'ScheduledReports.processReports';
+ public const GET_REPORT_RECIPIENTS_EVENT = 'ScheduledReports.getReportRecipients';
+ public const ALLOW_MULTIPLE_REPORTS_EVENT = 'ScheduledReports.allowMultipleReports';
+ public const SEND_REPORT_EVENT = 'ScheduledReports.sendReport';
+
+ public const OUTPUT_DOWNLOAD = 1;
+ public const OUTPUT_SAVE_ON_DISK = 2;
+ public const OUTPUT_INLINE = 3;
+ public const OUTPUT_RETURN = 4;
private $enableSaveReportOnDisk = false;
diff --git a/plugins/ScheduledReports/Controller.php b/plugins/ScheduledReports/Controller.php
index 2bba99e8972..8d938873cc7 100644
--- a/plugins/ScheduledReports/Controller.php
+++ b/plugins/ScheduledReports/Controller.php
@@ -25,7 +25,7 @@
*/
class Controller extends \Piwik\Plugin\Controller
{
- const DEFAULT_REPORT_TYPE = ScheduledReports::EMAIL_TYPE;
+ public const DEFAULT_REPORT_TYPE = ScheduledReports::EMAIL_TYPE;
public function index()
{
diff --git a/plugins/ScheduledReports/Menu.php b/plugins/ScheduledReports/Menu.php
index d032d771ce9..2a454cad882 100644
--- a/plugins/ScheduledReports/Menu.php
+++ b/plugins/ScheduledReports/Menu.php
@@ -15,8 +15,8 @@
class Menu extends \Piwik\Plugin\Menu
{
- const MOBILE_MESSAGING_TOP_MENU_TRANSLATION_KEY = 'MobileMessaging_TopMenu';
- const PDF_REPORTS_TOP_MENU_TRANSLATION_KEY = 'ScheduledReports_EmailReports';
+ public const MOBILE_MESSAGING_TOP_MENU_TRANSLATION_KEY = 'MobileMessaging_TopMenu';
+ public const PDF_REPORTS_TOP_MENU_TRANSLATION_KEY = 'ScheduledReports_EmailReports';
public function configureAdminMenu(MenuAdmin $menu)
{
diff --git a/plugins/ScheduledReports/ScheduledReports.php b/plugins/ScheduledReports/ScheduledReports.php
index b3f186122ad..e79a3b43ce5 100644
--- a/plugins/ScheduledReports/ScheduledReports.php
+++ b/plugins/ScheduledReports/ScheduledReports.php
@@ -30,24 +30,24 @@
*/
class ScheduledReports extends \Piwik\Plugin
{
- const DISPLAY_FORMAT_GRAPHS_ONLY_FOR_KEY_METRICS = 1; // Display Tables Only (Graphs only for key metrics)
- const DISPLAY_FORMAT_GRAPHS_ONLY = 2; // Display Graphs Only for all reports
- const DISPLAY_FORMAT_TABLES_AND_GRAPHS = 3; // Display Tables and Graphs for all reports
- const DISPLAY_FORMAT_TABLES_ONLY = 4; // Display only tables for all reports
- const DEFAULT_DISPLAY_FORMAT = self::DISPLAY_FORMAT_GRAPHS_ONLY_FOR_KEY_METRICS;
+ public const DISPLAY_FORMAT_GRAPHS_ONLY_FOR_KEY_METRICS = 1; // Display Tables Only (Graphs only for key metrics)
+ public const DISPLAY_FORMAT_GRAPHS_ONLY = 2; // Display Graphs Only for all reports
+ public const DISPLAY_FORMAT_TABLES_AND_GRAPHS = 3; // Display Tables and Graphs for all reports
+ public const DISPLAY_FORMAT_TABLES_ONLY = 4; // Display only tables for all reports
+ public const DEFAULT_DISPLAY_FORMAT = self::DISPLAY_FORMAT_GRAPHS_ONLY_FOR_KEY_METRICS;
- const DEFAULT_REPORT_FORMAT = ReportRenderer::HTML_FORMAT;
- const DEFAULT_PERIOD = 'week';
- const DEFAULT_HOUR = '0';
+ public const DEFAULT_REPORT_FORMAT = ReportRenderer::HTML_FORMAT;
+ public const DEFAULT_PERIOD = 'week';
+ public const DEFAULT_HOUR = '0';
- const EMAIL_ME_PARAMETER = 'emailMe';
- const EVOLUTION_GRAPH_PARAMETER = 'evolutionGraph';
- const ADDITIONAL_EMAILS_PARAMETER = 'additionalEmails';
- const DISPLAY_FORMAT_PARAMETER = 'displayFormat';
- const EMAIL_ME_PARAMETER_DEFAULT_VALUE = true;
- const EVOLUTION_GRAPH_PARAMETER_DEFAULT_VALUE = false;
+ public const EMAIL_ME_PARAMETER = 'emailMe';
+ public const EVOLUTION_GRAPH_PARAMETER = 'evolutionGraph';
+ public const ADDITIONAL_EMAILS_PARAMETER = 'additionalEmails';
+ public const DISPLAY_FORMAT_PARAMETER = 'displayFormat';
+ public const EMAIL_ME_PARAMETER_DEFAULT_VALUE = true;
+ public const EVOLUTION_GRAPH_PARAMETER_DEFAULT_VALUE = false;
- const EMAIL_TYPE = 'email';
+ public const EMAIL_TYPE = 'email';
private static $availableParameters = array(
self::EMAIL_ME_PARAMETER => false,
@@ -67,7 +67,7 @@ class ScheduledReports extends \Piwik\Plugin
ReportRenderer::TSV_FORMAT => 'plugins/Morpheus/images/export.png',
);
- const OPTION_KEY_LAST_SENT_DATERANGE = 'report_last_sent_daterange_';
+ public const OPTION_KEY_LAST_SENT_DATERANGE = 'report_last_sent_daterange_';
/**
* @see \Piwik\Plugin::registerEvents
diff --git a/plugins/SegmentEditor/SegmentEditor.php b/plugins/SegmentEditor/SegmentEditor.php
index ce8b06df077..2235d2c2a92 100644
--- a/plugins/SegmentEditor/SegmentEditor.php
+++ b/plugins/SegmentEditor/SegmentEditor.php
@@ -36,7 +36,7 @@
*/
class SegmentEditor extends \Piwik\Plugin
{
- const NO_DATA_UNPROCESSED_SEGMENT_ID = 'nodata_segment_not_processed';
+ public const NO_DATA_UNPROCESSED_SEGMENT_ID = 'nodata_segment_not_processed';
/**
* @see \Piwik\Plugin::registerEvents
diff --git a/plugins/SegmentEditor/SegmentSelectorControl.php b/plugins/SegmentEditor/SegmentSelectorControl.php
index 5184f752be9..904a632ab6d 100644
--- a/plugins/SegmentEditor/SegmentSelectorControl.php
+++ b/plugins/SegmentEditor/SegmentSelectorControl.php
@@ -26,7 +26,7 @@
*/
class SegmentSelectorControl extends UIControl
{
- const TEMPLATE = "@SegmentEditor/_segmentSelector";
+ public const TEMPLATE = "@SegmentEditor/_segmentSelector";
/**
* Constructor.
diff --git a/plugins/SegmentEditor/tests/System/UnprocessedSegmentsTest.php b/plugins/SegmentEditor/tests/System/UnprocessedSegmentsTest.php
index a8c0ed89d33..c101f5d4bc3 100644
--- a/plugins/SegmentEditor/tests/System/UnprocessedSegmentsTest.php
+++ b/plugins/SegmentEditor/tests/System/UnprocessedSegmentsTest.php
@@ -31,7 +31,7 @@ class UnprocessedSegmentsTest extends IntegrationTestCase
*/
public static $fixture;
- const TEST_SEGMENT = 'browserCode==ff';
+ public const TEST_SEGMENT = 'browserCode==ff';
public function test_apiOutput_whenCustomSegmentUsed_WithBrowserArchivingDisabled()
{
diff --git a/plugins/SitesManager/API.php b/plugins/SitesManager/API.php
index e2c9911d255..f0b0baee897 100644
--- a/plugins/SitesManager/API.php
+++ b/plugins/SitesManager/API.php
@@ -59,16 +59,16 @@
*/
class API extends \Piwik\Plugin\API
{
- const DEFAULT_SEARCH_KEYWORD_PARAMETERS = 'q,query,s,search,searchword,k,keyword,keywords';
- const OPTION_EXCLUDED_IPS_GLOBAL = 'SitesManager_ExcludedIpsGlobal';
- const OPTION_DEFAULT_TIMEZONE = 'SitesManager_DefaultTimezone';
- const OPTION_DEFAULT_CURRENCY = 'SitesManager_DefaultCurrency';
- const OPTION_EXCLUDED_QUERY_PARAMETERS_GLOBAL = 'SitesManager_ExcludedQueryParameters';
- const OPTION_SEARCH_KEYWORD_QUERY_PARAMETERS_GLOBAL = 'SitesManager_SearchKeywordParameters';
- const OPTION_SEARCH_CATEGORY_QUERY_PARAMETERS_GLOBAL = 'SitesManager_SearchCategoryParameters';
- const OPTION_EXCLUDED_USER_AGENTS_GLOBAL = 'SitesManager_ExcludedUserAgentsGlobal';
- const OPTION_EXCLUDED_REFERRERS_GLOBAL = 'SitesManager_ExcludedReferrersGlobal';
- const OPTION_KEEP_URL_FRAGMENTS_GLOBAL = 'SitesManager_KeepURLFragmentsGlobal';
+ public const DEFAULT_SEARCH_KEYWORD_PARAMETERS = 'q,query,s,search,searchword,k,keyword,keywords';
+ public const OPTION_EXCLUDED_IPS_GLOBAL = 'SitesManager_ExcludedIpsGlobal';
+ public const OPTION_DEFAULT_TIMEZONE = 'SitesManager_DefaultTimezone';
+ public const OPTION_DEFAULT_CURRENCY = 'SitesManager_DefaultCurrency';
+ public const OPTION_EXCLUDED_QUERY_PARAMETERS_GLOBAL = 'SitesManager_ExcludedQueryParameters';
+ public const OPTION_SEARCH_KEYWORD_QUERY_PARAMETERS_GLOBAL = 'SitesManager_SearchKeywordParameters';
+ public const OPTION_SEARCH_CATEGORY_QUERY_PARAMETERS_GLOBAL = 'SitesManager_SearchCategoryParameters';
+ public const OPTION_EXCLUDED_USER_AGENTS_GLOBAL = 'SitesManager_ExcludedUserAgentsGlobal';
+ public const OPTION_EXCLUDED_REFERRERS_GLOBAL = 'SitesManager_ExcludedReferrersGlobal';
+ public const OPTION_KEEP_URL_FRAGMENTS_GLOBAL = 'SitesManager_KeepURLFragmentsGlobal';
/**
* @var SettingsProvider
diff --git a/plugins/SitesManager/SitesManager.php b/plugins/SitesManager/SitesManager.php
index 11105c57c10..1a6b33ee090 100644
--- a/plugins/SitesManager/SitesManager.php
+++ b/plugins/SitesManager/SitesManager.php
@@ -36,9 +36,9 @@
*/
class SitesManager extends \Piwik\Plugin
{
- const KEEP_URL_FRAGMENT_USE_DEFAULT = 0;
- const KEEP_URL_FRAGMENT_YES = 1;
- const KEEP_URL_FRAGMENT_NO = 2;
+ public const KEEP_URL_FRAGMENT_USE_DEFAULT = 0;
+ public const KEEP_URL_FRAGMENT_YES = 1;
+ public const KEEP_URL_FRAGMENT_NO = 2;
/**
* @see \Piwik\Plugin::registerEvents
diff --git a/plugins/TestRunner/Commands/GenerateGitHubTestActionFile.php b/plugins/TestRunner/Commands/GenerateGitHubTestActionFile.php
index c525c9b10a1..eb3a2c5c9b8 100644
--- a/plugins/TestRunner/Commands/GenerateGitHubTestActionFile.php
+++ b/plugins/TestRunner/Commands/GenerateGitHubTestActionFile.php
@@ -19,8 +19,8 @@
*/
class GenerateGitHubTestActionFile extends ConsoleCommand
{
- const COMMAND_NAME = 'generate:test-action';
- const LATEST_PHP_VERSION = '8.1';
+ public const COMMAND_NAME = 'generate:test-action';
+ public const LATEST_PHP_VERSION = '8.1';
protected $plugin = null;
protected $phpVersions = null;
diff --git a/plugins/TestRunner/Commands/SyncScreenshots.php b/plugins/TestRunner/Commands/SyncScreenshots.php
index 8a7aef3cdd4..646e200bf67 100644
--- a/plugins/TestRunner/Commands/SyncScreenshots.php
+++ b/plugins/TestRunner/Commands/SyncScreenshots.php
@@ -27,7 +27,7 @@ class SyncScreenshots extends ConsoleCommand
*/
private $logger;
- const BUILDURL = "https://builds-artifacts.matomo.org";
+ public const BUILDURL = "https://builds-artifacts.matomo.org";
public function __construct()
{
diff --git a/plugins/Tour/Engagement/Challenge.php b/plugins/Tour/Engagement/Challenge.php
index 8f7fde528da..7258e821ffd 100644
--- a/plugins/Tour/Engagement/Challenge.php
+++ b/plugins/Tour/Engagement/Challenge.php
@@ -21,8 +21,8 @@
*/
abstract class Challenge
{
- const APPENDIX_SKIPPED = '_skipped';
- const APPENDIX_COMPLETED = '_completed';
+ public const APPENDIX_SKIPPED = '_skipped';
+ public const APPENDIX_COMPLETED = '_completed';
private static $settings = [];
diff --git a/plugins/Tour/Widgets/GetEngagement.php b/plugins/Tour/Widgets/GetEngagement.php
index 85d6e1d95b0..dc69f93a186 100644
--- a/plugins/Tour/Widgets/GetEngagement.php
+++ b/plugins/Tour/Widgets/GetEngagement.php
@@ -18,7 +18,7 @@
class GetEngagement extends Widget
{
- const NUM_CHALLENGES_PER_PAGE = 5;
+ public const NUM_CHALLENGES_PER_PAGE = 5;
/**
* @var Challenges
diff --git a/plugins/TwoFactorAuth/Controller.php b/plugins/TwoFactorAuth/Controller.php
index da6e2b6c1f4..b986e367fb5 100644
--- a/plugins/TwoFactorAuth/Controller.php
+++ b/plugins/TwoFactorAuth/Controller.php
@@ -26,11 +26,11 @@
class Controller extends \Piwik\Plugin\Controller
{
- const AUTH_CODE_NONCE = 'TwoFactorAuth.saveAuthCode';
- const LOGIN_2FA_NONCE = 'TwoFactorAuth.loginAuthCode';
- const DISABLE_2FA_NONCE = 'TwoFactorAuth.disableAuthCode';
- const REGENERATE_CODES_2FA_NONCE = 'TwoFactorAuth.regenerateCodes';
- const VERIFY_PASSWORD_NONCE = 'TwoFactorAuth.verifyPassword';
+ public const AUTH_CODE_NONCE = 'TwoFactorAuth.saveAuthCode';
+ public const LOGIN_2FA_NONCE = 'TwoFactorAuth.loginAuthCode';
+ public const DISABLE_2FA_NONCE = 'TwoFactorAuth.disableAuthCode';
+ public const REGENERATE_CODES_2FA_NONCE = 'TwoFactorAuth.regenerateCodes';
+ public const VERIFY_PASSWORD_NONCE = 'TwoFactorAuth.verifyPassword';
/**
* @var SystemSettings
diff --git a/plugins/TwoFactorAuth/TwoFactorAuthentication.php b/plugins/TwoFactorAuth/TwoFactorAuthentication.php
index 2bba92bcf35..a1e3262dbb6 100644
--- a/plugins/TwoFactorAuth/TwoFactorAuthentication.php
+++ b/plugins/TwoFactorAuth/TwoFactorAuthentication.php
@@ -21,14 +21,14 @@
class TwoFactorAuthentication
{
- const OPTION_PREFIX_TWO_FA_CODE_USED = 'twofa_codes_used_';
+ public const OPTION_PREFIX_TWO_FA_CODE_USED = 'twofa_codes_used_';
/**
* Make sure the same fa code was not used in the last X minutes.
* Technically, even 2 minutes be fine since every token is only valid for 30 sec and we only allow the 2 most
* recent tokens.
*/
- const BLOCK_TWOFA_CODE_MINUTES = 10;
+ public const BLOCK_TWOFA_CODE_MINUTES = 10;
/**
* @var SystemSettings
diff --git a/plugins/TwoFactorAuth/tests/Fixtures/TwoFactorFixture.php b/plugins/TwoFactorAuth/tests/Fixtures/TwoFactorFixture.php
index 9d38705bdc2..812ce7ca451 100644
--- a/plugins/TwoFactorAuth/tests/Fixtures/TwoFactorFixture.php
+++ b/plugins/TwoFactorAuth/tests/Fixtures/TwoFactorFixture.php
@@ -29,7 +29,7 @@ class TwoFactorFixture extends Fixture
private $userPassword = '123abcDk3_l3';
private $superUserWith2Fa = 'superWith2FA';
- const USER_2FA_SECRET = '1111111111111111';
+ public const USER_2FA_SECRET = '1111111111111111';
/**
diff --git a/plugins/UserCountry/Archiver.php b/plugins/UserCountry/Archiver.php
index bd9f23711a2..fc200b63d91 100644
--- a/plugins/UserCountry/Archiver.php
+++ b/plugins/UserCountry/Archiver.php
@@ -11,20 +11,20 @@
class Archiver extends \Piwik\Plugin\Archiver
{
- const COUNTRY_RECORD_NAME = 'UserCountry_country';
- const REGION_RECORD_NAME = 'UserCountry_region';
- const CITY_RECORD_NAME = 'UserCountry_city';
- const DISTINCT_COUNTRIES_METRIC = 'UserCountry_distinctCountries';
+ public const COUNTRY_RECORD_NAME = 'UserCountry_country';
+ public const REGION_RECORD_NAME = 'UserCountry_region';
+ public const CITY_RECORD_NAME = 'UserCountry_city';
+ public const DISTINCT_COUNTRIES_METRIC = 'UserCountry_distinctCountries';
// separate region, city & country info in stored report labels
- const LOCATION_SEPARATOR = '|';
+ public const LOCATION_SEPARATOR = '|';
- const COUNTRY_FIELD = 'location_country';
+ public const COUNTRY_FIELD = 'location_country';
- const REGION_FIELD = 'location_region';
+ public const REGION_FIELD = 'location_region';
- const CITY_FIELD = 'location_city';
+ public const CITY_FIELD = 'location_city';
- const LATITUDE_FIELD = 'location_latitude';
- const LONGITUDE_FIELD = 'location_longitude';
+ public const LATITUDE_FIELD = 'location_latitude';
+ public const LONGITUDE_FIELD = 'location_longitude';
}
diff --git a/plugins/UserCountry/Commands/AttributeHistoricalDataWithLocations.php b/plugins/UserCountry/Commands/AttributeHistoricalDataWithLocations.php
index 048e3a16e3f..3128f0802ce 100644
--- a/plugins/UserCountry/Commands/AttributeHistoricalDataWithLocations.php
+++ b/plugins/UserCountry/Commands/AttributeHistoricalDataWithLocations.php
@@ -16,13 +16,13 @@
class AttributeHistoricalDataWithLocations extends ConsoleCommand
{
- const DATES_RANGE_ARGUMENT = 'dates-range';
- const PERCENT_STEP_ARGUMENT = 'percent-step';
- const PERCENT_STEP_ARGUMENT_DEFAULT = 5;
- const PROVIDER_ARGUMENT = 'provider';
- const SEGMENT_LIMIT_OPTION = 'segment-limit';
- const SEGMENT_LIMIT_OPTION_DEFAULT = 1000;
- const FORCE_OPTION = 'force';
+ public const DATES_RANGE_ARGUMENT = 'dates-range';
+ public const PERCENT_STEP_ARGUMENT = 'percent-step';
+ public const PERCENT_STEP_ARGUMENT_DEFAULT = 5;
+ public const PROVIDER_ARGUMENT = 'provider';
+ public const SEGMENT_LIMIT_OPTION = 'segment-limit';
+ public const SEGMENT_LIMIT_OPTION_DEFAULT = 1000;
+ public const FORCE_OPTION = 'force';
/**
* @var RawLogDao
diff --git a/plugins/UserCountry/LocationProvider.php b/plugins/UserCountry/LocationProvider.php
index d5d2d0885fe..d82be2529f7 100644
--- a/plugins/UserCountry/LocationProvider.php
+++ b/plugins/UserCountry/LocationProvider.php
@@ -34,27 +34,27 @@
*/
abstract class LocationProvider
{
- const NOT_INSTALLED = 0;
- const INSTALLED = 1;
- const BROKEN = 2;
-
- const CURRENT_PROVIDER_OPTION_NAME = 'usercountry.location_provider';
-
- const GEOGRAPHIC_COORD_PRECISION = 3;
-
- const CONTINENT_CODE_KEY = 'continent_code';
- const CONTINENT_NAME_KEY = 'continent_name';
- const COUNTRY_CODE_KEY = 'country_code';
- const COUNTRY_NAME_KEY = 'country_name';
- const REGION_CODE_KEY = 'region_code';
- const REGION_NAME_KEY = 'region_name';
- const CITY_NAME_KEY = 'city_name';
- const AREA_CODE_KEY = 'area_code';
- const LATITUDE_KEY = 'lat';
- const LONGITUDE_KEY = 'long';
- const POSTAL_CODE_KEY = 'postal_code';
- const ISP_KEY = 'isp';
- const ORG_KEY = 'org';
+ public const NOT_INSTALLED = 0;
+ public const INSTALLED = 1;
+ public const BROKEN = 2;
+
+ public const CURRENT_PROVIDER_OPTION_NAME = 'usercountry.location_provider';
+
+ public const GEOGRAPHIC_COORD_PRECISION = 3;
+
+ public const CONTINENT_CODE_KEY = 'continent_code';
+ public const CONTINENT_NAME_KEY = 'continent_name';
+ public const COUNTRY_CODE_KEY = 'country_code';
+ public const COUNTRY_NAME_KEY = 'country_name';
+ public const REGION_CODE_KEY = 'region_code';
+ public const REGION_NAME_KEY = 'region_name';
+ public const CITY_NAME_KEY = 'city_name';
+ public const AREA_CODE_KEY = 'area_code';
+ public const LATITUDE_KEY = 'lat';
+ public const LONGITUDE_KEY = 'long';
+ public const POSTAL_CODE_KEY = 'postal_code';
+ public const ISP_KEY = 'isp';
+ public const ORG_KEY = 'org';
/**
* An array of all provider instances. Access it through static methods.
diff --git a/plugins/UserCountry/LocationProvider/DefaultProvider.php b/plugins/UserCountry/LocationProvider/DefaultProvider.php
index 7bc48049751..c6e4887e56d 100644
--- a/plugins/UserCountry/LocationProvider/DefaultProvider.php
+++ b/plugins/UserCountry/LocationProvider/DefaultProvider.php
@@ -30,8 +30,8 @@
*/
class DefaultProvider extends LocationProvider
{
- const ID = 'default';
- const TITLE = 'General_Default';
+ public const ID = 'default';
+ public const TITLE = 'General_Default';
/**
* Guesses a visitor's location using a visitor's browser language.
diff --git a/plugins/UserCountry/LocationProvider/DisabledProvider.php b/plugins/UserCountry/LocationProvider/DisabledProvider.php
index 94eedfe828b..c652dda2ec8 100644
--- a/plugins/UserCountry/LocationProvider/DisabledProvider.php
+++ b/plugins/UserCountry/LocationProvider/DisabledProvider.php
@@ -18,8 +18,8 @@
*/
class DisabledProvider extends LocationProvider
{
- const ID = 'disabled';
- const TITLE = 'General_Disabled';
+ public const ID = 'disabled';
+ public const TITLE = 'General_Disabled';
/**
* Guesses a visitor's location using a visitor's browser language.
diff --git a/plugins/UserCountry/VisitorGeolocator.php b/plugins/UserCountry/VisitorGeolocator.php
index 7fd72e0d505..c2be7fc036a 100644
--- a/plugins/UserCountry/VisitorGeolocator.php
+++ b/plugins/UserCountry/VisitorGeolocator.php
@@ -38,7 +38,7 @@
*/
class VisitorGeolocator
{
- const LAT_LONG_COMPARE_EPSILON = 0.0001;
+ public const LAT_LONG_COMPARE_EPSILON = 0.0001;
/**
* @var string[]
diff --git a/plugins/UserCountry/tests/Integration/VisitorGeolocatorTest.php b/plugins/UserCountry/tests/Integration/VisitorGeolocatorTest.php
index ab24accd638..9ff402735fc 100644
--- a/plugins/UserCountry/tests/Integration/VisitorGeolocatorTest.php
+++ b/plugins/UserCountry/tests/Integration/VisitorGeolocatorTest.php
@@ -26,7 +26,7 @@
*/
class VisitorGeolocatorTest extends IntegrationTestCase
{
- const TEST_IP = '1.2.3.4';
+ public const TEST_IP = '1.2.3.4';
/**
* @var LogHelper
diff --git a/plugins/UserCountryMap/Controller.php b/plugins/UserCountryMap/Controller.php
index 95df8ab214b..52bbbdb2773 100644
--- a/plugins/UserCountryMap/Controller.php
+++ b/plugins/UserCountryMap/Controller.php
@@ -28,7 +28,7 @@
class Controller extends \Piwik\Plugin\Controller
{
// By default plot up to the last 3 days of visitors on the map, for low traffic sites
- const REAL_TIME_WINDOW = 'last3';
+ public const REAL_TIME_WINDOW = 'last3';
/**
* @var Translator
diff --git a/plugins/UserId/Archiver.php b/plugins/UserId/Archiver.php
index e9571c60c2b..266b8ac2f94 100644
--- a/plugins/UserId/Archiver.php
+++ b/plugins/UserId/Archiver.php
@@ -13,8 +13,8 @@
*/
class Archiver extends \Piwik\Plugin\Archiver
{
- const USERID_ARCHIVE_RECORD = "UserId_users";
+ public const USERID_ARCHIVE_RECORD = "UserId_users";
- const VISITOR_ID_FIELD = 'idvisitor';
- const USER_ID_FIELD = 'user_id';
+ public const VISITOR_ID_FIELD = 'idvisitor';
+ public const USER_ID_FIELD = 'user_id';
}
diff --git a/plugins/UserLanguage/Archiver.php b/plugins/UserLanguage/Archiver.php
index cdc28fe1530..71396f8126b 100644
--- a/plugins/UserLanguage/Archiver.php
+++ b/plugins/UserLanguage/Archiver.php
@@ -16,6 +16,6 @@
*/
class Archiver extends \Piwik\Plugin\Archiver
{
- const LANGUAGE_RECORD_NAME = 'UserLanguage_language';
- const LANGUAGE_DIMENSION = "log_visit.location_browser_lang";
+ public const LANGUAGE_RECORD_NAME = 'UserLanguage_language';
+ public const LANGUAGE_DIMENSION = "log_visit.location_browser_lang";
}
diff --git a/plugins/UsersManager/API.php b/plugins/UsersManager/API.php
index 522936ed44d..faf2c767eae 100644
--- a/plugins/UsersManager/API.php
+++ b/plugins/UsersManager/API.php
@@ -51,7 +51,7 @@
*/
class API extends \Piwik\Plugin\API
{
- const OPTION_NAME_PREFERENCE_SEPARATOR = '_';
+ public const OPTION_NAME_PREFERENCE_SEPARATOR = '_';
public static $UPDATE_USER_REQUIRE_PASSWORD_CONFIRMATION = true;
public static $SET_SUPERUSER_ACCESS_REQUIRE_PASSWORD_CONFIRMATION = true;
@@ -98,8 +98,8 @@ class API extends \Piwik\Plugin\API
private $userRepository;
- const PREFERENCE_DEFAULT_REPORT = 'defaultReport';
- const PREFERENCE_DEFAULT_REPORT_DATE = 'defaultReportDate';
+ public const PREFERENCE_DEFAULT_REPORT = 'defaultReport';
+ public const PREFERENCE_DEFAULT_REPORT_DATE = 'defaultReportDate';
private static $instance = null;
diff --git a/plugins/UsersManager/Controller.php b/plugins/UsersManager/Controller.php
index 97ff04337f9..b5c094283f4 100644
--- a/plugins/UsersManager/Controller.php
+++ b/plugins/UsersManager/Controller.php
@@ -37,9 +37,9 @@
class Controller extends ControllerAdmin
{
- const NONCE_CHANGE_PASSWORD = 'changePasswordNonce';
- const NONCE_ADD_AUTH_TOKEN = 'addAuthTokenNonce';
- const NONCE_DELETE_AUTH_TOKEN = 'deleteAuthTokenNonce';
+ public const NONCE_CHANGE_PASSWORD = 'changePasswordNonce';
+ public const NONCE_ADD_AUTH_TOKEN = 'addAuthTokenNonce';
+ public const NONCE_DELETE_AUTH_TOKEN = 'deleteAuthTokenNonce';
/**
* @var Translator
diff --git a/plugins/UsersManager/LastSeenTimeLogger.php b/plugins/UsersManager/LastSeenTimeLogger.php
index 9c493794a98..92a9f4ba9c8 100644
--- a/plugins/UsersManager/LastSeenTimeLogger.php
+++ b/plugins/UsersManager/LastSeenTimeLogger.php
@@ -18,14 +18,14 @@
*/
class LastSeenTimeLogger
{
- const OPTION_PREFIX = 'UsersManager.lastSeen.';
+ public const OPTION_PREFIX = 'UsersManager.lastSeen.';
/**
* The amount of time in seconds that a last seen value is considered valid. We don't want
* to update the database for every request made by every user, so we only do it if the time
* has been at least this many seconds from the last known time.
*/
- const LAST_TIME_SAVE_DELTA = 300;
+ public const LAST_TIME_SAVE_DELTA = 300;
/**
* Saves the current time for a user as an option if the current request is for something
diff --git a/plugins/UsersManager/Model.php b/plugins/UsersManager/Model.php
index b8d659b164b..da771f6c09d 100644
--- a/plugins/UsersManager/Model.php
+++ b/plugins/UsersManager/Model.php
@@ -36,8 +36,8 @@
*/
class Model
{
- const MAX_LENGTH_TOKEN_DESCRIPTION = 100;
- const TOKEN_HASH_ALGO = 'sha512';
+ public const MAX_LENGTH_TOKEN_DESCRIPTION = 100;
+ public const TOKEN_HASH_ALGO = 'sha512';
private static $rawPrefix = 'user';
private $userTable;
diff --git a/plugins/UsersManager/NewsletterSignup.php b/plugins/UsersManager/NewsletterSignup.php
index f1d38a31ae5..0986fec7854 100644
--- a/plugins/UsersManager/NewsletterSignup.php
+++ b/plugins/UsersManager/NewsletterSignup.php
@@ -18,7 +18,7 @@
class NewsletterSignup
{
- const NEWSLETTER_SIGNUP_OPTION = 'UsersManager.newsletterSignup.';
+ public const NEWSLETTER_SIGNUP_OPTION = 'UsersManager.newsletterSignup.';
public static function signupForNewsletter($userLogin, $email, $matomoOrg = false, $professionalServices = false)
{
diff --git a/plugins/UsersManager/UsersManager.php b/plugins/UsersManager/UsersManager.php
index 93fb650cdb1..271381e3e74 100644
--- a/plugins/UsersManager/UsersManager.php
+++ b/plugins/UsersManager/UsersManager.php
@@ -26,8 +26,8 @@
*/
class UsersManager extends \Piwik\Plugin
{
- const PASSWORD_MIN_LENGTH = 6;
- const PASSWORD_MAX_LENGTH = 200;
+ public const PASSWORD_MIN_LENGTH = 6;
+ public const PASSWORD_MAX_LENGTH = 200;
/**
* @see \Piwik\Plugin::registerEvents
diff --git a/plugins/UsersManager/Validators/Login.php b/plugins/UsersManager/Validators/Login.php
index 5916a1bb557..9c93771d499 100644
--- a/plugins/UsersManager/Validators/Login.php
+++ b/plugins/UsersManager/Validators/Login.php
@@ -18,8 +18,8 @@
class Login extends BaseValidator
{
- const LOGIN_MIN_LENGTH = 2;
- const LOGIN_MAX_LENGTH = 100;
+ public const LOGIN_MIN_LENGTH = 2;
+ public const LOGIN_MAX_LENGTH = 100;
private $checkUnique;
diff --git a/plugins/UsersManager/tests/Fixtures/ManyUsers.php b/plugins/UsersManager/tests/Fixtures/ManyUsers.php
index 66da0384a45..724bb11d98a 100644
--- a/plugins/UsersManager/tests/Fixtures/ManyUsers.php
+++ b/plugins/UsersManager/tests/Fixtures/ManyUsers.php
@@ -22,8 +22,8 @@
*/
class ManyUsers extends Fixture
{
- const SITE_COUNT = 100;
- const USER_COUNT = 100;
+ public const SITE_COUNT = 100;
+ public const USER_COUNT = 100;
public $dateTime = '2013-01-23 01:23:45';
public $idSite = 1;
diff --git a/plugins/UsersManager/tests/Integration/APITest.php b/plugins/UsersManager/tests/Integration/APITest.php
index b0b6642682b..c1b7dcbdaef 100644
--- a/plugins/UsersManager/tests/Integration/APITest.php
+++ b/plugins/UsersManager/tests/Integration/APITest.php
@@ -35,7 +35,7 @@
class TestCap1 extends Capability
{
- const ID = 'test_cap1';
+ public const ID = 'test_cap1';
public function getId(): string
{
@@ -67,7 +67,7 @@ public function getIncludedInRoles(): array
class TestCap2 extends Capability
{
- const ID = 'test_cap2';
+ public const ID = 'test_cap2';
public function getId(): string
{
@@ -100,7 +100,7 @@ public function getIncludedInRoles(): array
class TestCap3 extends Capability
{
- const ID = 'test_cap3';
+ public const ID = 'test_cap3';
public function getId(): string
{
diff --git a/plugins/UsersManager/tests/Integration/UsersManagerTest.php b/plugins/UsersManager/tests/Integration/UsersManagerTest.php
index dd4f91d32b6..e5da95b5143 100644
--- a/plugins/UsersManager/tests/Integration/UsersManagerTest.php
+++ b/plugins/UsersManager/tests/Integration/UsersManagerTest.php
@@ -31,7 +31,7 @@
*/
class UsersManagerTest extends IntegrationTestCase
{
- const DATETIME_REGEX = '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/';
+ public const DATETIME_REGEX = '/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/';
/**
* @var API
diff --git a/plugins/VisitFrequency/API.php b/plugins/VisitFrequency/API.php
index dd52e12299a..3f70686f7d0 100644
--- a/plugins/VisitFrequency/API.php
+++ b/plugins/VisitFrequency/API.php
@@ -24,11 +24,11 @@
class API extends \Piwik\Plugin\API
{
// visitorType==returning,visitorType==returningCustomer
- const RETURNING_VISITOR_SEGMENT = "visitorType%3D%3Dreturning%2CvisitorType%3D%3DreturningCustomer";
- const RETURNING_COLUMN_SUFFIX = "_returning";
+ public const RETURNING_VISITOR_SEGMENT = "visitorType%3D%3Dreturning%2CvisitorType%3D%3DreturningCustomer";
+ public const RETURNING_COLUMN_SUFFIX = "_returning";
- const NEW_VISITOR_SEGMENT = 'visitorType%3D%3Dnew';
- const NEW_COLUMN_SUFFIX = "_new";
+ public const NEW_VISITOR_SEGMENT = 'visitorType%3D%3Dnew';
+ public const NEW_COLUMN_SUFFIX = "_new";
/**
* @param int $idSite
diff --git a/plugins/VisitTime/Archiver.php b/plugins/VisitTime/Archiver.php
index bb4ea8b59ef..359d7907701 100644
--- a/plugins/VisitTime/Archiver.php
+++ b/plugins/VisitTime/Archiver.php
@@ -11,6 +11,6 @@
class Archiver extends \Piwik\Plugin\Archiver
{
- const SERVER_TIME_RECORD_NAME = 'VisitTime_serverTime';
- const LOCAL_TIME_RECORD_NAME = 'VisitTime_localTime';
+ public const SERVER_TIME_RECORD_NAME = 'VisitTime_serverTime';
+ public const LOCAL_TIME_RECORD_NAME = 'VisitTime_localTime';
}
diff --git a/plugins/VisitorInterest/Archiver.php b/plugins/VisitorInterest/Archiver.php
index e9cb8a70ce7..01862061533 100644
--- a/plugins/VisitorInterest/Archiver.php
+++ b/plugins/VisitorInterest/Archiver.php
@@ -12,10 +12,10 @@
class Archiver extends \Piwik\Plugin\Archiver
{
// third element is unit (s for seconds, default is munutes)
- const TIME_SPENT_RECORD_NAME = 'VisitorInterest_timeGap';
- const PAGES_VIEWED_RECORD_NAME = 'VisitorInterest_pageGap';
- const VISITS_COUNT_RECORD_NAME = 'VisitorInterest_visitsByVisitCount';
- const DAYS_SINCE_LAST_RECORD_NAME = 'VisitorInterest_daysSinceLastVisit';
+ public const TIME_SPENT_RECORD_NAME = 'VisitorInterest_timeGap';
+ public const PAGES_VIEWED_RECORD_NAME = 'VisitorInterest_pageGap';
+ public const VISITS_COUNT_RECORD_NAME = 'VisitorInterest_visitsByVisitCount';
+ public const DAYS_SINCE_LAST_RECORD_NAME = 'VisitorInterest_daysSinceLastVisit';
public static $timeGap = array(
array(0, 10, 's'),
diff --git a/plugins/VisitorInterest/Columns/VisitorSecondsSinceLast.php b/plugins/VisitorInterest/Columns/VisitorSecondsSinceLast.php
index 6756af13e2b..4336194b54c 100644
--- a/plugins/VisitorInterest/Columns/VisitorSecondsSinceLast.php
+++ b/plugins/VisitorInterest/Columns/VisitorSecondsSinceLast.php
@@ -18,7 +18,7 @@
class VisitorSecondsSinceLast extends VisitDimension
{
- const COLUMN_TYPE = 'INT(11) UNSIGNED NULL';
+ public const COLUMN_TYPE = 'INT(11) UNSIGNED NULL';
protected $columnName = 'visitor_seconds_since_last';
protected $columnType = self::COLUMN_TYPE;
diff --git a/plugins/WebsiteMeasurable/Type.php b/plugins/WebsiteMeasurable/Type.php
index 707b3f84505..b6bff31fcee 100644
--- a/plugins/WebsiteMeasurable/Type.php
+++ b/plugins/WebsiteMeasurable/Type.php
@@ -10,7 +10,7 @@
class Type extends \Piwik\Measurable\Type
{
- const ID = 'website';
+ public const ID = 'website';
protected $name = 'Referrers_ColumnWebsite'; // we will use new key of WebsiteType_ once we have them
protected $namePlural = 'SitesManager_Sites'; // translated into more languages
protected $description = 'WebsiteMeasurable_WebsiteDescription';
diff --git a/tests/PHPUnit/Fixtures/FewVisitsWithSetVisitorId.php b/tests/PHPUnit/Fixtures/FewVisitsWithSetVisitorId.php
index 408055e7294..0a1a0d7b4c5 100644
--- a/tests/PHPUnit/Fixtures/FewVisitsWithSetVisitorId.php
+++ b/tests/PHPUnit/Fixtures/FewVisitsWithSetVisitorId.php
@@ -22,7 +22,7 @@ class FewVisitsWithSetVisitorId extends Fixture
public $idGoal = 1;
public $dateTime = '2010-03-06 11:22:33';
- const USER_ID_EXAMPLE_COM = 'email@example.com';
+ public const USER_ID_EXAMPLE_COM = 'email@example.com';
public function setUp(): void
{
diff --git a/tests/PHPUnit/Fixtures/LatestStableInstall.php b/tests/PHPUnit/Fixtures/LatestStableInstall.php
index 125ff023f32..0c0d938ec74 100644
--- a/tests/PHPUnit/Fixtures/LatestStableInstall.php
+++ b/tests/PHPUnit/Fixtures/LatestStableInstall.php
@@ -19,7 +19,7 @@
class LatestStableInstall extends Fixture
{
- const DOWNLOAD_TIMEOUT = 900;
+ public const DOWNLOAD_TIMEOUT = 900;
/**
* @var string
diff --git a/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php b/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php
index bad019036d2..c1bbbe3b5c1 100644
--- a/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php
+++ b/tests/PHPUnit/Fixtures/ManySitesImportedLogs.php
@@ -84,8 +84,8 @@ public function setUpWebsitesAndGoals()
}
}
- const SEGMENT_PRE_ARCHIVED = 'visitCount<=5;pageUrl=@/blog/;countryCode==jp';
- const SEGMENT_PRE_ARCHIVED_CONTAINS_ENCODED = 'visitCount<=5;pageUrl=@%2Fblog%2F;countryCode==jp';
+ public const SEGMENT_PRE_ARCHIVED = 'visitCount<=5;pageUrl=@/blog/;countryCode==jp';
+ public const SEGMENT_PRE_ARCHIVED_CONTAINS_ENCODED = 'visitCount<=5;pageUrl=@%2Fblog%2F;countryCode==jp';
public function getDefaultSegments()
{
diff --git a/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php b/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php
index 47da256f0bb..a99c529091c 100644
--- a/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php
+++ b/tests/PHPUnit/Fixtures/ManyVisitsWithGeoIP.php
@@ -26,7 +26,7 @@
*/
class ManyVisitsWithGeoIP extends Fixture
{
- const GEOIP_IMPL_TO_TEST = 'geoip2php';
+ public const GEOIP_IMPL_TO_TEST = 'geoip2php';
public $idSite = 1;
public $dateTime = '2010-01-03 11:22:33';
diff --git a/tests/PHPUnit/Fixtures/OmniFixture.php b/tests/PHPUnit/Fixtures/OmniFixture.php
index e7253e4abb4..4ad54a39ff7 100644
--- a/tests/PHPUnit/Fixtures/OmniFixture.php
+++ b/tests/PHPUnit/Fixtures/OmniFixture.php
@@ -21,8 +21,8 @@
*/
class OmniFixture extends Fixture
{
- const DEFAULT_SEGMENT = "browserCode==FF";
- const OMNIFIXTURE_SUPERUSER_TOKEN = '9ad1de7f8b329ab919d854c556f860c1';
+ public const DEFAULT_SEGMENT = "browserCode==FF";
+ public const OMNIFIXTURE_SUPERUSER_TOKEN = '9ad1de7f8b329ab919d854c556f860c1';
public $month = '2012-01';
public $idSite = 'all';
diff --git a/tests/PHPUnit/Fixtures/RawArchiveDataWithTempAndInvalidated.php b/tests/PHPUnit/Fixtures/RawArchiveDataWithTempAndInvalidated.php
index efbcd398dea..2fd43dd9f38 100644
--- a/tests/PHPUnit/Fixtures/RawArchiveDataWithTempAndInvalidated.php
+++ b/tests/PHPUnit/Fixtures/RawArchiveDataWithTempAndInvalidated.php
@@ -22,7 +22,7 @@
*/
class RawArchiveDataWithTempAndInvalidated extends Fixture
{
- const ROWS_PER_ARCHIVE = 5;
+ public const ROWS_PER_ARCHIVE = 5;
private static $dummyArchiveData = array(
// outdated temporary
diff --git a/tests/PHPUnit/Fixtures/TwoSitesManyVisitsOverSeveralDaysWithSearchEngineReferrers.php b/tests/PHPUnit/Fixtures/TwoSitesManyVisitsOverSeveralDaysWithSearchEngineReferrers.php
index 1a2642b740f..8543b35e6ba 100644
--- a/tests/PHPUnit/Fixtures/TwoSitesManyVisitsOverSeveralDaysWithSearchEngineReferrers.php
+++ b/tests/PHPUnit/Fixtures/TwoSitesManyVisitsOverSeveralDaysWithSearchEngineReferrers.php
@@ -25,7 +25,7 @@ class TwoSitesManyVisitsOverSeveralDaysWithSearchEngineReferrers extends Fixture
'peace "," not war', // testing a keyword containing ,
'justice )(&^#%$ NOT \'" corruption!',
);
- const EXCLUDED_REFERRER_URL = 'https://excludedreferrer123.com';
+ public const EXCLUDED_REFERRER_URL = 'https://excludedreferrer123.com';
public function setUp(): void
{
diff --git a/tests/PHPUnit/Fixtures/TwoSitesTwoVisitorsDifferentDays.php b/tests/PHPUnit/Fixtures/TwoSitesTwoVisitorsDifferentDays.php
index 1369568a414..8e603ffc9a9 100644
--- a/tests/PHPUnit/Fixtures/TwoSitesTwoVisitorsDifferentDays.php
+++ b/tests/PHPUnit/Fixtures/TwoSitesTwoVisitorsDifferentDays.php
@@ -24,7 +24,7 @@ class TwoSitesTwoVisitorsDifferentDays extends Fixture
public $dateTime = '2010-01-03 11:22:33';
public $allowConversions = false;
- const URL_IS_GOAL_WITH_CAMPAIGN_PARAMETERS = 'http://example.org/index.htm?pk_campaign=goal-matching-url-parameter';
+ public const URL_IS_GOAL_WITH_CAMPAIGN_PARAMETERS = 'http://example.org/index.htm?pk_campaign=goal-matching-url-parameter';
public function setUp(): void
diff --git a/tests/PHPUnit/Fixtures/UITestFixture.php b/tests/PHPUnit/Fixtures/UITestFixture.php
index f48550b6d57..6f22e6ea6de 100644
--- a/tests/PHPUnit/Fixtures/UITestFixture.php
+++ b/tests/PHPUnit/Fixtures/UITestFixture.php
@@ -52,7 +52,7 @@
*/
class UITestFixture extends SqlDump
{
- const FIXTURE_LOCATION = '/tests/resources/OmniFixture-dump.sql';
+ public const FIXTURE_LOCATION = '/tests/resources/OmniFixture-dump.sql';
/**
* @var XssTesting
diff --git a/tests/PHPUnit/Framework/Fixture.php b/tests/PHPUnit/Framework/Fixture.php
index 0a7847e715a..fff5f042f93 100644
--- a/tests/PHPUnit/Framework/Fixture.php
+++ b/tests/PHPUnit/Framework/Fixture.php
@@ -77,20 +77,20 @@
*/
class Fixture extends \PHPUnit\Framework\Assert
{
- const IMAGES_GENERATED_ONLY_FOR_OS = 'linux';
- const IMAGES_GENERATED_FOR_PHP = '7.2';
- const IMAGES_GENERATED_FOR_GD = '2.3.3';
- const DEFAULT_SITE_NAME = 'Piwik test';
+ public const IMAGES_GENERATED_ONLY_FOR_OS = 'linux';
+ public const IMAGES_GENERATED_FOR_PHP = '7.2';
+ public const IMAGES_GENERATED_FOR_GD = '2.3.3';
+ public const DEFAULT_SITE_NAME = 'Piwik test';
- const ADMIN_USER_LOGIN = 'superUserLogin';
- const ADMIN_USER_PASSWORD = 'pas3!"§$%&/()=?\'ㄨ<|-_#*+~>word';
- const ADMIN_USER_TOKEN = 'c4ca4238a0b923820dcc509a6f75849b';
+ public const ADMIN_USER_LOGIN = 'superUserLogin';
+ public const ADMIN_USER_PASSWORD = 'pas3!"§$%&/()=?\'ㄨ<|-_#*+~>word';
+ public const ADMIN_USER_TOKEN = 'c4ca4238a0b923820dcc509a6f75849b';
- const VIEW_USER_LOGIN = 'viewUserLogin';
- const VIEW_USER_PASSWORD = 'viewUserPass';
- const VIEW_USER_TOKEN = 'a4ca4238a0b923820dcc509a6f75849f';
+ public const VIEW_USER_LOGIN = 'viewUserLogin';
+ public const VIEW_USER_PASSWORD = 'viewUserPass';
+ public const VIEW_USER_TOKEN = 'a4ca4238a0b923820dcc509a6f75849f';
- const PERSIST_FIXTURE_DATA_ENV = 'PERSIST_FIXTURE_DATA';
+ public const PERSIST_FIXTURE_DATA_ENV = 'PERSIST_FIXTURE_DATA';
public $dbName = false;
diff --git a/tests/PHPUnit/Framework/Mock/LocationProvider.php b/tests/PHPUnit/Framework/Mock/LocationProvider.php
index f7f83960128..80887a8333d 100644
--- a/tests/PHPUnit/Framework/Mock/LocationProvider.php
+++ b/tests/PHPUnit/Framework/Mock/LocationProvider.php
@@ -14,7 +14,7 @@
*/
class LocationProvider extends CountryLocationProvider
{
- const ID = 'mock_provider';
+ public const ID = 'mock_provider';
public static $locations = array();
private $currentLocation = 0;
diff --git a/tests/PHPUnit/Framework/XssTesting.php b/tests/PHPUnit/Framework/XssTesting.php
index d8cf792701d..aa135203f5f 100644
--- a/tests/PHPUnit/Framework/XssTesting.php
+++ b/tests/PHPUnit/Framework/XssTesting.php
@@ -18,7 +18,7 @@
*/
class XssTesting
{
- const OPTION_NAME = 'Tests.xssEntries';
+ public const OPTION_NAME = 'Tests.xssEntries';
public function forTwig($type, $sanitize = false)
{
diff --git a/tests/PHPUnit/Integration/AccessTest.php b/tests/PHPUnit/Integration/AccessTest.php
index a328ebbbb89..591fa0ed394 100644
--- a/tests/PHPUnit/Integration/AccessTest.php
+++ b/tests/PHPUnit/Integration/AccessTest.php
@@ -19,7 +19,7 @@
class TestCustomCap extends Access\Capability
{
- const ID = 'testcustomcap';
+ public const ID = 'testcustomcap';
public function getId(): string
{
return self::ID;
diff --git a/tests/PHPUnit/Integration/AssetManager/UIAssetFetcher/PluginUmdAssetFetcherTest.php b/tests/PHPUnit/Integration/AssetManager/UIAssetFetcher/PluginUmdAssetFetcherTest.php
index d436d1c9471..cc290763a1f 100644
--- a/tests/PHPUnit/Integration/AssetManager/UIAssetFetcher/PluginUmdAssetFetcherTest.php
+++ b/tests/PHPUnit/Integration/AssetManager/UIAssetFetcher/PluginUmdAssetFetcherTest.php
@@ -17,9 +17,9 @@
class PluginUmdAssetFetcherTest extends UnitTestCase
{
- const TEST_PLUGINS_DIR = __DIR__ . '/plugins';
+ public const TEST_PLUGINS_DIR = __DIR__ . '/plugins';
- const TEST_PLUGIN_UMD_SIZES = [
+ public const TEST_PLUGIN_UMD_SIZES = [
'NoPluginUmd' => null,
'TestPlugin1' => 10,
'TestPlugin2' => 1,
@@ -32,7 +32,7 @@ class PluginUmdAssetFetcherTest extends UnitTestCase
'TestPlugin6' => 2,
];
- const TEST_PLUGIN_DEPENDENCIES = [
+ public const TEST_PLUGIN_DEPENDENCIES = [
'NoPluginUmd' => null,
'TestPlugin1' => [],
'TestPlugin2' => ['TestPlugin1'],
@@ -41,13 +41,13 @@ class PluginUmdAssetFetcherTest extends UnitTestCase
'TestPlugin5' => ['TestPlugin1', 'TestPlugin3'],
];
- const TEST_PLUGIN_DEPENDENCIES_ON_DEMAND = [
+ public const TEST_PLUGIN_DEPENDENCIES_ON_DEMAND = [
'OnDemand1' => ['TestPlugin1'],
'OnDemand2' => ['TestPlugin1'],
'OnDemand3' => ['TestPlugin1'],
];
- const TEST_PLUGIN_DEPENDENCIES_DEPENDS_ON_ON_DEMAND = [
+ public const TEST_PLUGIN_DEPENDENCIES_DEPENDS_ON_ON_DEMAND = [
'TestPlugin6' => ['OnDemand1'],
];
diff --git a/tests/PHPUnit/Integration/AssetManagerTest.php b/tests/PHPUnit/Integration/AssetManagerTest.php
index d5f2a593844..0c018a294ce 100644
--- a/tests/PHPUnit/Integration/AssetManagerTest.php
+++ b/tests/PHPUnit/Integration/AssetManagerTest.php
@@ -29,22 +29,22 @@ class AssetManagerTest extends IntegrationTestCase
{
// todo Theme->rewriteAssetPathIfOverridesFound is not tested
- const TEST_PLUGINS_DIR = __DIR__ . '/plugins';
-
- const ASSET_MANAGER_TEST_DIR = 'tests/PHPUnit/Unit/AssetManager/';
-
- const FIRST_CACHE_BUSTER_JS = 'first-cache-buster-js';
- const SECOND_CACHE_BUSTER_JS = 'second-cache-buster-js';
- const FIRST_CACHE_BUSTER_SS = 'first-cache-buster-stylesheet';
- const SECOND_CACHE_BUSTER_SS = 'second-cache-buster-stylesheet';
-
- const CORE_PLUGIN_NAME = 'MockCorePlugin';
- const CORE_PLUGIN_WITHOUT_ASSETS_NAME = 'MockCoreWithoutAssetPlugin';
- const NON_CORE_PLUGIN_NAME = 'MockNonCorePlugin';
- const CORE_THEME_PLUGIN_NAME = 'CoreThemePlugin';
- const NON_CORE_THEME_PLUGIN_NAME = 'NonCoreThemePlugin';
- const CORE_PLUGIN_WITH_ONLY_UMD_NAME = 'MockCorePluginOnlyUmd';
- const NON_CORE_PLUGIN_WITH_ONLY_UMD_NAME = 'MockNonCorePluginOnlyUmd';
+ public const TEST_PLUGINS_DIR = __DIR__ . '/plugins';
+
+ public const ASSET_MANAGER_TEST_DIR = 'tests/PHPUnit/Unit/AssetManager/';
+
+ public const FIRST_CACHE_BUSTER_JS = 'first-cache-buster-js';
+ public const SECOND_CACHE_BUSTER_JS = 'second-cache-buster-js';
+ public const FIRST_CACHE_BUSTER_SS = 'first-cache-buster-stylesheet';
+ public const SECOND_CACHE_BUSTER_SS = 'second-cache-buster-stylesheet';
+
+ public const CORE_PLUGIN_NAME = 'MockCorePlugin';
+ public const CORE_PLUGIN_WITHOUT_ASSETS_NAME = 'MockCoreWithoutAssetPlugin';
+ public const NON_CORE_PLUGIN_NAME = 'MockNonCorePlugin';
+ public const CORE_THEME_PLUGIN_NAME = 'CoreThemePlugin';
+ public const NON_CORE_THEME_PLUGIN_NAME = 'NonCoreThemePlugin';
+ public const CORE_PLUGIN_WITH_ONLY_UMD_NAME = 'MockCorePluginOnlyUmd';
+ public const NON_CORE_PLUGIN_WITH_ONLY_UMD_NAME = 'MockNonCorePluginOnlyUmd';
private $oldPluginDirsEnvVar;
private $oldPluginDirsGlobal;
diff --git a/tests/PHPUnit/Integration/Concurrency/DistributedListTest.php b/tests/PHPUnit/Integration/Concurrency/DistributedListTest.php
index 7a65bf17a6c..9fcb90bfbee 100644
--- a/tests/PHPUnit/Integration/Concurrency/DistributedListTest.php
+++ b/tests/PHPUnit/Integration/Concurrency/DistributedListTest.php
@@ -19,7 +19,7 @@
*/
class DistributedListTest extends IntegrationTestCase
{
- const TEST_OPTION_NAME = 'test.distributed.list';
+ public const TEST_OPTION_NAME = 'test.distributed.list';
public static $defaultOptionValues = array(
'val1',
diff --git a/tests/PHPUnit/Integration/DataAccess/ArchiveInvalidatorTest.php b/tests/PHPUnit/Integration/DataAccess/ArchiveInvalidatorTest.php
index 0585c273208..6f7b2445152 100644
--- a/tests/PHPUnit/Integration/DataAccess/ArchiveInvalidatorTest.php
+++ b/tests/PHPUnit/Integration/DataAccess/ArchiveInvalidatorTest.php
@@ -34,8 +34,8 @@
*/
class ArchiveInvalidatorTest extends IntegrationTestCase
{
- const TEST_SEGMENT_1 = 'browserCode==FF';
- const TEST_SEGMENT_2 = 'countryCode==uk';
+ public const TEST_SEGMENT_1 = 'browserCode==FF';
+ public const TEST_SEGMENT_2 = 'countryCode==uk';
/**
* @var ArchiveInvalidator
diff --git a/tests/PHPUnit/Integration/DataAccess/ArchiveSelectorTest.php b/tests/PHPUnit/Integration/DataAccess/ArchiveSelectorTest.php
index 60e8de00a1b..b4af9d2233a 100644
--- a/tests/PHPUnit/Integration/DataAccess/ArchiveSelectorTest.php
+++ b/tests/PHPUnit/Integration/DataAccess/ArchiveSelectorTest.php
@@ -29,7 +29,7 @@
*/
class ArchiveSelectorTest extends IntegrationTestCase
{
- const TEST_SEGMENT = 'operatingSystemCode==WIN';
+ public const TEST_SEGMENT = 'operatingSystemCode==WIN';
protected static function configureFixture($fixture)
{
diff --git a/tests/PHPUnit/Integration/ReleaseCheckListTest.php b/tests/PHPUnit/Integration/ReleaseCheckListTest.php
index 54a399ca30d..3106fcdc048 100644
--- a/tests/PHPUnit/Integration/ReleaseCheckListTest.php
+++ b/tests/PHPUnit/Integration/ReleaseCheckListTest.php
@@ -29,7 +29,7 @@ class ReleaseCheckListTest extends \PHPUnit\Framework\TestCase
{
private $globalConfig;
- const MINIMUM_PHP_VERSION = '7.2.5';
+ public const MINIMUM_PHP_VERSION = '7.2.5';
public function setUp(): void
{
diff --git a/tests/PHPUnit/Integration/Session/SessionAuthTest.php b/tests/PHPUnit/Integration/Session/SessionAuthTest.php
index 45ebd39d496..028296d387c 100644
--- a/tests/PHPUnit/Integration/Session/SessionAuthTest.php
+++ b/tests/PHPUnit/Integration/Session/SessionAuthTest.php
@@ -22,7 +22,7 @@
class SessionAuthTest extends IntegrationTestCase
{
- const TEST_OTHER_USER = 'testuser';
+ public const TEST_OTHER_USER = 'testuser';
/**
* @var SessionAuth
diff --git a/tests/PHPUnit/Integration/Tracker/ModelTest.php b/tests/PHPUnit/Integration/Tracker/ModelTest.php
index 4fb498e3a39..aaedbe74f80 100644
--- a/tests/PHPUnit/Integration/Tracker/ModelTest.php
+++ b/tests/PHPUnit/Integration/Tracker/ModelTest.php
@@ -21,9 +21,9 @@
*/
class ModelTest extends IntegrationTestCase
{
- const TEST_ACTION_NAME = 'action_name';
- const TEST_ACTION_TYPE = 1;
- const TEST_ACTION_URL_PREFIX = 1;
+ public const TEST_ACTION_NAME = 'action_name';
+ public const TEST_ACTION_TYPE = 1;
+ public const TEST_ACTION_URL_PREFIX = 1;
/**
* @var Model
diff --git a/tests/PHPUnit/Integration/Tracker/PingRequestTest.php b/tests/PHPUnit/Integration/Tracker/PingRequestTest.php
index bca602206db..072603ce132 100644
--- a/tests/PHPUnit/Integration/Tracker/PingRequestTest.php
+++ b/tests/PHPUnit/Integration/Tracker/PingRequestTest.php
@@ -16,15 +16,15 @@
class PingRequestTest extends IntegrationTestCase
{
- const FIRST_VISIT_TIME = '2012-01-05 00:00:00';
- const TEST_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36';
- const TEST_BROWSER_LANGUAGE = 'en-gb';
- const TEST_COUNTRY = 'nl';
- const TEST_REGION = '06';
- const CHANGED_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A';
- const CHANGED_BROWSER_LANGUAGE = 'ja';
- const CHANGED_COUNTRY = 'jp';
- const CHANGED_REGION = '22';
+ public const FIRST_VISIT_TIME = '2012-01-05 00:00:00';
+ public const TEST_USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36';
+ public const TEST_BROWSER_LANGUAGE = 'en-gb';
+ public const TEST_COUNTRY = 'nl';
+ public const TEST_REGION = '06';
+ public const CHANGED_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A';
+ public const CHANGED_BROWSER_LANGUAGE = 'ja';
+ public const CHANGED_COUNTRY = 'jp';
+ public const CHANGED_REGION = '22';
public function setUp(): void
{
diff --git a/tests/PHPUnit/System/ArchiveInvalidationTest.php b/tests/PHPUnit/System/ArchiveInvalidationTest.php
index ddedc5aa141..bd9e6d18395 100644
--- a/tests/PHPUnit/System/ArchiveInvalidationTest.php
+++ b/tests/PHPUnit/System/ArchiveInvalidationTest.php
@@ -29,7 +29,7 @@
*/
class ArchiveInvalidationTest extends SystemTestCase
{
- const TEST_SEGMENT = 'pageUrl=@category%252F';
+ public const TEST_SEGMENT = 'pageUrl=@category%252F';
/**
* @var VisitsTwoWebsitesWithAdditionalVisits
diff --git a/tests/PHPUnit/System/BackwardsCompatibility1XTest.php b/tests/PHPUnit/System/BackwardsCompatibility1XTest.php
index 64393bb22d0..1b18d66b2b3 100644
--- a/tests/PHPUnit/System/BackwardsCompatibility1XTest.php
+++ b/tests/PHPUnit/System/BackwardsCompatibility1XTest.php
@@ -25,7 +25,7 @@
*/
class BackwardsCompatibility1XTest extends SystemTestCase
{
- const FIXTURE_LOCATION = '/tests/resources/piwik-1.13-dump.sql';
+ public const FIXTURE_LOCATION = '/tests/resources/piwik-1.13-dump.sql';
/** @var SqlDump $fixture */
public static $fixture = null; // initialized below class
diff --git a/tests/PHPUnit/System/CookieTest.php b/tests/PHPUnit/System/CookieTest.php
index 988400b0503..f5a1fc9335c 100644
--- a/tests/PHPUnit/System/CookieTest.php
+++ b/tests/PHPUnit/System/CookieTest.php
@@ -17,9 +17,9 @@
class CookieTest extends SystemTestCase
{
- const USERAGENT_CHROME = 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.38 Safari/532.0';
- const USERAGENT_FIREFOX = 'Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0';
- const USERAGENT_SAFARI = 'Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+';
+ public const USERAGENT_CHROME = 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.38 Safari/532.0';
+ public const USERAGENT_FIREFOX = 'Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0';
+ public const USERAGENT_SAFARI = 'Mozilla/5.0 (X11; U; Linux x86_64; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/531.2+';
private $testVars;
diff --git a/tests/PHPUnit/System/TrackerTest.php b/tests/PHPUnit/System/TrackerTest.php
index e6dd2991156..6669be7966c 100644
--- a/tests/PHPUnit/System/TrackerTest.php
+++ b/tests/PHPUnit/System/TrackerTest.php
@@ -27,8 +27,8 @@
*/
class TrackerTest extends IntegrationTestCase
{
- const TASKS_FINISHED_OPTION_NAME = "Tests.scheduledTasksFinished";
- const TASKS_STARTED_OPTION_NAME = "Tests.scheduledTasksStarted";
+ public const TASKS_FINISHED_OPTION_NAME = "Tests.scheduledTasksFinished";
+ public const TASKS_STARTED_OPTION_NAME = "Tests.scheduledTasksStarted";
public function setUp(): void
{
diff --git a/tests/PHPUnit/Unit/CookieTest.php b/tests/PHPUnit/Unit/CookieTest.php
index 0acd221e851..88bde3a8753 100644
--- a/tests/PHPUnit/Unit/CookieTest.php
+++ b/tests/PHPUnit/Unit/CookieTest.php
@@ -15,7 +15,7 @@
class CookieTest extends \PHPUnit\Framework\TestCase
{
- const TEST_COOKIE_NAME = 'fooBarTest';
+ public const TEST_COOKIE_NAME = 'fooBarTest';
/**
* @var Cookie
diff --git a/tests/PHPUnit/Unit/Plugin/ComponentFactoryTest.php b/tests/PHPUnit/Unit/Plugin/ComponentFactoryTest.php
index 5c49da570d3..53198a866b8 100644
--- a/tests/PHPUnit/Unit/Plugin/ComponentFactoryTest.php
+++ b/tests/PHPUnit/Unit/Plugin/ComponentFactoryTest.php
@@ -18,7 +18,7 @@
*/
class ComponentFactoryTest extends TestCase
{
- const REPORT_CLASS_NAME = 'Piwik\\Plugin\\Report';
+ public const REPORT_CLASS_NAME = 'Piwik\\Plugin\\Report';
public function setUp(): void
{
diff --git a/tests/PHPUnit/Unit/Session/SessionFingerprintTest.php b/tests/PHPUnit/Unit/Session/SessionFingerprintTest.php
index dd3aa2ae9a1..91be8d5c9de 100644
--- a/tests/PHPUnit/Unit/Session/SessionFingerprintTest.php
+++ b/tests/PHPUnit/Unit/Session/SessionFingerprintTest.php
@@ -16,7 +16,7 @@
class SessionFingerprintTest extends \PHPUnit\Framework\TestCase
{
- const TEST_TIME_VALUE = 4567;
+ public const TEST_TIME_VALUE = 4567;
/**
* @var SessionFingerprint