Passed
Push — master ( 44e0d6...4ae575 )
by Bret R.
01:51 queued 17s
created
src/Check/ElasticsearchCheck.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      * @param \Elasticsearch\Client|\Elastic\Elasticsearch\Client $client
26 26
      * @param array $indices Indices to check for
27 27
      */
28
-    public function __construct(string $label, \Elasticsearch\Client|\Elastic\Elasticsearch\Client $client, array $indices = [])
28
+    public function __construct(string $label, \Elasticsearch\Client | \Elastic\Elasticsearch\Client $client, array $indices = [])
29 29
     {
30 30
         parent::__construct($label);
31 31
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         try {
45 45
             $info = $this->client->info();
46 46
             $versionParts = explode('.', $info['version']['number']);
47
-            $esMajorVersion = (int)array_shift($versionParts);
47
+            $esMajorVersion = (int) array_shift($versionParts);
48 48
             if ($esMajorVersion >= 8) {
49 49
                 if ($this->client->ping()->asBool() !== true) {
50 50
                     $result->setError("Elasticsearch is not reachable (ping failed)");
Please login to merge, or discard this patch.
examples/standalone.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require __DIR__ . '/../vendor/autoload.php';
2
+require __DIR__.'/../vendor/autoload.php';
3 3
 
4 4
 use BretRZaun\StatusPage\Check\PhpExtensionCheck;
5 5
 use BretRZaun\StatusPage\Check\PhpIniCheck;
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
 
50 50
 // determine if the user is allowed to see the details (based on their IP)
51 51
 $whitelistPattern = '.*'; // this intentionally matches everything
52
-$showDetails = (bool)preg_match('|(?mi-Us)' . $whitelistPattern . '|', $_SERVER['REMOTE_ADDR']);
52
+$showDetails = (bool) preg_match('|(?mi-Us)'.$whitelistPattern.'|', $_SERVER['REMOTE_ADDR']);
53 53
 
54 54
 // use the built-in Twig template
55
-$loader = new Twig\Loader\FilesystemLoader(__DIR__ . '/../resources/views/');
55
+$loader = new Twig\Loader\FilesystemLoader(__DIR__.'/../resources/views/');
56 56
 $twig = new Twig\Environment($loader, ['autoescape' => false]);
57 57
 
58 58
 $content = $twig->render(
Please login to merge, or discard this patch.