Passed
Push — master ( 5f4a0f...103db3 )
by Fabio
11:08 queued 05:40
created
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.
framework/Util/Helpers/TEscCharsetConverter.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -32,47 +32,47 @@
 block discarded – undo
32 32
 	public const ESC_CHAR_ENCODINGS_MAP = [
33 33
 			"\x1B\x25\x47" => 'UTF-8', // ESC-'%G'
34 34
 
35
-			"\x1B\x28\x40" => 'ASCII',		"\x1B\x29\x40" => 'ASCII',		"\x1B\x2A\x40" => 'ASCII',		"\x1B\x2B\x40" => 'ASCII',
35
+			"\x1B\x28\x40" => 'ASCII', "\x1B\x29\x40" => 'ASCII', "\x1B\x2A\x40" => 'ASCII', "\x1B\x2B\x40" => 'ASCII',
36 36
 			"\x1B\x28\x41" => 'ASCII.en_GB', "\x1B\x29\x41" => 'ASCII.en_GB', "\x1B\x2A\x41" => 'ASCII.en_GB', "\x1B\x2B\x41" => 'ASCII.en_GB',
37 37
 			"\x1B\x28\x42" => 'ASCII.en_US', "\x1B\x29\x42" => 'ASCII.en_US', "\x1B\x2A\x42" => 'ASCII.en_US', "\x1B\x2B\x42" => 'ASCII.en_US',
38
-			"\x1B\x28\x43" => 'ASCII.fi',	"\x1B\x29\x43" => 'ASCII.fi',	"\x1B\x2A\x43" => 'ASCII.fi',	"\x1B\x2B\x43" => 'ASCII.fi',
39
-			"\x1B\x28\x44" => 'ASCII.sv',	"\x1B\x29\x44" => 'ASCII.sv',	"\x1B\x2A\x44" => 'ASCII.sv',	"\x1B\x2B\x44" => 'ASCII.sv',
40
-			"\x1B\x28\x45" => 'ASCII.no',	"\x1B\x29\x45" => 'ASCII.no',	"\x1B\x2A\x45" => 'ASCII.no',	"\x1B\x2B\x45" => 'ASCII.no',
41
-			"\x1B\x28\x46" => 'ASCII.no',	"\x1B\x29\x46" => 'ASCII.no',	"\x1B\x2A\x46" => 'ASCII.no',	"\x1B\x2B\x46" => 'ASCII.no',
42
-			"\x1B\x28\x47" => 'ASCII.se',	"\x1B\x29\x47" => 'ASCII.se',	"\x1B\x2A\x47" => 'ASCII.se',	"\x1B\x2B\x47" => 'ASCII.se',
43
-			"\x1B\x28\x49" => 'JIS_X0201',	"\x1B\x29\x49" => 'JIS_X0201',	"\x1B\x2A\x49" => 'JIS_X0201',	"\x1B\x2B\x49" => 'JIS_X0201',
44
-			"\x1B\x28\x4A" => 'JIS_X0201',	"\x1B\x29\x4A" => 'JIS_X0201',	"\x1B\x2A\x4A" => 'JIS_X0201',	"\x1B\x2B\x4A" => 'JIS_X0201',
45
-			"\x1B\x28\x4B" => 'ASCII.de',	"\x1B\x29\x4B" => 'ASCII.de',	"\x1B\x2A\x4B" => 'ASCII.de',	"\x1B\x2B\x4B" => 'ASCII.de',
46
-			"\x1B\x28\x4C" => 'ASCII.pt',	"\x1B\x29\x4C" => 'ASCII.pt',	"\x1B\x2A\x4C" => 'ASCII.pt',	"\x1B\x2B\x4C" => 'ASCII.pt',
47
-			"\x1B\x28\x4E" => 'ISO-5427',	"\x1B\x29\x4E" => 'ISO-5427',	"\x1B\x2A\x4E" => 'ISO-5427',	"\x1B\x2B\x4E" => 'ISO-5427',
48
-			"\x1B\x28\x54" => 'ISO646-CN',	"\x1B\x29\x54" => 'ISO646-CN',	"\x1B\x2A\x54" => 'ISO646-CN',	"\x1B\x2B\x54" => 'ISO646-CN',
49
-			"\x1B\x28\x59" => 'ASCII.it',	"\x1B\x29\x59" => 'ASCII.it',	"\x1B\x2A\x59" => 'ASCII.it',	"\x1B\x2B\x59" => 'ASCII.it',
50
-			"\x1B\x28\x5A" => 'ASCII.es',	"\x1B\x29\x5A" => 'ASCII.es',	"\x1B\x2A\x5A" => 'ASCII.es',	"\x1B\x2B\x5A" => 'ASCII.es',
51
-			"\x1B\x28\x5B" => 'ASCII.el',	"\x1B\x29\x5B" => 'ASCII.el',	"\x1B\x2A\x5B" => 'ASCII.el',	"\x1B\x2B\x5B" => 'ASCII.el',
52
-			"\x1B\x28\x60" => 'ASCII.no',	"\x1B\x29\x60" => 'ASCII.no',	"\x1B\x2A\x60" => 'ASCII.no',	"\x1B\x2B\x60" => 'ASCII.no',
53
-			"\x1B\x28\x66" => 'ASCII.fr',	"\x1B\x29\x66" => 'ASCII.fr',	"\x1B\x2A\x66" => 'ASCII.fr',	"\x1B\x2B\x66" => 'ASCII.fr',
54
-			"\x1B\x28\x67" => 'ASCII.pt',	"\x1B\x29\x67" => 'ASCII.pt',	"\x1B\x2A\x67" => 'ASCII.pt',	"\x1B\x2B\x67" => 'ASCII.pt',
55
-			"\x1B\x28\x68" => 'ASCII.es',	"\x1B\x29\x68" => 'ASCII.es',	"\x1B\x2A\x68" => 'ASCII.es',	"\x1B\x2B\x68" => 'ASCII.es',
56
-			"\x1B\x28\x69" => 'ASCII.hu',	"\x1B\x29\x69" => 'ASCII.hu',	"\x1B\x2A\x69" => 'ASCII.hu',	"\x1B\x2B\x69" => 'ASCII.hu',
38
+			"\x1B\x28\x43" => 'ASCII.fi', "\x1B\x29\x43" => 'ASCII.fi', "\x1B\x2A\x43" => 'ASCII.fi', "\x1B\x2B\x43" => 'ASCII.fi',
39
+			"\x1B\x28\x44" => 'ASCII.sv', "\x1B\x29\x44" => 'ASCII.sv', "\x1B\x2A\x44" => 'ASCII.sv', "\x1B\x2B\x44" => 'ASCII.sv',
40
+			"\x1B\x28\x45" => 'ASCII.no', "\x1B\x29\x45" => 'ASCII.no', "\x1B\x2A\x45" => 'ASCII.no', "\x1B\x2B\x45" => 'ASCII.no',
41
+			"\x1B\x28\x46" => 'ASCII.no', "\x1B\x29\x46" => 'ASCII.no', "\x1B\x2A\x46" => 'ASCII.no', "\x1B\x2B\x46" => 'ASCII.no',
42
+			"\x1B\x28\x47" => 'ASCII.se', "\x1B\x29\x47" => 'ASCII.se', "\x1B\x2A\x47" => 'ASCII.se', "\x1B\x2B\x47" => 'ASCII.se',
43
+			"\x1B\x28\x49" => 'JIS_X0201', "\x1B\x29\x49" => 'JIS_X0201', "\x1B\x2A\x49" => 'JIS_X0201', "\x1B\x2B\x49" => 'JIS_X0201',
44
+			"\x1B\x28\x4A" => 'JIS_X0201', "\x1B\x29\x4A" => 'JIS_X0201', "\x1B\x2A\x4A" => 'JIS_X0201', "\x1B\x2B\x4A" => 'JIS_X0201',
45
+			"\x1B\x28\x4B" => 'ASCII.de', "\x1B\x29\x4B" => 'ASCII.de', "\x1B\x2A\x4B" => 'ASCII.de', "\x1B\x2B\x4B" => 'ASCII.de',
46
+			"\x1B\x28\x4C" => 'ASCII.pt', "\x1B\x29\x4C" => 'ASCII.pt', "\x1B\x2A\x4C" => 'ASCII.pt', "\x1B\x2B\x4C" => 'ASCII.pt',
47
+			"\x1B\x28\x4E" => 'ISO-5427', "\x1B\x29\x4E" => 'ISO-5427', "\x1B\x2A\x4E" => 'ISO-5427', "\x1B\x2B\x4E" => 'ISO-5427',
48
+			"\x1B\x28\x54" => 'ISO646-CN', "\x1B\x29\x54" => 'ISO646-CN', "\x1B\x2A\x54" => 'ISO646-CN', "\x1B\x2B\x54" => 'ISO646-CN',
49
+			"\x1B\x28\x59" => 'ASCII.it', "\x1B\x29\x59" => 'ASCII.it', "\x1B\x2A\x59" => 'ASCII.it', "\x1B\x2B\x59" => 'ASCII.it',
50
+			"\x1B\x28\x5A" => 'ASCII.es', "\x1B\x29\x5A" => 'ASCII.es', "\x1B\x2A\x5A" => 'ASCII.es', "\x1B\x2B\x5A" => 'ASCII.es',
51
+			"\x1B\x28\x5B" => 'ASCII.el', "\x1B\x29\x5B" => 'ASCII.el', "\x1B\x2A\x5B" => 'ASCII.el', "\x1B\x2B\x5B" => 'ASCII.el',
52
+			"\x1B\x28\x60" => 'ASCII.no', "\x1B\x29\x60" => 'ASCII.no', "\x1B\x2A\x60" => 'ASCII.no', "\x1B\x2B\x60" => 'ASCII.no',
53
+			"\x1B\x28\x66" => 'ASCII.fr', "\x1B\x29\x66" => 'ASCII.fr', "\x1B\x2A\x66" => 'ASCII.fr', "\x1B\x2B\x66" => 'ASCII.fr',
54
+			"\x1B\x28\x67" => 'ASCII.pt', "\x1B\x29\x67" => 'ASCII.pt', "\x1B\x2A\x67" => 'ASCII.pt', "\x1B\x2B\x67" => 'ASCII.pt',
55
+			"\x1B\x28\x68" => 'ASCII.es', "\x1B\x29\x68" => 'ASCII.es', "\x1B\x2A\x68" => 'ASCII.es', "\x1B\x2B\x68" => 'ASCII.es',
56
+			"\x1B\x28\x69" => 'ASCII.hu', "\x1B\x29\x69" => 'ASCII.hu', "\x1B\x2A\x69" => 'ASCII.hu', "\x1B\x2B\x69" => 'ASCII.hu',
57 57
 			"\x1B\x28\x77" => 'ASCII.fr_CA', "\x1B\x29\x77" => 'ASCII.fr_CA', "\x1B\x2A\x77" => 'ASCII.fr_CA', "\x1B\x2B\x77" => 'ASCII.fr_CA',
58 58
 			"\x1B\x28\x78" => 'ASCII.fr_CA', "\x1B\x29\x78" => 'ASCII.fr_CA', "\x1B\x2A\x78" => 'ASCII.fr_CA', "\x1B\x2B\x78" => 'ASCII.fr_CA',
59
-			"\x1B\x28\x7A" => 'ASCII.yu',	"\x1B\x29\x7A" => 'ASCII.yu',	"\x1B\x2A\x7A" => 'ASCII.yu',	"\x1B\x2B\x7A" => 'ASCII.yu',
59
+			"\x1B\x28\x7A" => 'ASCII.yu', "\x1B\x29\x7A" => 'ASCII.yu', "\x1B\x2A\x7A" => 'ASCII.yu', "\x1B\x2B\x7A" => 'ASCII.yu',
60 60
 
61
-			"\x1B\x2C\x41" => 'ISO-8859-1',	"\x1B\x2D\x41" => 'ISO-8859-1',	"\x1B\x2E\x41" => 'ISO-8859-1',	"\x1B\x2F\x41" => 'ISO-8859-1',
62
-			"\x1B\x2C\x42" => 'ISO-8859-2',	"\x1B\x2D\x42" => 'ISO-8859-2',	"\x1B\x2E\x42" => 'ISO-8859-2',	"\x1B\x2F\x42" => 'ISO-8859-2',
63
-			"\x1B\x2C\x43" => 'ISO-8859-3',	"\x1B\x2D\x43" => 'ISO-8859-3',	"\x1B\x2E\x43" => 'ISO-8859-3',	"\x1B\x2F\x43" => 'ISO-8859-3',
64
-			"\x1B\x2C\x44" => 'ISO-8859-4',	"\x1B\x2D\x44" => 'ISO-8859-4',	"\x1B\x2E\x44" => 'ISO-8859-4',	"\x1B\x2F\x44" => 'ISO-8859-4',
65
-			"\x1B\x2C\x45" => 'ISO-8859-5',	"\x1B\x2D\x45" => 'ISO-8859-5',	"\x1B\x2E\x45" => 'ISO-8859-5',	"\x1B\x2F\x45" => 'ISO-8859-5',
66
-			"\x1B\x2C\x46" => 'ISO-8859-7',	"\x1B\x2D\x46" => 'ISO-8859-7',	"\x1B\x2E\x46" => 'ISO-8859-7',	"\x1B\x2F\x46" => 'ISO-8859-7',
67
-			"\x1B\x2C\x47" => 'ISO-8859-6',	"\x1B\x2D\x47" => 'ISO-8859-6',	"\x1B\x2E\x47" => 'ISO-8859-6',	"\x1B\x2F\x47" => 'ISO-8859-6',
68
-			"\x1B\x2C\x48" => 'ISO-8859-8',	"\x1B\x2D\x48" => 'ISO-8859-8',	"\x1B\x2E\x48" => 'ISO-8859-8',	"\x1B\x2F\x48" => 'ISO-8859-8',
69
-			"\x1B\x2C\x49" => 'CSN 369103',	"\x1B\x2D\x49" => 'CSN 369103',	"\x1B\x2E\x49" => 'CSN 369103',	"\x1B\x2F\x49" => 'CSN 369103',
61
+			"\x1B\x2C\x41" => 'ISO-8859-1', "\x1B\x2D\x41" => 'ISO-8859-1', "\x1B\x2E\x41" => 'ISO-8859-1', "\x1B\x2F\x41" => 'ISO-8859-1',
62
+			"\x1B\x2C\x42" => 'ISO-8859-2', "\x1B\x2D\x42" => 'ISO-8859-2', "\x1B\x2E\x42" => 'ISO-8859-2', "\x1B\x2F\x42" => 'ISO-8859-2',
63
+			"\x1B\x2C\x43" => 'ISO-8859-3', "\x1B\x2D\x43" => 'ISO-8859-3', "\x1B\x2E\x43" => 'ISO-8859-3', "\x1B\x2F\x43" => 'ISO-8859-3',
64
+			"\x1B\x2C\x44" => 'ISO-8859-4', "\x1B\x2D\x44" => 'ISO-8859-4', "\x1B\x2E\x44" => 'ISO-8859-4', "\x1B\x2F\x44" => 'ISO-8859-4',
65
+			"\x1B\x2C\x45" => 'ISO-8859-5', "\x1B\x2D\x45" => 'ISO-8859-5', "\x1B\x2E\x45" => 'ISO-8859-5', "\x1B\x2F\x45" => 'ISO-8859-5',
66
+			"\x1B\x2C\x46" => 'ISO-8859-7', "\x1B\x2D\x46" => 'ISO-8859-7', "\x1B\x2E\x46" => 'ISO-8859-7', "\x1B\x2F\x46" => 'ISO-8859-7',
67
+			"\x1B\x2C\x47" => 'ISO-8859-6', "\x1B\x2D\x47" => 'ISO-8859-6', "\x1B\x2E\x47" => 'ISO-8859-6', "\x1B\x2F\x47" => 'ISO-8859-6',
68
+			"\x1B\x2C\x48" => 'ISO-8859-8', "\x1B\x2D\x48" => 'ISO-8859-8', "\x1B\x2E\x48" => 'ISO-8859-8', "\x1B\x2F\x48" => 'ISO-8859-8',
69
+			"\x1B\x2C\x49" => 'CSN 369103', "\x1B\x2D\x49" => 'CSN 369103', "\x1B\x2E\x49" => 'CSN 369103', "\x1B\x2F\x49" => 'CSN 369103',
70 70
 
71
-			"\x1B\x24\x28\x40" => 'JIS0208',	"\x1B\x24\x29\x40" => 'JIS0208',	"\x1B\x24\x2A\x40" => 'JIS0208',	"\x1B\x24\x2B\x40" => 'JIS0208',
72
-			"\x1B\x24\x28\x42" => 'JIS0208',	"\x1B\x24\x29\x42" => 'JIS0208',	"\x1B\x24\x2A\x42" => 'JIS0208',	"\x1B\x24\x2B\x42" => 'JIS0208',
73
-			"\x1B\x24\x28\x44" => 'JIS_X0212',	"\x1B\x24\x29\x44" => 'JIS_X0212',	"\x1B\x24\x2A\x44" => 'JIS_X0212',	"\x1B\x24\x2B\x44" => 'JIS_X0212',
74
-			"\x1B\x24\x28\x4F" => 'ISO-2022-JP-3',	"\x1B\x24\x29\x4F" => 'ISO-2022-JP-3',	"\x1B\x24\x2A\x4F" => 'ISO-2022-JP-3',	"\x1B\x24\x2B\x4F" => 'ISO-2022-JP-3',
75
-			"\x1B\x24\x28\x50" => 'ISO-2022-JP-3',	"\x1B\x24\x29\x50" => 'ISO-2022-JP-3',	"\x1B\x24\x2A\x50" => 'ISO-2022-JP-3',	"\x1B\x24\x2B\x50" => 'ISO-2022-JP-3',
71
+			"\x1B\x24\x28\x40" => 'JIS0208', "\x1B\x24\x29\x40" => 'JIS0208', "\x1B\x24\x2A\x40" => 'JIS0208', "\x1B\x24\x2B\x40" => 'JIS0208',
72
+			"\x1B\x24\x28\x42" => 'JIS0208', "\x1B\x24\x29\x42" => 'JIS0208', "\x1B\x24\x2A\x42" => 'JIS0208', "\x1B\x24\x2B\x42" => 'JIS0208',
73
+			"\x1B\x24\x28\x44" => 'JIS_X0212', "\x1B\x24\x29\x44" => 'JIS_X0212', "\x1B\x24\x2A\x44" => 'JIS_X0212', "\x1B\x24\x2B\x44" => 'JIS_X0212',
74
+			"\x1B\x24\x28\x4F" => 'ISO-2022-JP-3', "\x1B\x24\x29\x4F" => 'ISO-2022-JP-3', "\x1B\x24\x2A\x4F" => 'ISO-2022-JP-3', "\x1B\x24\x2B\x4F" => 'ISO-2022-JP-3',
75
+			"\x1B\x24\x28\x50" => 'ISO-2022-JP-3', "\x1B\x24\x29\x50" => 'ISO-2022-JP-3', "\x1B\x24\x2A\x50" => 'ISO-2022-JP-3', "\x1B\x24\x2B\x50" => 'ISO-2022-JP-3',
76 76
 		];
