@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | return false; |
| 57 | 57 | } |
| 58 | 58 | } catch (\Throwable $exception) { |
| 59 | - if($this->emit('exception', [ $exception, $event ])) { |
|
| 59 | + if ($this->emit('exception', [$exception, $event])) { |
|
| 60 | 60 | throw $exception; |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | $condition = with\predicate($condition); |
| 91 | 91 | |
| 92 | - return function (...$arguments) use ($listener, $condition) { |
|
| 92 | + return function(...$arguments) use ($listener, $condition) { |
|
| 93 | 93 | if ($condition(...$arguments)) { |
| 94 | 94 | return (bool)$listener(...$arguments); |
| 95 | 95 | } |
@@ -100,8 +100,8 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | private function getOnceCallable(callable $listener, $event) : callable |
| 102 | 102 | { |
| 103 | - return $onceListener = function (...$arguments) use (&$onceListener, $event, $listener) { |
|
| 104 | - if(($result = $listener(...$arguments)) !== null) { |
|
| 103 | + return $onceListener = function(...$arguments) use (&$onceListener, $event, $listener) { |
|
| 104 | + if (($result = $listener(...$arguments)) !== null) { |
|
| 105 | 105 | $this->removeListener($event, $onceListener); |
| 106 | 106 | return $result; |
| 107 | 107 | } |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | public function offsetSet($index, $value) |
| 72 | 72 | { |
| 73 | 73 | parent::offsetSet($index, $value); |
| 74 | - $this->emit('set', [ $value, $index ]); |
|
| 74 | + $this->emit('set', [$value, $index]); |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | /** |
@@ -85,11 +85,11 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function offsetUnset($index) |
| 87 | 87 | { |
| 88 | - $this->emit('remove', [ $this[$index], $index ]); |
|
| 88 | + $this->emit('remove', [$this[$index], $index]); |
|
| 89 | 89 | |
| 90 | 90 | parent::offsetUnset($index); |
| 91 | 91 | |
| 92 | - if(!count($this)) { |
|
| 92 | + if (!count($this)) { |
|
| 93 | 93 | $this->emit('empty'); |
| 94 | 94 | } |
| 95 | 95 | } |