Passed
Push — master ( f7fcf5...c6ae93 )
by Austin
01:46
created
src/InfluxDbFacade.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                 return static::$method(...$arguments);
48 48
             default:
49 49
                 return static::getFacadeRoot()
50
-                             ->$method(...$arguments);
50
+                                ->$method(...$arguments);
51 51
         }
52 52
     }
53 53
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             Write::dispatch($parameters, $payload);
64 64
         } else {
65 65
             return static::getFacadeRoot()
66
-                         ->write($parameters, $payload);
66
+                            ->write($parameters, $payload);
67 67
         }
68 68
 
69 69
         return true;
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             WritePayload::dispatch($payload, $precision, $retentionPolicy);
86 86
         } else {
87 87
             return static::getFacadeRoot()
88
-                         ->writePayload($payload, $precision, $retentionPolicy);
88
+                            ->writePayload($payload, $precision, $retentionPolicy);
89 89
         }
90 90
 
91 91
         return true;
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             WritePoints::dispatch($points, $precision, $retentionPolicy);
108 108
         } else {
109 109
             return static::getFacadeRoot()
110
-                         ->writePoints($points, $precision, $retentionPolicy);
110
+                            ->writePoints($points, $precision, $retentionPolicy);
111 111
         }
112 112
 
113 113
         return true;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  * @author      Austin Heap <[email protected]>
6 6
  * @version     v0.1.6
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace AustinHeap\Database\InfluxDb;
11 11
 
Please login to merge, or discard this patch.
src/Jobs/WritePayload.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -91,10 +91,10 @@
 block discarded – undo
91 91
     public function handle()
92 92
     {
93 93
         InfluxDbServiceProvider::getInstance()
94
-                               ->writePayload(
95
-                                   $this->payload,
96
-                                   $this->precision,
97
-                                   $this->retentionPolicy
98
-                               );
94
+                                ->writePayload(
95
+                                    $this->payload,
96
+                                    $this->precision,
97
+                                    $this->retentionPolicy
98
+                                );
99 99
     }
100 100
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  * @author      Austin Heap <[email protected]>
6 6
  * @version     v0.1.6
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace AustinHeap\Database\InfluxDb\Jobs;
11 11
 
Please login to merge, or discard this patch.
src/Jobs/Write.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@
 block discarded – undo
53 53
     public function handle()
54 54
     {
55 55
         InfluxDbServiceProvider::getInstance()
56
-                               ->write(
57
-                                   $this->parameters,
58
-                                   $this->payload
59
-                               );
56
+                                ->write(
57
+                                    $this->parameters,
58
+                                    $this->payload
59
+                                );
60 60
     }
61 61
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  * @author      Austin Heap <[email protected]>
6 6
  * @version     v0.1.6
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace AustinHeap\Database\InfluxDb\Jobs;
11 11
 
Please login to merge, or discard this patch.
src/Jobs/WritePoints.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -91,10 +91,10 @@
 block discarded – undo
91 91
     public function handle()
92 92
     {
93 93
         InfluxDbServiceProvider::getInstance()
94
-                               ->writePoints(
95
-                                   $this->points,
96
-                                   $this->precision,
97
-                                   $this->retentionPolicy
98
-                               );
94
+                                ->writePoints(
95
+                                    $this->points,
96
+                                    $this->precision,
97
+                                    $this->retentionPolicy
98
+                                );
99 99
     }
100 100
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  * @author      Austin Heap <[email protected]>
6 6
  * @version     v0.1.6
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace AustinHeap\Database\InfluxDb\Jobs;
11 11
 
Please login to merge, or discard this patch.
src/InfluxDbServiceProvider.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
     public function boot(): void
30 30
     {
31 31
         $this->publishes([
32
-                             __DIR__.'/config/influxdb.php' => config_path('influxdb.php'),
33
-                         ]);
32
+                                __DIR__.'/config/influxdb.php' => config_path('influxdb.php'),
33
+                            ]);
34 34
 
35 35
         $this->mergeConfigFrom(__DIR__.'/config/influxdb.php', 'influxdb');
36 36
 
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
                 }
63 63
 