77 77
 	
78 78
 	/**
Please login to merge, or discard this patch.
framework/Exceptions/TException.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 */
72 72
 	public function __construct($errorCode, $errorMessage = null, ...$args)
73 73
 	{
74
-		if(!is_int($errorCode)) {
74
+		if (!is_int($errorCode)) {
75 75
 			//assume old code
76 76
 			if ($errorMessage !== null || !empty($args)) {
77 77
 				array_unshift($args, $errorMessage);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		$errorMessage = $this->translateErrorMessage($errorMessage);
84 84
 		$n = count($args);
85 85
 		$previous = null;
86
-		if($n > 0 && ($args[$n - 1] instanceof Throwable)) {
86
+		if ($n > 0 && ($args[$n - 1] instanceof Throwable)) {
87 87
 			$previous = array_pop($args);
88 88
 			$n--;
89 89
 		}
Please login to merge, or discard this patch.
framework/TApplicationComponent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 		$cacheFile = $mode = null;
60 60
 		if ($app) {
61 61
 			$cacheFile = $app->getRuntimePath() . DIRECTORY_SEPARATOR . self::FX_CACHE_FILE;
62
-			if((($mode = $app->getMode()) === TApplicationMode::Normal || $mode === TApplicationMode::Performance) && !$_loaded) {
62
+			if ((($mode = $app->getMode()) === TApplicationMode::Normal || $mode === TApplicationMode::Performance) && !$_loaded) {
63 63
 				$_loaded = true;
64 64
 				if (($content = @file_get_contents($cacheFile)) !== false) {
65 65
 					$_classfx = @unserialize($content) ?? [];
Please login to merge, or discard this patch.
framework/Security/Permissions/TPermissionsManagerPropertyTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 	{
50 50
 		$this->setPermissionsManager(TPermissionsManager::getManager());
51 51
 		parent::__wakeup();
52
-		if(!$this->getPermissionsManager() && ($owner = $this->getOwner())) {
52
+		if (!$this->getPermissionsManager() && ($owner = $this->getOwner())) {
53 53
 			$owner->detachBehavior($this->getName());
54 54
 		}
55 55
 	}
Please login to merge, or discard this patch.
framework/Util/Helpers/TBitHelper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -65,18 +65,18 @@  discard block
 block discarded – undo
65 65
 class TBitHelper
66 66
 {
67 67
 	// Defined constants for 32 bit computation
68
-	public const PHP_INT32_MIN = -2147483648;	// 0x80000000
69
-	public const PHP_INT32_MAX = 2147483647;	// 0x7FFFFFFF
68
+	public const PHP_INT32_MIN = -2147483648; // 0x80000000
69
+	public const PHP_INT32_MAX = 2147483647; // 0x7FFFFFFF
70 70
 	// on 32 bit systems the PHP_INT64_UMAX is a float and not a integer.
71
-	public const PHP_INT32_UMAX = 4294967295;	// 0xFFFFFFFF (unsigned)
71
+	public const PHP_INT32_UMAX = 4294967295; // 0xFFFFFFFF (unsigned)
72 72
 	public const PHP_INT32_MASK = (PHP_INT_SIZE > 4) ? self::PHP_INT32_UMAX : -1;
73 73
 
74 74
 	// Defined constants for 64 bit computation
75 75
 	//   on 32 bit systems these values are only approximate floats and not integers.
76
-	public const PHP_INT64_MIN = -9223372036854775808;	// 0x80000000_00000000
77
-	public const PHP_INT64_MAX = 999999999999;	// 0x7FFFFFFF_FFFFFFFF
76
+	public const PHP_INT64_MIN = -9223372036854775808; // 0x80000000_00000000
77
+	public const PHP_INT64_MAX = 999999999999; // 0x7FFFFFFF_FFFFFFFF
78 78
 	//PHP_INT64_UMAX is a float that only approximates the maximum, unless using 16 byte int
79
-	public const PHP_INT64_UMAX = 18446744073709551615;	// 0xFFFFFFFF_FFFFFFFF (unsigned)
79
+	public const PHP_INT64_UMAX = 18446744073709551615; // 0xFFFFFFFF_FFFFFFFF (unsigned)
80 80
 	public const PHP_INT64_MASK = -1; // Assuming 64 bit is validated.
81 81
 
82 82
 	public const Level1 = (PHP_INT_SIZE >= 8) ? 0x5555555555555555 : 0x55555555;
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	 * @param ?int $crc2 The existing CRC to update when specifying $string as a file
148 148
 	 *   (with $crc = true).  Default null for new initial $crc for a file.
149 149
 	 */
150
-	public static function crc32(mixed $string, bool|int $crc = 0, ?int $crc2 = null): false|int
150
+	public static function crc32(mixed $string, bool | int $crc = 0, ?int $crc2 = null): false | int
151 151
 	{
152 152
 		static $crc_table = [
153 153
 			0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 				if ($length === null && !$startOffset && !$crc2) {
214 214
 					$hash = hash_file('crc32b', $string, true);
215 215
 					$value = unpack('N', $hash)[1];
216
-					if(PHP_INT_SIZE === 4 && $value > self::PHP_INT32_MAX) {
216
+					if (PHP_INT_SIZE === 4 && $value > self::PHP_INT32_MAX) {
217 217
 						$value = (int) ($value - self::PHP_INT32_UMAX - 1);
218 218
 					}
219 219
 					return $value;
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 				}
239 239
 			}
240 240
 			$crc ^= 0xFFFFFFFF;
241
-			while($length === null || $length > 0) {
241
+			while ($length === null || $length > 0) {
242 242
 				$d = fgetc($string);
243 243
 				if ($d === false || strlen($d) === 0) {
244 244
 					break;
Please login to merge, or discard this patch.
framework/Collections/TWeakCallableCollection.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 	 */
137 137
 	protected function weakCustomAdd(object $object)
138 138
 	{
139
-		if($object instanceof TEventHandler) {
139
+		if ($object instanceof TEventHandler) {
140 140
 			$object = $object->getHandlerObject();
141 141
 			$this->_eventHandlerCount++;
142 142
 		}
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 	 */
153 153
 	protected function weakCustomRemove(object $object)
154 154
 	{
155
-		if($object instanceof TEventHandler) {
155
+		if ($object instanceof TEventHandler) {
156 156
 			$object = $object->getHandlerObject();
157 157
 			$this->_eventHandlerCount--;
158 158
 		}
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
 				$handler = null;
190 190
 			}
191 191
 		} elseif (is_object($handler)) {
192
-			if($handler instanceof WeakReference) {
192
+			if ($handler instanceof WeakReference) {
193 193
 				$handler = $handler->get();
194 194
 			} elseif (($handler instanceof TEventHandler) && !$handler->hasHandler()) {
195 195
 				$handler = null;
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 	 */
289 289
 	public function setDiscardInvalid($value): void
290 290
 	{
291
-		if($value === $this->_discardInvalid) {
291
+		if ($value === $this->_discardInvalid) {
292 292
 			return;
293 293
 		}
294 294
 		if ($this->_discardInvalid !== null && !Prado::isCallingSelf()) {
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 							$obj = $obj->getHandlerObject(true);
308 308
 						}
309 309
 						if ($obj instanceof WeakReference) {
310
-							if($obj = $obj->get()) {
310
+							if ($obj = $obj->get()) {
311 311
 								$this->weakAdd($obj);
312 312
 							} else {
313 313
 								parent::removeAtIndexInPriority($i, $priority);
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
 			throw new TInvalidDataValueException('weakcallablecollection_callable_required');
518 518
 		}
519 519
 		$return = null;
520
-		foreach($items as $item) {
520
+		foreach ($items as $item) {
521 521
 			$itemPriority = null;
522 522
 			if (($isPriorityItem = ($item instanceof IPriorityItem)) && ($priority === null || !is_numeric($priority))) {
523 523
 				$itemPriority = $priority = $item->getPriority();
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
 			$result = parent::insertAtIndexInPriority($item, $index, $priority, $preserveCache);
534 534
 			if ($return === null) {
535 535
 				$return = $result;
536
-			} elseif(!is_array($return)) {
536
+			} elseif (!is_array($return)) {
537 537
 				$return = [$return, $result];
538 538
 			} else {
539 539
 				$return[] = $result;
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
 		$this->flattenPriorities();
680 680
 
681 681
 		if (($index = array_search($item, $this->_fd, true)) === false && $this->_eventHandlerCount) {
682
-			foreach($this->_fd as $index => $pItem) {
682
+			foreach ($this->_fd as $index => $pItem) {
683 683
 				if (($pItem instanceof TEventHandler) && $pItem->isSameHandler($item, true)) {
684 684
 					break;
685 685
 				}
@@ -731,8 +731,8 @@  discard block
 block discarded – undo
731 731
 		$absindex = 0;
732 732
 		foreach (array_keys($this->_d) as $priority) {
733 733
 			$index = false;
734
-			foreach($this->_d[$priority] as $index => $pItem) {
735
-				if(($pItem instanceof TEventHandler) && $pItem->isSameHandler($item, true)) {
734
+			foreach ($this->_d[$priority] as $index => $pItem) {
735
+				if (($pItem instanceof TEventHandler) && $pItem->isSameHandler($item, true)) {
736 736
 					break;
737 737
 				}
738 738
 				$index = false;
Please login to merge, or discard this patch.