Skip to content
Permalink
Browse files

Make Psalm 3.4.12 happy

  • Loading branch information...
LeSuisse committed Aug 23, 2019
1 parent d16959f commit d4cb1bbc8189cb2fae6f98c11a136716c4129d89
@@ -4,13 +4,13 @@
require __DIR__ . '/../vendor/autoload.php';
$adapter = (string) $_GET['adapter'] ?? '';
$adapter = (string) ($_GET['adapter'] ?? '');
$storage = null;
if ($adapter === 'redis') {
$redis_client = new Redis();
$redis_client->connect((string) $_SERVER['REDIS_HOST'] ?? '127.0.0.1');
$redis_client->connect((string) ($_SERVER['REDIS_HOST'] ?? '127.0.0.1'));
$storage = new Enalean\Prometheus\Storage\RedisStore($redis_client);
}
@@ -7,11 +7,11 @@
use Enalean\Prometheus\Registry\CollectorRegistry;
use Enalean\Prometheus\Renderer\RenderTextFormat;
$adapter = (string) $_GET['adapter'] ?? '';
$adapter = (string) ($_GET['adapter'] ?? '');
if ($adapter === 'redis') {
$redis_client = new Redis();
$redis_client->connect((string) $_SERVER['REDIS_HOST'] ?? '127.0.0.1');
$redis_client->connect((string) ($_SERVER['REDIS_HOST'] ?? '127.0.0.1'));
$adapter = new Enalean\Prometheus\Storage\RedisStore($redis_client);
} elseif ($adapter === 'apcu') {
$adapter = new Enalean\Prometheus\Storage\APCUStore();
@@ -12,11 +12,11 @@
use Http\Discovery\Psr17FactoryDiscovery;
use Http\Discovery\Psr18ClientDiscovery;
$adapter = (string) $_GET['adapter'] ?? '';
$adapter = (string) ($_GET['adapter'] ?? '');
if ($adapter === 'redis') {
$redis_client = new Redis();
$redis_client->connect((string) $_SERVER['REDIS_HOST'] ?? '127.0.0.1');
$redis_client->connect((string) ($_SERVER['REDIS_HOST'] ?? '127.0.0.1'));
$adapter = new RedisStore($redis_client);
} elseif ($adapter === 'apcu') {
$adapter = new Enalean\Prometheus\Storage\APCUStore();
@@ -12,7 +12,7 @@
if ($adapter === 'redis') {
$redis_client = new Redis();
$redis_client->connect((string) $_SERVER['REDIS_HOST'] ?? '127.0.0.1');
$redis_client->connect((string) ($_SERVER['REDIS_HOST'] ?? '127.0.0.1'));
$adapter = new Enalean\Prometheus\Storage\RedisStore($redis_client);
} elseif ($adapter === 'apcu') {
$adapter = new Enalean\Prometheus\Storage\APCUStore();
@@ -8,11 +8,11 @@
use Enalean\Prometheus\Value\MetricLabelNames;
use Enalean\Prometheus\Value\MetricName;
$adapter = (string) $_GET['adapter'] ?? '';
$adapter = (string) ($_GET['adapter'] ?? '');
if ($adapter === 'redis') {
$redis_client = new Redis();
$redis_client->connect((string) $_SERVER['REDIS_HOST'] ?? '127.0.0.1');
$redis_client->connect((string) ($_SERVER['REDIS_HOST'] ?? '127.0.0.1'));
$adapter = new Enalean\Prometheus\Storage\RedisStore($redis_client);
} elseif ($adapter === 'apcu') {
$adapter = new Enalean\Prometheus\Storage\APCUStore();
@@ -8,11 +8,11 @@
use Enalean\Prometheus\Value\HistogramLabelNames;
use Enalean\Prometheus\Value\MetricName;
$adapter = (string) $_GET['adapter'] ?? '';
$adapter = (string) ($_GET['adapter'] ?? '');
if ($adapter === 'redis') {
$redis_client = new Redis();
$redis_client->connect((string) $_SERVER['REDIS_HOST'] ?? '127.0.0.1');
$redis_client->connect((string) ($_SERVER['REDIS_HOST'] ?? '127.0.0.1'));
$adapter = new Enalean\Prometheus\Storage\RedisStore($redis_client);
} elseif ($adapter === 'apcu') {
$adapter = new Enalean\Prometheus\Storage\APCUStore();

0 comments on commit d4cb1bb

Please sign in to comment.
You can’t perform that action at this time.