Completed
Push — master ( a9a9ff...da4fa2 )
by Akihito
20s queued 11s
created
src/Ganesha.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      * the status between trip and calm down.
31 31
      * @var int
32 32
      */
33
-    const STATUS_TRIPPED  = 2;
33
+    const STATUS_TRIPPED = 2;
34 34
 
35 35
     /**
36 36
      * @var \Ackintosh\Ganesha\StrategyInterface
Please login to merge, or discard this patch.
src/Ganesha/Strategy/Rate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -227,7 +227,7 @@
 block discarded – undo
227 227
 
228 228
     private static function serviceNameDecorator($timeWindow, $current = true)
229 229
     {
230
-        return function ($service) use ($timeWindow, $current) {
230
+        return function($service) use ($timeWindow, $current) {
231 231
             return sprintf(
232 232
                 '%s.%d',
233 233
                 $service,
Please login to merge, or discard this patch.
src/Ganesha/GuzzleMiddleware.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function __invoke(callable $handler)
36 36
     {
37
-        return function (RequestInterface $request, array $options) use ($handler) {
37
+        return function(RequestInterface $request, array $options) use ($handler) {
38 38
             $serviceName = $this->serviceNameExtractor->extract($request, $options);
39 39
 
40 40
             if (!$this->ganesha->isAvailable($serviceName)) {
@@ -48,11 +48,11 @@  discard block
 block discarded – undo
48 48
             $promise = $handler($request, $options);
49 49
 
50 50
             return $promise->then(
51
-                function ($value) use ($serviceName) {
51
+                function($value) use ($serviceName) {
52 52
                     $this->ganesha->success($serviceName);
53 53
                     return \GuzzleHttp\Promise\promise_for($value);
54 54
                 },
55
-                function ($reason) use ($serviceName) {
55
+                function($reason) use ($serviceName) {
56 56
                     $this->ganesha->failure($serviceName);
57 57
                     return \GuzzleHttp\Promise\rejection_for($reason);
58 58
                 }
Please login to merge, or discard this patch.
src/Ganesha/Strategy/Count.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
         }
51 51
 
52 52
         if (!call_user_func([$params['adapter'], 'supportCountStrategy'])) {
53
-            throw new \InvalidArgumentException(get_class($params['adapter'])  . " doesn't support Count Strategy.");
53
+            throw new \InvalidArgumentException(get_class($params['adapter']) . " doesn't support Count Strategy.");
54 54
         }
55 55
     }
56 56
 
Please login to merge, or discard this patch.
examples/common.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             break;
32 32
     }
33 33
 
34
-    $ganesha =  Builder::build([
34
+    $ganesha = Builder::build([
35 35
         'adapter'               => $adapter,
36 36
         'timeWindow'            => TIME_WINDOW,
37 37
         'failureRateThreshold'  => FAILURE_RATE,
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 
53 53
 __EOS__;
54 54
 
55
-    $ganesha->subscribe(function ($event, $service, $message) use ($messageOnTripped, $messageOnCalmedDown) {
55
+    $ganesha->subscribe(function($event, $service, $message) use ($messageOnTripped, $messageOnCalmedDown) {
56 56
         switch ($event) {
57 57
             case Ganesha::EVENT_TRIPPED:
58 58
                 echo $messageOnTripped;
Please login to merge, or discard this patch.
src/Ganesha/Storage/Adapter/MongoDB.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@
 block discarded – undo
252 252
                 foreach ($result->getWriteErrors() as $writeError) {
253 253
                     $errorMessage .= 'Operation#' . $writeError->getIndex() . ': ' . $writeError->getMessage() . ' (' . $writeError->getCode() . ')' . "\n";
254 254
                 }
255
-                throw new StorageException('failed '.$command.' the value : ' . $errorMessage);
255
+                throw new StorageException('failed ' . $command . ' the value : ' . $errorMessage);
256 256
             }
257 257
         } catch (\MongoDB\Driver\Exception\Exception $ex) {
258 258
             throw new StorageException('adapter error : ' . $ex->getMessage());
Please login to merge, or discard this patch.