Completed
Push — master ( 298e09...565401 )
by Ivannis Suárez
02:36
created
Promise/RejectedPromise.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,6 @@
 block discarded – undo
24 24
     protected $reason;
25 25
 
26 26
     /**
27
-     * @param mixed $value
28 27
      */
29 28
     public function __construct($reason = null)
30 29
     {
Please login to merge, or discard this patch.
Tests/Units/TestCase.php 2 patches
Doc Comments   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
      * @param Extractor $annotationExtractor
32 32
      * @param Generator $asserterGenerator
33 33
      * @param Manager   $assertionManager
34
-     * @param Closure   $reflectionClassFactory
35
-     * @param Closure   $phpExtensionFactory
34
+     * @param \Closure   $reflectionClassFactory
35
+     * @param \Closure   $phpExtensionFactory
36 36
      * @param Analyzer  $analyzer
37 37
      */
38 38
     public function __construct(
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     }
86 86
 
87 87
     /**
88
-     * @param mixed $return
88
+     * @param string $return
89 89
      *
90 90
      * @return \Cubiche\Core\Delegate\Delegate
91 91
      */
@@ -95,7 +95,6 @@  discard block
 block discarded – undo
95 95
     }
96 96
 
97 97
     /**
98
-     * @param mixed $return
99 98
      *
100 99
      * @return \Cubiche\Core\Delegate\Delegate
101 100
      */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
         $this
58 58
             ->getAssertionManager()
