aboutsummaryrefslogtreecommitdiffstats
path: root/includes/libs/Stats/Metrics
diff options
context:
space:
mode:
authorDerick Alangi <alangiderick@gmail.com>2024-11-07 19:30:11 +0300
committerCwhite <cwhite@wikimedia.org>2024-11-08 17:55:52 +0000
commit2b71bd066695de59c9799d9d0e369e50625c0d46 (patch)
tree0eb816612d588a897c412b50d5327d341a4bcd67 /includes/libs/Stats/Metrics
parent22a7070df9c042acad69026908ae12eafe974e93 (diff)
downloadmediawikicore-2b71bd066695de59c9799d9d0e369e50625c0d46.tar.gz
mediawikicore-2b71bd066695de59c9799d9d0e369e50625c0d46.zip
Stats: Remove redundant docs, remove unused method
This patch does some cosmetic changes to the Stats library like: - Remove some redundant class properties doc especially when file is in strict type mode - Cleanup class level doc that adds little meaning to what the class already does - Remove unused `mergeLabels()` method. This can be directly removed without deprecation, as the feature ended up never being used in the first place and it's only here because during the efforts in I60c497727fdae493c3bb18de3bd1a4db338132cc, we forgot to remove this particular method. This patch also fixes a phan issue that detected that `getMetric()` in StatsFactory class calls BaseMetric::withStatsdDataFactory() with a null because the member's default value is null but doesn't say this in the BaseMetricInterface, this fixes it. Change-Id: Id9fbdeed3e8cd9ddd9e48031139b4f31c40c2558
Diffstat (limited to 'includes/libs/Stats/Metrics')
-rw-r--r--includes/libs/Stats/Metrics/BaseMetricInterface.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/libs/Stats/Metrics/BaseMetricInterface.php b/includes/libs/Stats/Metrics/BaseMetricInterface.php
index f3113619e76a..611f54d1c1e6 100644
--- a/includes/libs/Stats/Metrics/BaseMetricInterface.php
+++ b/includes/libs/Stats/Metrics/BaseMetricInterface.php
@@ -156,8 +156,9 @@ interface BaseMetricInterface {
/**
* StatsD Data Factory instance to copy metrics to.
*
- * @param IBufferingStatsdDataFactory $statsdDataFactory
+ * @param IBufferingStatsdDataFactory|null $statsdDataFactory
+ *
* @return BaseMetricInterface
*/
- public function withStatsdDataFactory( IBufferingStatsdDataFactory $statsdDataFactory );
+ public function withStatsdDataFactory( ?IBufferingStatsdDataFactory $statsdDataFactory );
}