@@ -61,7 +61,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -77,7 +77,7 @@ |
||
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 |