59
-                ->setHandler('delegateCall', function (MockAggregator $mock) {
59
+                ->setHandler('delegateCall', function(MockAggregator $mock) {
60 60
                     return $this->delegateCall($mock);
61 61
                 })
62 62
         ;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     protected function delegateMock($return = null)
81 81
     {
82
-        return $this->callableMock(function ($value = null) use ($return) {
82
+        return $this->callableMock(function($value = null) use ($return) {
83 83
             return $return === null ? $value : $return;
84 84
         });
85 85
     }
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     protected function delegateMockWithException(\Exception $e)
103 103
     {
104
-        return $this->callableMock(function () use ($e) {
104
+        return $this->callableMock(function() use ($e) {
105 105
             throw $e;
106 106
         });
107 107
     }
Please login to merge, or discard this patch.
Promise/Promises.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         /** @var \Cubiche\Core\Async\Promise\PromiseInterface $promise */
78 78
         foreach ($promises as $key => $promise) {
79 79
             $promise->then(
80
-                function ($value) use ($deferred, &$results, $map, $key, &$pending) {
80
+                function($value) use ($deferred, &$results, $map, $key, &$pending) {
81 81
                     if ($map !== null) {
82 82
                         $value = $map($value);
83 83
                     }
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
                         $deferred->resolve($results);
88 88
                     }
89 89
                 },
90
-                function ($reason) use ($deferred) {
90
+                function($reason) use ($deferred) {
91 91
                     $deferred->reject($reason);
92 92
                 }
93 93
             );
@@ -106,14 +106,14 @@  discard block
 block discarded – undo
106 106
     public static function timeout(PromiseInterface $promise, $time, LoopInterface $loop)
107 107
     {
108 108
         $deferred = self::defer();
109
-        $timer = $loop->timeout(function () use ($promise, $deferred, $time) {
109
+        $timer = $loop->timeout(function() use ($promise, $deferred, $time) {
110 110
             $deferred->reject(new TimeoutException($time));
111 111
         }, $time);
112 112
 
113
-        $promise->then(function ($value = null) use ($deferred, $timer) {
113
+        $promise->then(function($value = null) use ($deferred, $timer) {
114 114
             $timer->cancel();
115 115
             $deferred->resolve($value);
116
-        }, function ($reason = null) use ($deferred, $timer) {
116
+        }, function($reason = null) use ($deferred, $timer) {
117 117
             $timer->cancel();
118 118
             $deferred->reject($reason);
119 119
         });
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
             $promise = self::timeout($promise, $timeout, $loop);
139 139
         }
140 140
 
141
-        $promise->then(function ($value = null) use (&$result) {
141
+        $promise->then(function($value = null) use (&$result) {
142 142
             $result = $value;
143
-        }, function ($reason = null) use (&$rejectionReason) {
143
+        }, function($reason = null) use (&$rejectionReason) {
144 144
             $rejectionReason = $reason;
145
-        })->always(function () use ($loop) {
145
+        })->always(function() use ($loop) {
146 146
             $loop->stop();
147 147
         });
148 148
 
Please login to merge, or discard this patch.
Promise/Promise.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@
 block discarded – undo
35 35
     ) {
36 36
         $this->deferred = new PromiseDeferred();
37 37
 
38
-        $exportResolve(function ($value = null) {
38
+        $exportResolve(function($value = null) {
39 39
             return $this->resolve($value);
40 40
         });
41
-        $exportReject(function ($reason = null) {
41
+        $exportReject(function($reason = null) {
42 42
             return $this->reject($reason);
43 43
         });
44
-        $exportNotify(function ($state = null) {
44
+        $exportNotify(function($state = null) {
45 45
             return $this->notify($state);
46 46
         });
47 47
     }
Please login to merge, or discard this patch.
Promise/AbstractPromise.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,11 +31,11 @@
 block discarded – undo
31 31
      */
32 32
     public function always(callable $finally, callable $onNotify = null)
33 33
     {
34
-        return $this->then(function ($value) use ($finally) {
34
+        return $this->then(function($value) use ($finally) {
35 35
             $finally($value, null);
36 36
 
37 37
             return $value;
38
-        }, function ($reason) use ($finally) {
38
+        }, function($reason) use ($finally) {
39 39
             $finally(null, $reason);
40 40
         }, $onNotify);
41 41
     }
Please login to merge, or discard this patch.
Promise/Deferred.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,13 +55,13 @@
 block discarded – undo
55 55
     {
56 56
         if ($this->promise === null) {
57 57
             $this->promise = new Promise(
58
-                new Delegate(function (callable $callable) {
58
+                new Delegate(function(callable $callable) {
59 59
                     $this->resolveDelegate = new Delegate($callable);
60 60
                 }),
61
-                new Delegate(function (callable $callable) {
61
+                new Delegate(function(callable $callable) {
62 62
                     $this->rejectDelegate = new Delegate($callable);
63 63
                 }),
64
-                new Delegate(function (callable $callable) {
64
+                new Delegate(function(callable $callable) {
65 65
                     $this->notifyDelegate = new Delegate($callable);
66 66
                 })
67 67
             );
Please login to merge, or discard this patch.
Tests/Units/Promise/CallablePromisorTests.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      */
23 23
     protected function defaultConstructorArguments()
24 24
     {
25
-        return array(function () {
25
+        return array(function() {
26 26
             return 'foo';
27 27
         });
28 28
     }
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                 $promisor = $this->newDefaultTestedInstance(),
39 39
                 $onFulfilled = $this->delegateMock()
40 40
             )
41
-            ->when(function () use ($promisor, $onFulfilled) {
41
+            ->when(function() use ($promisor, $onFulfilled) {
42 42
                 $promisor();
43 43
                 $promisor->promise()->then($onFulfilled);
44 44
             })
@@ -52,12 +52,12 @@  discard block
 block discarded – undo
52 52
             ->given(
53 53
                 $reason = new \Exception(),
54 54
                 /** @var \Cubiche\Core\Async\Promise\CallablePromisor $promisor */
55
-                $promisor = $this->newTestedInstance(function () use ($reason) {
55
+                $promisor = $this->newTestedInstance(function() use ($reason) {
56 56
                     throw $reason;
57 57
                 }),
58 58
                 $onRejected = $this->delegateMock()
59 59
             )
60
-            ->when(function () use ($promisor, $onRejected) {
60
+            ->when(function() use ($promisor, $onRejected) {
61 61
                 $promisor();
62 62
                 $promisor->promise()->then(null, $onRejected);
63 63
             })
Please login to merge, or discard this patch.
Tests/Units/Promise/DeferredInterfaceTestCase.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@
 block discarded – undo
103 103
             ->then()
104 104
                 ->delegateCall($onRejected)
105 105
                     ->withArguments($reason)
106
-                     ->once()
106
+                        ->once()
107 107
         ;
108 108
 
109 109
         $this->invalidActionTest($deferred);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 $deferred = $this->newDefaultTestedInstance(),
121 121
                 $onNotify = $this->delegateMock()
122 122
             )
123
-            ->when(function () use ($deferred, $onNotify) {
123
+            ->when(function() use ($deferred, $onNotify) {
124 124
                 $deferred->promise()->then(null, null, $onNotify);
125 125
                 $deferred->notify('foo');
126 126
             })
@@ -138,15 +138,15 @@  discard block
 block discarded – undo
138 138
     {
139 139
         $this
140 140
             ->given($deferred)
141
-            ->exception(function () use ($deferred) {
141
+            ->exception(function() use ($deferred) {
142 142
                 $deferred->resolve();
143 143
             })
144 144
                 ->isInstanceOf(\LogicException::class)
145
-            ->exception(function () use ($deferred) {
145
+            ->exception(function() use ($deferred) {
146 146
                 $deferred->reject();
147 147
             })
148 148
                 ->isInstanceOf(\LogicException::class)
149
-            ->exception(function () use ($deferred) {
149
+            ->exception(function() use ($deferred) {
150 150
                 $deferred->notify();
151 151
             })
152 152
                 ->isInstanceOf(\LogicException::class)
Please login to merge, or discard this patch.
Tests/Units/Promise/PromiseTests.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
     protected function defaultConstructorArguments()
44 44
     {
45 45
         return array(
46
-            function (callable $callable) {
46
+            function(callable $callable) {
47 47
                 $this->resolve = new Delegate($callable);
48 48
             },
49
-            function (callable $callable) {
49
+            function(callable $callable) {
50 50
                 $this->reject = new Delegate($callable);
51 51
             },
52
-            function (callable $callable) {
52
+            function(callable $callable) {
53 53
                 $this->notify = new Delegate($callable);
54 54
             },
55 55
         );
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                 $promise = $this->newDefaultTestedInstance(),
120 120
                 $onNotify = $this->delegateMock()
121 121
             )
122
-            ->when(function () use ($promise, $onNotify) {
122
+            ->when(function() use ($promise, $onNotify) {
123 123
                 $promise->then(null, null, $onNotify);
124 124
                 $this->notify('foo');
125 125
             })
Please login to merge, or discard this patch.