Completed
Push — master ( 20f692...609506 )
by Kamil
33:05
created
src/Event/BaseEventEmitterTrait.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
      * @param int $pointer
312 312
      * @param string $event
313 313
      * @param callable $listener
314
-     * @return callable
314
+     * @return \Closure
315 315
      */
316 316
     protected function attachOnceListener($pointer, $event, callable $listener)
317 317
     {
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
      * @param string $event
329 329
      * @param int $limit
330 330
      * @param callable $listener
331
-     * @return callable
331
+     * @return \Closure
332 332
      */
333 333
     protected function attachTimesListener($pointer, $event, $limit, callable $listener)
334 334
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@
 block discarded – undo
159 159
     public function delayTimes($event, $ticks, $limit, callable $listener)
160 160
     {
161 161
         $counter = 0;
162
-        return $this->times($event, $ticks+$limit-1, function(...$args) use(&$counter, $event, $ticks, $listener) {
162
+        return $this->times($event, $ticks + $limit - 1, function(...$args) use(&$counter, $event, $ticks, $listener) {
163 163
             if (++$counter >= $ticks)
164 164
             {
165 165
                 $listener(...$args);
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@
 block discarded – undo
28 28
      *
29 29
      */
30 30
     public function __construct()
31
-    {}
31
+    {
32
+}
32 33
 
33 34
     /**
34 35
      *
Please login to merge, or discard this patch.
example/events_handlers_disposable.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,6 +28,6 @@
 block discarded – undo
28 28
 });
29 29
 
30 30
 $counter = 0;
31
-$emitter->emit('event.number', [ ++$counter ]);
32
-$emitter->emit('event.number', [ ++$counter ]);
33
-$emitter->emit('event.number', [ ++$counter ]);
31
+$emitter->emit('event.number', [ ++$counter]);
32
+$emitter->emit('event.number', [ ++$counter]);
33
+$emitter->emit('event.number', [ ++$counter]);
Please login to merge, or discard this patch.
example/events_handlers_exact.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,5 +31,5 @@
 block discarded – undo
31 31
 $counterMax = 5;
32 32
 
33 33
 while ($counter < $counterMax) {
34
-    $emitter->emit('event.number', [ ++$counter ]);
34
+    $emitter->emit('event.number', [ ++$counter]);
35 35
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,6 +30,7 @@
 block discarded – undo
30 30
 $counter = 0;
31 31
 $counterMax = 5;
32 32
 
33
-while ($counter < $counterMax) {
33
+while ($counter < $counterMax)
34
+{
34 35
     $emitter->emit('event.number', [ ++$counter ]);
35 36
 }
Please login to merge, or discard this patch.
example/events_quickstart.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,4 +26,4 @@
 block discarded – undo
26 26
     echo "User '$user' has started this script at $time.\n";
27 27
 });
28 28
 
29
-$emitter->emit('script.start', [ get_current_user(), date('H:i:s Y-m-d') ]);
29
+$emitter->emit('script.start', [get_current_user(), date('H:i:s Y-m-d')]);
Please login to merge, or discard this patch.
example/advanced_flow_copying_events.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,5 +35,5 @@
 block discarded – undo
35 35
 //$source->copyEvent($target, 'account.pass'); // uncomment this to copy also 'account.pass' event!
36 36
 
37 37
 // while the emits are being emited on $source emitter.
38
-$source->emit('account.name', [ 'admin' ]);
39
-$source->emit('account.pass', [ 'admin1234' ]);
38
+$source->emit('account.name', ['admin']);
39
+$source->emit('account.pass', ['admin1234']);
Please login to merge, or discard this patch.
example/advanced_flow_forwarding_events.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,5 +36,5 @@
 block discarded – undo
36 36
 $source->forwardEvents($target);
37 37
 
38 38
 // while the emits are being emited on $source emitter.
39
-$source->emit('account.name', [ 'admin' ]);
40
-$source->emit('account.pass', [ 'admin1234' ]);
39
+$source->emit('account.name', ['admin']);
40
+$source->emit('account.pass', ['admin1234']);
Please login to merge, or discard this patch.
example/events_multiple_listeners.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,4 +32,4 @@
 block discarded – undo
32 32
     echo "I am 3rd listener and I got new state=$state too!\n";
33 33
 });
34 34
 
35
-$emitter->emit('state.change', [ 'new_state' ]);
35
+$emitter->emit('state.change', ['new_state']);
Please login to merge, or discard this patch.
example/events_handlers_delayed.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,5 +31,5 @@
 block discarded – undo
31 31
 $counterMax = 5;
32 32
 
33 33
 while ($counter < $counterMax) {
34
-    $emitter->emit('event.number', [ ++$counter ]);
34
+    $emitter->emit('event.number', [ ++$counter]);
35 35
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,6 +30,7 @@
 block discarded – undo
30 30
 $counter = 0;
31 31
 $counterMax = 5;
32 32
 
33
-while ($counter < $counterMax) {
33
+while ($counter < $counterMax)
34
+{
34 35
     $emitter->emit('event.number', [ ++$counter ]);
35 36
 }
Please login to merge, or discard this patch.
example/events_handlers_mixed.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,5 +31,5 @@
 block discarded – undo
31 31
 $counterMax = 5;
32 32
 
33 33
 while ($counter < $counterMax) {
34
-    $emitter->emit('event.number', [ ++$counter ]);
34
+    $emitter->emit('event.number', [ ++$counter]);
35 35
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,6 +30,7 @@
 block discarded – undo
30 30
 $counter = 0;
31 31
 $counterMax = 5;
32 32
 
33
-while ($counter < $counterMax) {
33
+while ($counter < $counterMax)
34
+{
34 35
     $emitter->emit('event.number', [ ++$counter ]);
35 36
 }
Please login to merge, or discard this patch.