@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | throw new TInvalidOperationException('classbehavior_detach_wrong_owner', $this->getName()); |
| 128 | 128 | } |
| 129 | 129 | parent::detach($component); |
| 130 | - if($this->_owners->remove($component) === 0 && !$this->_owners->getCount()) { |
|
| 130 | + if ($this->_owners->remove($component) === 0 && !$this->_owners->getCount()) { |
|
| 131 | 131 | $this->_owners = null; |
| 132 | 132 | $this->_name = null; |
| 133 | 133 | $this->_handlersInstalled = null; |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | protected function setHandlersStatus(TComponent $component, bool $attach): bool |
| 229 | 229 | { |
| 230 | 230 | $ref = is_array($this->_handlersInstalled) ? spl_object_id($component) : $component; |
| 231 | - if($attach) { |
|
| 231 | + if ($attach) { |
|
| 232 | 232 | if ($this->_owners && $this->_owners->contains($component) && !isset($this->_handlersInstalled[$ref])) { |
| 233 | 233 | $this->_handlersInstalled[$ref] = true; |
| 234 | 234 | return true; |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | */ |
| 149 | 149 | public static function mergeHandlers(...$args): array |
| 150 | 150 | { |
| 151 | - if(empty($args)) { |
|
| 151 | + if (empty($args)) { |
|
| 152 | 152 | return []; |
| 153 | 153 | } |
| 154 | 154 | $combined = []; |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | $strict = $this->getStrictEvents(); |
| 336 | 336 | foreach ($this->eventsLog() as $event => $handlers) { |
| 337 | 337 | if ($strict || $this->hasEvent($event)) { |
| 338 | - foreach($handlers as $handler) { |
|
| 338 | + foreach ($handlers as $handler) { |
|
| 339 | 339 | $component->attachEventHandler($event, is_string($handler) ? [$this, $handler] : $handler, $priority); |
| 340 | 340 | } |
| 341 | 341 | } |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | $strict = $this->getStrictEvents(); |
| 356 | 356 | foreach ($this->eventsLog() as $event => $handlers) { |
| 357 | 357 | if ($strict || $this->hasEvent($event)) { |
| 358 | - foreach($handlers as $handler) { |
|
| 358 | + foreach ($handlers as $handler) { |
|
| 359 | 359 | $component->detachEventHandler($event, is_string($handler) ? [$this, $handler] : $handler); |
| 360 | 360 | } |
| 361 | 361 | } |
@@ -221,7 +221,7 @@ |
||
| 221 | 221 | if ($this->getOwner() !== $component) { |
| 222 | 222 | return false; |
| 223 | 223 | } |
| 224 | - if($attach ^ $this->_handlersInstalled) { |
|
| 224 | + if ($attach ^ $this->_handlersInstalled) { |
|
| 225 | 225 | $this->_handlersInstalled = $attach; |
| 226 | 226 | return true; |
| 227 | 227 | } |