From e25154d48a69f9f68e6a603fdbdf3de7de6b8651 Mon Sep 17 00:00:00 2001 From: Simon Podlipsky Date: Tue, 21 May 2019 00:29:16 +0200 Subject: [PATCH] Fix Adapter var names --- src/Prometheus/CollectorRegistry.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Prometheus/CollectorRegistry.php b/src/Prometheus/CollectorRegistry.php index 9ff18e3..1a6f326 100644 --- a/src/Prometheus/CollectorRegistry.php +++ b/src/Prometheus/CollectorRegistry.php @@ -19,7 +19,7 @@ class CollectorRegistry /** * @var Adapter */ - private $storageAdapter; + private $adapter; /** * @var Gauge[] */ @@ -33,9 +33,9 @@ class CollectorRegistry */ private $histograms = array(); - public function __construct(Adapter $redisAdapter) + public function __construct(Adapter $adapter) { - $this->storageAdapter = $redisAdapter; + $this->adapter = $adapter; } /** @@ -54,7 +54,7 @@ public static function getDefault() */ public function getMetricFamilySamples() { - return $this->storageAdapter->collect(); + return $this->adapter->collect(); } /** @@ -72,7 +72,7 @@ public function registerGauge($namespace, $name, $help, $labels = array()) throw new MetricsRegistrationException("Metric already registered"); } $this->gauges[$metricIdentifier] = new Gauge( - $this->storageAdapter, + $this->adapter, $namespace, $name, $help, @@ -128,7 +128,7 @@ public function registerCounter($namespace, $name, $help, $labels = array()) throw new MetricsRegistrationException("Metric already registered"); } $this->counters[$metricIdentifier] = new Counter( - $this->storageAdapter, + $this->adapter, $namespace, $name, $help, @@ -185,7 +185,7 @@ public function registerHistogram($namespace, $name, $help, $labels = array(), $ throw new MetricsRegistrationException("Metric already registered"); } $this->histograms[$metricIdentifier] = new Histogram( - $this->storageAdapter, + $this->adapter, $namespace, $name, $help,