@@ -19,13 +19,13 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | public function attach($event, $callback, $priority = 0) |
| 21 | 21 | { |
| 22 | - if(!is_string($event) |
|
| 22 | + if (!is_string($event) |
|
| 23 | 23 | && !is_callable($callback) |
| 24 | 24 | && !is_integer($priority)) { |
| 25 | 25 | return false; |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - if(!array_key_exists($event, $this->events)) { |
|
| 28 | + if (!array_key_exists($event, $this->events)) { |
|
| 29 | 29 | $this->events[$event] = new ListenerQueue; |
| 30 | 30 | } |
| 31 | 31 | |
@@ -41,11 +41,11 @@ discard block |
||
| 41 | 41 | */ |
| 42 | 42 | public function detach($event, $callback) |
| 43 | 43 | { |
| 44 | - if(!is_string($event) && !is_callable($callback)) { |
|
| 44 | + if (!is_string($event) && !is_callable($callback)) { |
|
| 45 | 45 | return false; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - if(array_key_exists($event, $this->events)) |
|
| 48 | + if (array_key_exists($event, $this->events)) |
|
| 49 | 49 | { |
| 50 | 50 | $this->events[$event]->eject($callback); |
| 51 | 51 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public function clearListeners($event) |
| 63 | 63 | { |
| 64 | - if(!is_string($event)) { |
|
| 64 | + if (!is_string($event)) { |
|
| 65 | 65 | return false; |
| 66 | 66 | } |
| 67 | 67 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function trigger($event, $target = null, $argv = []) |
| 82 | 82 | { |
| 83 | - if(( |
|
| 83 | + if (( |
|
| 84 | 84 | !is_string($event) && !is_object($event) |
| 85 | 85 | ) && ( |
| 86 | 86 | !is_string($target) && !is_object($target) |
@@ -90,13 +90,13 @@ discard block |
||
| 90 | 90 | return false; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - if($event instanceof EventInterface) { |
|
| 93 | + if ($event instanceof EventInterface) { |
|
| 94 | 94 | $event = $event->getName(); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | $event = $this->events[$event]; |
| 98 | 98 | |
| 99 | - while($event->valid()) |
|
| 99 | + while ($event->valid()) |
|
| 100 | 100 | { |
| 101 | 101 | call_user_func_array( |
| 102 | 102 | $event->top(), |