Completed
Push — master ( 0dfb70...6f61e6 )
by Jorge
01:46
created
src/Adapters/GuzzleMiddleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
             return $promise;
34 34
         }
35 35
 
36
-        return $promise->then(function (ResponseInterface $response) use ($serviceName) {
36
+        return $promise->then(function(ResponseInterface $response) use ($serviceName) {
37 37
             $wasSuccessful = $response->getStatusCode() >= 200 && $response->getStatusCode() < 300;
38 38
             if ($wasSuccessful) {
39 39
                 $this->circuitBreaker->reportSuccess($serviceName);
Please login to merge, or discard this patch.
src/AvailabilityStrategy/InMemoryStorage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
             $this->strategyData[$strategy->getId()][$serviceName] = [];
38 38
         }
39 39
 
40
-        $this->strategyData[$strategy->getId()][$serviceName][$key] =  $value;
40
+        $this->strategyData[$strategy->getId()][$serviceName][$key] = $value;
41 41
     }
42 42
 
43 43
     public function getStrategyData(
Please login to merge, or discard this patch.
src/AvailabilityStrategy/TimeBackoffTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
     public function it_closes_the_circuit_after_timeout()
62 62
     {
63 63
         $this->setFailuresToMaxAllowed();
64
-        $oneSecAndOneMillisecond = floor((microtime(true) * 1000)) - self::BASE_WAIT_TIME - 1;
64
+        $oneSecAndOneMillisecond = floor((microtime(true) * 1000))-self::BASE_WAIT_TIME-1;
65 65
         $this->storage->saveStrategyData(
66 66
             $this->sut,
67 67
             self::SERVICE_NAME,
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $this->setFailuresToMaxAllowed();
107 107
         $this->maxWaitTimeHaveOccurred();
108 108
         $this->backoffStrategy->waitTime(Argument::any(), self::BASE_WAIT_TIME)
109
-            ->willReturn(self::MAX_WAIT_TIME + 1);
109
+            ->willReturn(self::MAX_WAIT_TIME+1);
110 110
 
111 111
         $this->assertTrue($this->sut->isAvailable(self::SERVICE_NAME));
112 112
     }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     {
124 124
         $this->storage->setNumberOfFailures(
125 125
             self::SERVICE_NAME,
126
-            self::MAX_FAILURES - 1
126
+            self::MAX_FAILURES-1
127 127
         );
128 128
     }
129 129
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             $this->sut,
136 136
             self::SERVICE_NAME,
137 137
             self::LAST_ATTEMPT_KEY,
138
-            floor(microtime(true) * 1000) - 1);
138
+            floor(microtime(true) * 1000)-1);
139 139
     }
140 140
 
141 141
     private function maxWaitTimeHaveOccurred()
@@ -144,6 +144,6 @@  discard block
 block discarded – undo
144 144
             $this->sut,
145 145
             self::SERVICE_NAME,
146 146
             self::LAST_ATTEMPT_KEY,
147
-            floor(microtime(true) * 1000) - self::MAX_WAIT_TIME);
147
+            floor(microtime(true) * 1000)-self::MAX_WAIT_TIME);
148 148
     }
149 149
 }
Please login to merge, or discard this patch.
src/AvailabilityStrategy/TimeBackoff.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
     private function millisecondsSinceLastAttempt(string $serviceName): int
78 78
     {
79 79
         $lastAttempt = $this->getLastAttemptTime($serviceName);
80
-        return $this->now() - $lastAttempt;
80
+        return $this->now()-$lastAttempt;
81 81
     }
82 82
 
83 83
     private function now(): int
Please login to merge, or discard this patch.
src/Adapters/APCuStorageTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
         );
73 73
         $this->assertEquals(
74 74
             "a_value",
75
-            $storage->getStrategyData($strategy->reveal(), self::SERVICE_NAME,"a_key")
75
+            $storage->getStrategyData($strategy->reveal(), self::SERVICE_NAME, "a_key")
76 76
         );
77 77
     }
78 78
 
Please login to merge, or discard this patch.