Completed
Push — master ( eeee5c...bea951 )
by Akihito
10s
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/Storage/Adapter/Redis.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
                 throw new StorageException('Failed to remove expired elements. service: ' . $service);
46 46
             }
47 47
 
48
-            $r =  $this->redis->zCard($service);
48
+            $r = $this->redis->zCard($service);
49 49
         } catch (\RedisException $e) {
50 50
             throw new StorageException($e->getMessage());
51 51
         }
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.
examples/common.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
             break;
24 24
         case 'memcached':
25 25
             $m = new \Memcached();
26
-            $m->addServer(getenv('GANESHA_EXAMPLE_MEMCACHED') ?: 'localhost' , 11211);
26
+            $m->addServer(getenv('GANESHA_EXAMPLE_MEMCACHED') ?: 'localhost', 11211);
27 27
             $adapter = new \Ackintosh\Ganesha\Storage\Adapter\Memcached($m);
28 28
             break;
29 29
         default:
@@ -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.