@@ -47,15 +47,15 @@ |
||
| 47 | 47 | |
| 48 | 48 | public function onCreatePost(Event $event) { |
| 49 | 49 | $result = '<div style="padding: 9px 16px;border:1px solid #EEE;margin-bottom:16px;">' |
| 50 | - .'<strong>Posted by</strong> ' |
|
| 51 | - .$this->mediator->publish(new Event('formatUsername', $event->data['username'], $this)) |
|
| 52 | - .' (' |
|
| 53 | - .$this->mediator->publish(new Event('formatGroup', $event->data['group'], $this)) |
|
| 54 | - .')<br /><strong>Posted Date</strong> ' |
|
| 55 | - .$this->mediator->publish(new Event('formatDate', $event->data['date'], $this)) |
|
| 56 | - .'<br />' |
|
| 57 | - .$this->mediator->publish(new Event('formatMessage', $event->data['message'], $this)) |
|
| 58 | - .'</div>'; |
|
| 50 | + .'<strong>Posted by</strong> ' |
|
| 51 | + .$this->mediator->publish(new Event('formatUsername', $event->data['username'], $this)) |
|
| 52 | + .' (' |
|
| 53 | + .$this->mediator->publish(new Event('formatGroup', $event->data['group'], $this)) |
|
| 54 | + .')<br /><strong>Posted Date</strong> ' |
|
| 55 | + .$this->mediator->publish(new Event('formatDate', $event->data['date'], $this)) |
|
| 56 | + .'<br />' |
|
| 57 | + .$this->mediator->publish(new Event('formatMessage', $event->data['message'], $this)) |
|
| 58 | + .'</div>'; |
|
| 59 | 59 | return $result; |
| 60 | 60 | } |
| 61 | 61 | } |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | // filter out any that don't begin with "on" |
| 100 | 100 | $methods = array_filter( |
| 101 | 101 | $methods, |
| 102 | - function (\ReflectionMethod $m) { |
|
| 102 | + function(\ReflectionMethod $m) { |
|
| 103 | 103 | return (strpos($m->name, 'on') === 0); |
| 104 | 104 | } |
| 105 | 105 | ); // slow, both array_filter and closure |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | |
| 155 | 155 | // filter out auto-handlers so that a subsequent call to subscribe() |
| 156 | 156 | // works predictably |
| 157 | - $this->handlers = array_filter($this->handlers, function ($v) { |
|
| 157 | + $this->handlers = array_filter($this->handlers, function($v) { |
|
| 158 | 158 | return (strpos($v[0][1], 'on') !== 0); |
| 159 | 159 | }); |
| 160 | 160 | |
@@ -265,7 +265,7 @@ |
||
| 265 | 265 | // scaffold if not exist |
| 266 | 266 | if (!$this->hasSubscribers($eventName)) { |
| 267 | 267 | $this->subscribers[$eventName] = [ |
| 268 | - [ // insert positions |
|
| 268 | + [// insert positions |
|
| 269 | 269 | self::PRIORITY_URGENT => 1, |
| 270 | 270 | self::PRIORITY_HIGHEST => 1, |
| 271 | 271 | self::PRIORITY_HIGH => 1, |