Test Failed
Push — feature/add-basic-documentatio... ( 16d3b6...72eabf )
by Liam
02:39
created
src/liamsorsby/Hystrix/Storage/Adapter/AbstractStorage.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
      */
76 76
     public function __construct(string $prefix, int $threshold, int $duration)
77 77
     {
78
-        $this->failurePrefix = $prefix . 'failcount';
79
-        $this->openPrefix = $prefix . 'open';
78
+        $this->failurePrefix = $prefix.'failcount';
79
+        $this->openPrefix = $prefix.'open';
80 80
         $this->duration = $duration;
81 81
         $this->threshold = $threshold;
82 82
     }
@@ -112,27 +112,27 @@  discard block
 block discarded – undo
112 112
     public function reportFailure(string $service): void
113 113
     {
114 114
         $currentCount = $this->getStorage()->get(
115
-            $this->failurePrefix . $service
115
+            $this->failurePrefix.$service
116 116
         );
117 117
 
118
-        $newTotal = ((int)$currentCount)+1;
118
+        $newTotal = ((int) $currentCount) + 1;
119 119
 
120 120
         if (!(bool) $currentCount) {
121 121
             $this->getStorage()->set(
122
-                $this->failurePrefix . $service,
122
+                $this->failurePrefix.$service,
123 123
                 1,
124 124
                 $this->duration
125 125
             );
126 126
         } else {
127 127
             $this->getStorage()->set(
128
-                $this->failurePrefix . $service,
128
+                $this->failurePrefix.$service,
129 129
                 $newTotal
130 130
             );
131 131
         }
132 132
 
133 133
         if ($newTotal >= $this->threshold) {
134 134
             $this->getStorage()->set(
135
-                $this->openPrefix . $service,
135
+                $this->openPrefix.$service,
136 136
                 1,
137 137
                 $this->duration
138 138
             );
Please login to merge, or discard this patch.