64 64
                 $dsn = sprintf('%s://%s:%s@%s:%s/%s',
65
-                               $protocol,
66
-                               config('influxdb.user'),
67
-                               config('influxdb.pass'),
68
-                               config('influxdb.host'),
69
-                               config('influxdb.port'),
70
-                               config('influxdb.database')
65
+                                $protocol,
66
+                                config('influxdb.user'),
67
+                                config('influxdb.pass'),
68
+                                config('influxdb.host'),
69
+                                config('influxdb.port'),
70
+                                config('influxdb.database')
71 71
                 );
72 72
 
73 73
                 return InfluxClient::fromDSN($dsn, $timeout, $verifySsl);
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * @author      Austin Heap <[email protected]>
6 6
  * @version     v0.1.6
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace AustinHeap\Database\InfluxDb;
11 11
 
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
     public function boot(): void
30 30
     {
31 31
         $this->publishes([
32
-                             __DIR__.'/config/influxdb.php' => config_path('influxdb.php'),
32
+                             __DIR__ . '/config/influxdb.php' => config_path('influxdb.php'),
33 33
                          ]);
34 34
 
35
-        $this->mergeConfigFrom(__DIR__.'/config/influxdb.php', 'influxdb');
35
+        $this->mergeConfigFrom(__DIR__ . '/config/influxdb.php', 'influxdb');
36 36
 
37 37
         if (config('influxdb.log.monolog', false) === true) {
38 38
             $handler = new MonologHandler($this->getLoggingLevel());
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public function register(): void
53 53
     {
54
-        $this->app->singleton('InfluxDb', function ($app) {
54
+        $this->app->singleton('InfluxDb', function($app) {
55 55
             try {
56 56
                 $timeout = is_int(config('influxdb.timeout', null)) ? config('influxdb.timeout') : 5;
57 57
                 $verifySsl = is_bool(config('influxdb.verify_ssl', null)) ? config('influxdb.verify_ssl') : true;
58 58
                 $protocol = 'influxdb';
59 59
 
60
-                if (in_array(config('influxdb.protocol'), ['https', 'udp'])) {
61
-                    $protocol = config('influxdb.protocol').'+'.$protocol;
60
+                if (in_array(config('influxdb.protocol'), [ 'https', 'udp' ])) {
61
+                    $protocol = config('influxdb.protocol') . '+' . $protocol;
62 62
                 }
63 63
 
64 64
                 $dsn = sprintf('%s://%s:%s@%s:%s/%s',
Please login to merge, or discard this patch.
src/helpers.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,9 +5,9 @@
 block discarded – undo
5 5
  * @author      Austin Heap <[email protected]>
6 6
  * @version     v0.1.6
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10
-if (! function_exists('influxdb')) {
10
+if (!function_exists('influxdb')) {
11 11
     /**
12 12
      * @return \InfluxDB\Client|\InfluxDB\Database
13 13
      */
Please login to merge, or discard this patch.
src/Logs/MonologHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  * @author      Austin Heap <[email protected]>
6 6
  * @version     v0.1.6
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace AustinHeap\Database\InfluxDb\Logs;
11 11
 
Please login to merge, or discard this patch.
src/Jobs/Job.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * @author      Austin Heap <[email protected]>
6 6
  * @version     v0.1.6
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace AustinHeap\Database\InfluxDb\Jobs;
11 11
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      *
43 43
      * @param array $args
44 44
      */
45
-    public function __construct(array $args = [])
45
+    public function __construct(array $args = [ ])
46 46
     {
47 47
         $this->queue = config('influxdb.queue.name', 'default');
48 48
 
Please login to merge, or discard this patch.
src/Logs/Formatter.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -33,40 +33,40 @@  discard block
 block discarded – undo
33 33
      */
34 34
     protected function prepareTags(array $record): array
35 35
     {
36
-        $tags = [];
36
+        $tags = [ ];
37 37
 
38
-        if (isset($_SERVER['REMOTE_ADDR'])) {
39
-            $tags['serverName'] = $_SERVER['REMOTE_ADDR'];
38
+        if (isset($_SERVER[ 'REMOTE_ADDR' ])) {
39
+            $tags[ 'serverName' ] = $_SERVER[ 'REMOTE_ADDR' ];
40 40
         }
41 41
 
42
-        if (isset($record['level'])) {
43
-            $tags['severity'] = $this->rfc5424ToSeverity($record['level']);
42
+        if (isset($record[ 'level' ])) {
43
+            $tags[ 'severity' ] = $this->rfc5424ToSeverity($record[ 'level' ]);
44 44
         }
45 45
 
46
-        if (isset($_SERVER['REQUEST_URI'])) {
47
-            $tags['endpoint_url'] = $_SERVER['REQUEST_URI'];
46
+        if (isset($_SERVER[ 'REQUEST_URI' ])) {
47
+            $tags[ 'endpoint_url' ] = $_SERVER[ 'REQUEST_URI' ];
48 48
         }
49 49
 
50
-        if (isset($_SERVER['REQUEST_METHOD'])) {
51
-            $tags['method'] = $_SERVER['REQUEST_METHOD'];
50
+        if (isset($_SERVER[ 'REQUEST_METHOD' ])) {
51
+            $tags[ 'method' ] = $_SERVER[ 'REQUEST_METHOD' ];
52 52
         }
53 53
 
54
-        if (isset($record['context']['user_id'])) {
55
-            $tags['user_id'] = $record['context']['user_id'];
54
+        if (isset($record[ 'context' ][ 'user_id' ])) {
55
+            $tags[ 'user_id' ] = $record[ 'context' ][ 'user_id' ];
56 56
         }
57 57
 
58
-        if (isset($record['context']['project_id'])) {
59
-            $tags['project_id'] = $record['context']['project_id'];
58
+        if (isset($record[ 'context' ][ 'project_id' ])) {
59
+            $tags[ 'project_id' ] = $record[ 'context' ][ 'project_id' ];
60 60
         }
61 61
 
62
-        if (isset($record['context']['file'])) {
63
-            $tags['file'] = $this->replaceDigitData($record['context']['file']);
62
+        if (isset($record[ 'context' ][ 'file' ])) {
63
+            $tags[ 'file' ] = $this->replaceDigitData($record[ 'context' ][ 'file' ]);
64 64
         }
65 65
 
66
-        if (isset($record['context']['event']['api_stats'][0])) {
67
-            foreach ($record['context']['event']['api_stats'][0] as $key => $value) {
66
+        if (isset($record[ 'context' ][ 'event' ][ 'api_stats' ][ 0 ])) {
67
+            foreach ($record[ 'context' ][ 'event' ][ 'api_stats' ][ 0 ] as $key => $value) {
68 68
                 if (is_string($value) || is_int($value)) {
69
-                    $tags[$key] = $value;
69
+                    $tags[ $key ] = $value;
70 70
                 }
71 71
             }
72 72
         }
@@ -91,15 +91,15 @@  discard block
 block discarded – undo
91 91
         if (count($tags)) {
92 92
             foreach ($tags as $key => $value) {
93 93
                 if (is_numeric($value)) {
94
-                    $message['fields'][$key] = (int)$value;
94
+                    $message[ 'fields' ][ $key ] = (int) $value;
95 95
                 }
96 96
             }
97 97
 
98
-            $message['tags'] = $tags;
98
+            $message[ 'tags' ] = $tags;
99 99
         }
100 100
 
101
-        if (isset($message['fields']['Debug']['message'])) {
102
-            $message['fields']['Debug']['message'] = $this->trimLines($message['fields']['Debug']['message']);
101
+        if (isset($message[ 'fields' ][ 'Debug' ][ 'message' ])) {
102
+            $message[ 'fields' ][ 'Debug' ][ 'message' ] = $this->trimLines($message[ 'fields' ][ 'Debug' ][ 'message' ]);
103 103
         }
104 104
 
105 105
         return $message;
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             600 => 'Emergency',
124 124
         ];
125 125
 
126
-        $result = isset($levels[$level]) ? $levels[$level] : $levels[600];
126
+        $result = isset($levels[ $level ]) ? $levels[ $level ] : $levels[ 600 ];
127 127
 
128 128
         return $result;
129 129
     }
Please login to merge, or discard this patch.