@@ -19,12 +19,12 @@ discard block |
||
| 19 | 19 | */ |
| 20 | 20 | public function attach($event, $callback, $priority = 0) |
| 21 | 21 | { |
| 22 | - if(!is_string($event) && !is_callable($callback) && !is_integer($priority)) |
|
| 22 | + if (!is_string($event) && !is_callable($callback) && !is_integer($priority)) |
|
| 23 | 23 | { |
| 24 | 24 | return false; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | - if(!array_key_exists($event, $this->events)) |
|
| 27 | + if (!array_key_exists($event, $this->events)) |
|
| 28 | 28 | $this->events[$event] = new ListenerQueue; |
| 29 | 29 | |
| 30 | 30 | $this->events[$event]->add($callback, $priority); |
@@ -39,12 +39,12 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | public function detach($event, $callback) |
| 41 | 41 | { |
| 42 | - if(!is_string($event) && !is_callable($callback)) |
|
| 42 | + if (!is_string($event) && !is_callable($callback)) |
|
| 43 | 43 | { |
| 44 | 44 | return false; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - if(array_key_exists($event, $this->events)) |
|
| 47 | + if (array_key_exists($event, $this->events)) |
|
| 48 | 48 | { |
| 49 | 49 | $this->events[$event]->eject($callback); |
| 50 | 50 | } |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function clearListeners($event) |
| 62 | 62 | { |
| 63 | - if(!is_string($event)) |
|
| 63 | + if (!is_string($event)) |
|
| 64 | 64 | { |
| 65 | 65 | return false; |
| 66 | 66 | } |
@@ -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) |
@@ -91,14 +91,14 @@ discard block |
||
| 91 | 91 | return false; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - if($event instanceof EventInterface) |
|
| 94 | + if ($event instanceof EventInterface) |
|
| 95 | 95 | { |
| 96 | 96 | $event = $event->getName(); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | $event = $this->events[$event]; |
| 100 | 100 | |
| 101 | - while($event->valid()) |
|
| 101 | + while ($event->valid()) |
|
| 102 | 102 | { |
| 103 | 103 | call_user_func_array( |
| 104 | 104 | $event->top(), |