Passed
Push — develop ( d53231...ea980c )
by Stan
02:32
created
src/Storage/Concerns/StoresMetrics.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         $actual = count($labels);
24 24
 
25 25
         if ($expected !== $actual) {
26
-            throw new LabelException("Expected {$expected} label values but {$actual} were given.");
26
+            throw new LabelException("expected {$expected} label values but {$actual} were given.");
27 27
         }
28 28
 
29 29
         return new Collection([
Please login to merge, or discard this patch.
src/Storage/StorageManager.php 1 patch
Braces   +16 added lines, -8 removed lines patch added patch discarded remove patch
@@ -66,7 +66,8 @@  discard block
 block discarded – undo
66 66
                 default:
67 67
                     return $this->samples($metric, $items);
68 68
             }
69
-        } catch (Exception $e) {
69
+        }
70
+        catch (Exception $e) {
70 71
             $class = get_class($metric);
71 72
 
72 73
             throw new StorageException("Failed to collect the samples of [{$class}]: {$e->getMessage()}", 0, $e);
@@ -85,9 +86,11 @@  discard block
 block discarded – undo
85 86
                 $this->labeled($metric, $labels)->toJson(),
86 87
                 $value
87 88
             );
88
-        } catch (LabelException $e) {
89
+        }
90
+        catch (LabelException $e) {
89 91
             throw $e;
90
-        } catch (Exception $e) {
92
+        }
93
+        catch (Exception $e) {
91 94
             $class = get_class($metric);
92 95
 
93 96
             throw new StorageException("Failed to increment [{$class}] by `{$value}`: {$e->getMessage()}", 0, $e);
@@ -105,9 +108,11 @@  discard block
 block discarded – undo
105 108
                 $this->labeled($metric, $labels)->toJson(),
106 109
                 $value
107 110
             );
108
-        } catch (LabelException $e) {
111
+        }
112
+        catch (LabelException $e) {
109 113
             throw $e;
110
-        } catch (Exception $e) {
114
+        }
115
+        catch (Exception $e) {
111 116
             $class = get_class($metric);
112 117
 
113 118
             throw new StorageException("Failed to decrement [{$class}] by `{$value}`: {$e->getMessage()}", 0, $e);
@@ -135,7 +140,8 @@  discard block
 block discarded – undo
135 140
                 $this->repository->set($key, $field, $identifier, false);
136 141
                 $this->repository->push($identifier, $value);
137 142
             }
138
-        } catch (Exception $e) {
143
+        }
144
+        catch (Exception $e) {
139 145
             $class = get_class($metric);
140 146
 
141 147
             throw new StorageException("Failed to observe [{$class}] with `{$value}`: {$e->getMessage()}", 0, $e);
@@ -153,9 +159,11 @@  discard block
 block discarded – undo
153 159
                 $this->labeled($metric, $labels)->toJson(),
154 160
                 $value
155 161
             );
156
-        } catch (LabelException $e) {
162
+        }
163
+        catch (LabelException $e) {
157 164
             throw $e;
158
-        } catch (Exception $e) {
165
+        }
166
+        catch (Exception $e) {
159 167
             $class = get_class($metric);
160 168
 
161 169
             throw new StorageException("Failed to set [{$class}] to `{$value}`: {$e->getMessage()}", 0, $e);
Please login to merge, or discard this patch.