Passed
Pull Request — master (#986)
by
unknown
05:20
created
framework/Web/UI/WebControls/TTextBox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -176,7 +176,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
framework/Util/TUtf8Converter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
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];
Please login to merge, or discard this patch.
framework/Util/TClassBehavior.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
framework/Util/TBaseBehavior.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 				}
Please login to merge, or discard this patch.
framework/Util/TBehavior.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.
framework/Collections/TMap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
framework/Collections/TPriorityCollectionTrait.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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()) {
Please login to merge, or discard this patch.
framework/Collections/TList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
framework/TEventHandler.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	 */
108 108
 	public function __construct(mixed $handler, mixed $data = null)
109 109
 	{
110
-		if(!is_callable($handler)) {
110
+		if (!is_callable($handler)) {
111 111
 			throw new TInvalidDataTypeException('eventhandler_not_callable');
112 112
 		}
113 113
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
 	 * @param bool $weak Return the handler with WeakReference instead of objects. Default false.
160 160
 	 * @return null|array|object|string The callable event handler.
161 161
 	 */
162
-	public function getHandler(bool $weak = false): null|string|object|array
162
+	public function getHandler(bool $weak = false): null | string | object | array
163 163
 	{
164 164
 		$handler = $this->_handler;
165 165
 		if (!$weak && $this->_weakObject) {
@@ -209,13 +209,13 @@  discard block
 block discarded – undo
209 209
 		$handler = null;
210 210
 		if (is_array($this->_handler) && is_object($this->_handler[0])) {
211 211
 			$handler = $this->_handler[0];
212
-		} elseif($this->_handler instanceof TEventHandler) {
212
+		} elseif ($this->_handler instanceof TEventHandler) {
213 213
 			return $this->_handler->getHandlerObject($weak);
214
-		} elseif(is_object($this->_handler)) {
214
+		} elseif (is_object($this->_handler)) {
215 215
 			$handler = $this->_handler;
216 216
 
217 217
 		}
218
-		if(!$weak && $this->_weakObject) {
218
+		if (!$weak && $this->_weakObject) {
219 219
 			$handler = $handler->get();
220 220
 		}
221 221
 		return $handler;
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
 	 */
229 229
 	public function hasHandler(): bool
230 230
 	{
231
-		if($this->_handler instanceof TEventHandler) {
231
+		if ($this->_handler instanceof TEventHandler) {
232 232
 			return $this->_handler->hasHandler();
233 233
 		}
234 234
 		return $this->getHandler() !== null;
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
 	 */
266 266
 	public function hasWeakObject(): bool
267 267
 	{
268
-		if($this->_handler instanceof TEventHandler) {
268
+		if ($this->_handler instanceof TEventHandler) {
269 269
 			return $this->_handler->hasWeakObject();
270 270
 		}
271 271
 		return $this->_weakObject;
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 			$offset = (int) $offset;
327 327
 			if ($offset === 2) {
328 328
 				return $this->_data;
329
-			} elseif(is_array($this->_handler)) {
329
+			} elseif (is_array($this->_handler)) {
330 330
 				if ($offset === 0) {
331 331
 					if ($this->_weakObject) {
332 332
 						return $this->_handler[$offset]->get();
Please login to merge, or discard this patch.