Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

Fix Adapter var names #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/Prometheus/CollectorRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CollectorRegistry
/**
* @var Adapter
*/
private $storageAdapter;
private $adapter;
/**
* @var Gauge[]
*/
Expand All @@ -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;
}

/**
Expand All @@ -54,7 +54,7 @@ public static function getDefault()
*/
public function getMetricFamilySamples()
{
return $this->storageAdapter->collect();
return $this->adapter->collect();
}

/**
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down