@@ -176,7 +176,7 @@ |
||
176 | 176 | $writer->addAttribute('value', $text); |
177 | 177 | } |
178 | 178 | |
179 | - switch($this->getAutoCompleteType()) { |
|
179 | + switch ($this->getAutoCompleteType()) { |
|
180 | 180 | case TTextBoxAutoCompleteType::Enabled: |
181 | 181 | $writer->addAttribute('autocomplete', 'on'); |
182 | 182 | break; |
@@ -91,7 +91,7 @@ |
||
91 | 91 | */ |
92 | 92 | public static function parseEncodingLanguage(string &$encoding, &$lang) |
93 | 93 | { |
94 | - if(strpos($encoding, '.') !== false) { |
|
94 | + if (strpos($encoding, '.') !== false) { |
|
95 | 95 | $parts = explode($encoding, '.', 1); |
96 | 96 | $encoding = $parts[0]; |
97 | 97 | $lang = $parts[1]; |
@@ -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 | } |
@@ -82,7 +82,7 @@ |
||
82 | 82 | if ($value === null) { |
83 | 83 | return; |
84 | 84 | } |
85 | - if($this->_r === null || Prado::isCallingSelf()) { |
|
85 | + if ($this->_r === null || Prado::isCallingSelf()) { |
|
86 | 86 | $this->_r = TPropertyValue::ensureBoolean($value); |
87 | 87 | } else { |
88 | 88 | throw new TInvalidOperationException('map_readonly_set', $this::class); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | if ($value === $this->_dp) { |
102 | 102 | return; |
103 | 103 | } |
104 | - if($this->_dp === null || Prado::isCallingSelf()) { |
|
104 | + if ($this->_dp === null || Prado::isCallingSelf()) { |
|
105 | 105 | $this->_dp = (string) round(TPropertyValue::ensureFloat($value), $this->getPrecision()); |
106 | 106 | } else { |
107 | 107 | throw new TInvalidOperationException('prioritytrait_no_set_default_priority'); |
@@ -130,13 +130,13 @@ discard block |
||
130 | 130 | if ($value === $this->_p) { |
131 | 131 | return; |
132 | 132 | } |
133 | - if($this->_p !== null && !Prado::isCallingSelf()) { |
|
133 | + if ($this->_p !== null && !Prado::isCallingSelf()) { |
|
134 | 134 | throw new TInvalidOperationException('prioritytrait_no_set_precision'); |
135 | 135 | } |
136 | 136 | $this->_p = TPropertyValue::ensureInteger($value); |
137 | 137 | $this->setDefaultPriority($this->_dp); |
138 | 138 | $_d = []; |
139 | - foreach(array_keys($this->_d) as $priority) { |
|
139 | + foreach (array_keys($this->_d) as $priority) { |
|
140 | 140 | $newPriority = $this->ensurePriority($priority); |
141 | 141 | if (array_key_exists($newPriority, $_d)) { |
142 | 142 | if ($this->getPriorityCombineStyle()) { |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | } |
283 | 283 | $items[] = $itemsatpriority; |
284 | 284 | } |
285 | - if(empty($items)) { |
|
285 | + if (empty($items)) { |
|
286 | 286 | return []; |
287 | 287 | } |
288 | 288 | if ($this->getPriorityCombineStyle()) { |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | } |
310 | 310 | $items[] = $itemsatpriority; |
311 | 311 | } |
312 | - if(empty($items)) { |
|
312 | + if (empty($items)) { |
|
313 | 313 | return []; |
314 | 314 | } |
315 | 315 | if ($this->getPriorityCombineStyle()) { |
@@ -89,7 +89,7 @@ |
||
89 | 89 | if ($value === null) { |
90 | 90 | return; |
91 | 91 | } |
92 | - if($this->_r === null || Prado::isCallingSelf()) { |
|
92 | + if ($this->_r === null || Prado::isCallingSelf()) { |
|
93 | 93 | $this->_r = TPropertyValue::ensureBoolean($value); |
94 | 94 | } else { |
95 | 95 | throw new TInvalidOperationException('list_readonly_set', $this::class); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | protected function weakCustomAdd(object $object) |
123 | 123 | { |
124 | - if($object instanceof TEventHandler) { |
|
124 | + if ($object instanceof TEventHandler) { |
|
125 | 125 | $object = $object->getHandlerObject(); |
126 | 126 | $this->_eventHandlerCount++; |
127 | 127 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | */ |
138 | 138 | protected function weakCustomRemove(object $object) |
139 | 139 | { |
140 | - if($object instanceof TEventHandler) { |
|
140 | + if ($object instanceof TEventHandler) { |
|
141 | 141 | $object = $object->getHandlerObject(); |
142 | 142 | $this->_eventHandlerCount--; |
143 | 143 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $this->filterItemForOutput($item[$key]); |
157 | 157 | } |
158 | 158 | } elseif (is_object($item)) { |
159 | - if($item instanceof WeakReference) { |
|
159 | + if ($item instanceof WeakReference) { |
|
160 | 160 | $item = $item->get(); |
161 | 161 | } elseif (($item instanceof TEventHandler) && !$item->hasHandler()) { |
162 | 162 | $item = null; |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | if ($isEventHandler = ($object instanceof TEventHandler)) { |
198 | 198 | $object = $object->getHandlerObject(true); |
199 | 199 | } |
200 | - if(($object instanceof WeakReference) && $object->get() === null) { |
|
200 | + if (($object instanceof WeakReference) && $object->get() === null) { |
|
201 | 201 | $this->_c--; |
202 | 202 | if ($i === $this->_c) { |
203 | 203 | array_pop($this->_d); |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | */ |
238 | 238 | public function setDiscardInvalid($value): void |
239 | 239 | { |
240 | - if($value === $this->_discardInvalid) { |
|
240 | + if ($value === $this->_discardInvalid) { |
|
241 | 241 | return; |
242 | 242 | } |
243 | 243 | if ($this->_discardInvalid !== null && !Prado::isCallingSelf()) { |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | $object = $object->get(); |
257 | 257 | } |
258 | 258 | if ($object === null) { |
259 | - $this->_c--; //on read only, parent::removeAt won't remove for scrub. |
|
259 | + $this->_c--; //on read only, parent::removeAt won't remove for scrub. |
|
260 | 260 | if ($i === $this->_c) { |
261 | 261 | array_pop($this->_d); |
262 | 262 | } else { |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | $this->filterItemForInput($item); |
436 | 436 | if (($index = parent::indexOf($item)) === -1 && $this->_eventHandlerCount) { |
437 | 437 | $index = false; |
438 | - foreach($this->_d as $index => $dItem) { |
|
438 | + foreach ($this->_d as $index => $dItem) { |
|
439 | 439 | if (($dItem instanceof TEventHandler) && $dItem->isSameHandler($item, true)) { |
440 | 440 | break; |
441 | 441 | } |