Passed
Push — master ( 54b931...b32b47 )
by Observer
01:26
created
after_install.php 3 patches
Braces   +12 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,17 +4,22 @@
 block discarded – undo
4 4
 
5 5
 function dir_copy (string $from, string $to): bool
6 6
 {
7
-    if (!is_dir ($from))
8
-        return false;
7
+    if (!is_dir ($from)) {
8
+            return false;
9
+    }
9 10
 
10
-    if (!is_dir ($to))
11
-        dir_create ($to);
11
+    if (!is_dir ($to)) {
12
+            dir_create ($to);
13
+    }
12 14
 
13
-    foreach (array_slice (scandir ($from), 2) as $file)
14
-        if (is_dir ($f = $from .'/'. $file))
15
+    foreach (array_slice (scandir ($from), 2) as $file) {
16
+            if (is_dir ($f = $from .'/'. $file))
15 17
             dir_copy ($f, $to .'/'. $file);
18
+    }
16 19
 
17
-        else copy ($f, $to .'/'. $file);
20
+        else {
21
+            copy ($f, $to .'/'. $file);
22
+        }
18 23
 
19 24
     return true;
20 25
 }
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,4 +40,4 @@
 block discarded – undo
40 40
 unlink (__FILE__);
41 41
 
42 42
 echo '    Configuration completed'. PHP_EOL .
43
-     '    Thank for installing winforms-php/VoidFramework!'. PHP_EOL . PHP_EOL;
43
+        '    Thank for installing winforms-php/VoidFramework!'. PHP_EOL . PHP_EOL;
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,44 +1,44 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-echo '    Configuring VoidFramework...'. PHP_EOL;
3
+echo '    Configuring VoidFramework...'.PHP_EOL;
4 4
 
5
-function dir_copy (string $from, string $to): bool
5
+function dir_copy(string $from, string $to): bool
6 6
 {
7
-    if (!is_dir ($from))
7
+    if (!is_dir($from))
8 8
         return false;
9 9
 
10
-    if (!is_dir ($to))
11
-        dir_create ($to);
10
+    if (!is_dir($to))
11
+        dir_create($to);
12 12
 
13
-    foreach (array_slice (scandir ($from), 2) as $file)
14
-        if (is_dir ($f = $from .'/'. $file))
15
-            dir_copy ($f, $to .'/'. $file);
13
+    foreach (array_slice(scandir($from), 2) as $file)
14
+        if (is_dir($f = $from.'/'.$file))
15
+            dir_copy($f, $to.'/'.$file);
16 16
 
17
-        else copy ($f, $to .'/'. $file);
17
+        else copy($f, $to.'/'.$file);
18 18
 
19 19
     return true;
20 20
 }
21 21
 
22
-$info = file_exists (QERO_DIR .'/qero-info.json') ?
23
-    json_decode (file_get_contents (QERO_DIR .'/qero-info.json'), true) : array ();
22
+$info = file_exists(QERO_DIR.'/qero-info.json') ?
23
+    json_decode (file_get_contents(QERO_DIR.'/qero-info.json'), true) : array();
24 24
 
25 25
 $info['scripts']['start'] = '"qero-packages/winforms-php/VoidFramework/core/VoidCore.exe" "app/start.php"';
26 26
 
27
-file_put_contents (QERO_DIR .'/qero-info.json', json_encode ($info, defined ('JSON_PRETTY_PRINT') ?
27
+file_put_contents(QERO_DIR.'/qero-info.json', json_encode($info, defined('JSON_PRETTY_PRINT') ?
28 28
     constant ('JSON_PRETTY_PRINT') : 0));
29
-file_put_contents (QERO_DIR .'/start.bat', '@echo off
29
+file_put_contents(QERO_DIR.'/start.bat', '@echo off
30 30
 '. $info['scripts']['start']);
31 31
 
32
-if (!is_dir (QERO_DIR .'/app'))
32
+if (!is_dir(QERO_DIR.'/app'))
33 33
 {
34
-    echo '    Configuring application...'. PHP_EOL;
34
+    echo '    Configuring application...'.PHP_EOL;
35 35
 
36
-    mkdir (QERO_DIR .'/app');
37
-    dir_copy (__DIR__ .'/app_bundle', QERO_DIR .'/app');
36
+    mkdir(QERO_DIR.'/app');
37
+    dir_copy(__DIR__.'/app_bundle', QERO_DIR.'/app');
38 38
 }
39 39
 
40
-Qero\dir_delete (__DIR__ .'/app_bundle');
41
-unlink (__FILE__);
40
+Qero\dir_delete(__DIR__.'/app_bundle');
41
+unlink(__FILE__);
42 42
 
43
-echo '    Configuration completed'. PHP_EOL .
44
-     '    Thank for installing winforms-php/VoidFramework!'. PHP_EOL . PHP_EOL;
43
+echo '    Configuration completed'.PHP_EOL.
44
+     '    Thank for installing winforms-php/VoidFramework!'.PHP_EOL.PHP_EOL;
Please login to merge, or discard this patch.
engine/common/Constants.php 3 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -338,8 +338,9 @@
 block discarded – undo
338 338
 	'clLight'  	  => $converter->fromHtml ('#EEEEEE')
339 339
 ];
340 340
 
341
-foreach ($constants as $name => $value)
341
+foreach ($constants as $name => $value) {
342 342
 	define ($name, $value);
343
+}
343 344
 
344 345
 $argv = START_PARAMS;
345 346
 $argc = sizeof ($argv);
Please login to merge, or discard this patch.
Indentation   +299 added lines, -299 removed lines patch added patch discarded remove patch
@@ -8,338 +8,338 @@
 block discarded – undo
8 8
 $converter = new NetClass ('System.Drawing.ColorTranslator');
9 9
 
10 10
 $constants = [
11
-	# Информация об окружении
11
+    # Информация об окружении
12 12
 	
13
-	'EXE_NAME'     => $APPLICATION->executablePath,
14
-	'DOC_ROOT'     => dirname ($APPLICATION->executablePath),
15
-	'IS_ADMIN'     => is_writable (getenv ('SystemRoot')),
16
-	'START_PARAMS' => $params,
17
-	'USERNAME'	   => $env->username,
13
+    'EXE_NAME'     => $APPLICATION->executablePath,
14
+    'DOC_ROOT'     => dirname ($APPLICATION->executablePath),
15
+    'IS_ADMIN'     => is_writable (getenv ('SystemRoot')),
16
+    'START_PARAMS' => $params,
17
+    'USERNAME'	   => $env->username,
18 18
 
19
-	# Константы MessageBox'а
19
+    # Константы MessageBox'а
20 20
 	
21
-	'MB_YESNO' 			  => 4,
22
-	'MB_YESNOCANCEL' 	  => 3,
23
-	'MB_OK' 			  => 0,
24
-	'MB_OKCANCEL' 		  => 1,
25
-	'MB_RETRYCANCEL' 	  => 5,
26
-	'MB_ABORTRETRYIGNORE' => 2,
27
-	'MBI_ASTERISK' 		  => 64,
28
-	'MBI_ERROR' 		  => 16,
29
-	'MBI_EXCLAMATION' 	  => 48,
30
-	'MBI_HAND' 			  => 16,
31
-	'MBI_INFORMATION' 	  => 64,
32
-	'MBI_NONE' 			  => 0,
33
-	'MBI_QUESTION' 		  => 32,
34
-	'MBI_STOP' 			  => 16,
35
-	'MBI_WARNING' 		  => 48,
36
-	'MBDB_1' 			  => 0,
37
-	'MBDB_2' 			  => 256,
38
-	'MBDB_3' 			  => 512,
21
+    'MB_YESNO' 			  => 4,
22
+    'MB_YESNOCANCEL' 	  => 3,
23
+    'MB_OK' 			  => 0,
24
+    'MB_OKCANCEL' 		  => 1,
25
+    'MB_RETRYCANCEL' 	  => 5,
26
+    'MB_ABORTRETRYIGNORE' => 2,
27
+    'MBI_ASTERISK' 		  => 64,
28
+    'MBI_ERROR' 		  => 16,
29
+    'MBI_EXCLAMATION' 	  => 48,
30
+    'MBI_HAND' 			  => 16,
31
+    'MBI_INFORMATION' 	  => 64,
32
+    'MBI_NONE' 			  => 0,
33
+    'MBI_QUESTION' 		  => 32,
34
+    'MBI_STOP' 			  => 16,
35
+    'MBI_WARNING' 		  => 48,
36
+    'MBDB_1' 			  => 0,
37
+    'MBDB_2' 			  => 256,
38
+    'MBDB_3' 			  => 512,
39 39
 	
40
-	# Константы DialogResult
40
+    # Константы DialogResult
41 41
 	
42
-	'drOk'	   => 1,
43
-	'drYes'    => 6,
44
-	'drNo' 	   => 7,
45
-	'drCancel' => 2,
46
-	'drRetry'  => 4,
47
-	'drAbort'  => 3,
48
-	'drIgnore' => 5,
49
-	'drNone'   => 0,
42
+    'drOk'	   => 1,
43
+    'drYes'    => 6,
44
+    'drNo' 	   => 7,
45
+    'drCancel' => 2,
46
+    'drRetry'  => 4,
47
+    'drAbort'  => 3,
48
+    'drIgnore' => 5,
49
+    'drNone'   => 0,
50 50
 	
51
-	# Константы форм
51
+    # Константы форм
52 52
 	
53
-	'fbsNone'			   => 0,
54
-	'fbsSingle'			   => 1,
55
-	'fbs3D'				   => 2,
56
-	'fbsDialog'			   => 3,
57
-	'fbsSizable'		   => 4,
58
-	'fbsToolWindow'		   => 5,
59
-	'fbsSizableToolWindow' => 6,
60
-
61
-	'fwsNormal'	   => 0,
62
-	'fwsMinimized' => 1,
63
-	'fwsMaximized' => 2,
64
-
65
-	'fspManual' 				=> 0,
66
-	'fspCenterScreen' 			=> 1,
67
-	'fspWindowsDefaultLocation' => 2,
68
-	'fspWindowsDefaultBounds'   => 3,
69
-	'fspCenterParent' 			=> 4,
70
-
71
-	# Константы стиля оконтовки
72
-
73
-	'bsNone' 		=> 0,
74
-	'bsFixedSingle' => 1,
75
-	'bsFixed3D' 	=> 2,
76
-
77
-	# Константы выравнивания
78
-
79
-	'alTopLeft' 	 => 1,
80
-	'alTopCenter' 	 => 2,
81
-	'alTopRight' 	 => 4,
82
-	'alMiddleLeft' 	 => 16,
83
-	'alMiddleCenter' => 32,
84
-	'alMiddleRight'  => 64,
85
-	'alBottomLeft' 	 => 256,
86
-	'alBottomCenter' => 512,
87
-	'alBottomRight'  => 1024,
88
-
89
-	# Константы притягивания (Anchor)
90
-
91
-	'acNone'   => 0,
92
-	'acTop'	   => 1,
93
-	'acBottom' => 2,
94
-	'acLeft'   => 4,
95
-	'acRight'  => 8,
96
-
97
-	# Константы SizeMode-параметра PictureBox'а
98
-
99
-	'smNormal' 		 => 0,
100
-	'smStretchImage' => 1,
101
-	'smAutoSize' 	 => 2,
102
-	'smCenterImage'  => 3,
103
-	'smZoom' 		 => 4,
104
-
105
-	# Константы View-параметра ListView'а
53
+    'fbsNone'			   => 0,
54
+    'fbsSingle'			   => 1,
55
+    'fbs3D'				   => 2,
56
+    'fbsDialog'			   => 3,
57
+    'fbsSizable'		   => 4,
58
+    'fbsToolWindow'		   => 5,
59
+    'fbsSizableToolWindow' => 6,
60
+
61
+    'fwsNormal'	   => 0,
62
+    'fwsMinimized' => 1,
63
+    'fwsMaximized' => 2,
64
+
65
+    'fspManual' 				=> 0,
66
+    'fspCenterScreen' 			=> 1,
67
+    'fspWindowsDefaultLocation' => 2,
68
+    'fspWindowsDefaultBounds'   => 3,
69
+    'fspCenterParent' 			=> 4,
70
+
71
+    # Константы стиля оконтовки
72
+
73
+    'bsNone' 		=> 0,
74
+    'bsFixedSingle' => 1,
75
+    'bsFixed3D' 	=> 2,
76
+
77
+    # Константы выравнивания
78
+
79
+    'alTopLeft' 	 => 1,
80
+    'alTopCenter' 	 => 2,
81
+    'alTopRight' 	 => 4,
82
+    'alMiddleLeft' 	 => 16,
83
+    'alMiddleCenter' => 32,
84
+    'alMiddleRight'  => 64,
85
+    'alBottomLeft' 	 => 256,
86
+    'alBottomCenter' => 512,
87
+    'alBottomRight'  => 1024,
88
+
89
+    # Константы притягивания (Anchor)
90
+
91
+    'acNone'   => 0,
92
+    'acTop'	   => 1,
93
+    'acBottom' => 2,
94
+    'acLeft'   => 4,
95
+    'acRight'  => 8,
96
+
97
+    # Константы SizeMode-параметра PictureBox'а
98
+
99
+    'smNormal' 		 => 0,
100
+    'smStretchImage' => 1,
101
+    'smAutoSize' 	 => 2,
102
+    'smCenterImage'  => 3,
103
+    'smZoom' 		 => 4,
104
+
105
+    # Константы View-параметра ListView'а
106 106
 	
107
-	'vwLargeIcon' => 0,
108
-	'vwDetails'	  => 1,
109
-	'vwSmallIcon' => 2,
110
-	'vwList' 	  => 3,
111
-	'vwTile' 	  => 4,
107
+    'vwLargeIcon' => 0,
108
+    'vwDetails'	  => 1,
109
+    'vwSmallIcon' => 2,
110
+    'vwList' 	  => 3,
111
+    'vwTile' 	  => 4,
112 112
 
113
-	# Константы dropDownStyle компонента ComboBox
113
+    # Константы dropDownStyle компонента ComboBox
114 114
 
115
-	'ddSimple'		 => 0,
116
-	'ddDropDown' 	 => 1,
117
-	'ddDropDownList' => 2,
115
+    'ddSimple'		 => 0,
116
+    'ddDropDown' 	 => 1,
117
+    'ddDropDownList' => 2,
118 118
 
119
-	# Константы причины закрытия формы
119
+    # Константы причины закрытия формы
120 120
 	
121
-	'fcrNone'                => 0,
122
-	'fcrWindowsShutDown'     => 1,
123
-	'fcrMdiFormClosing'      => 2,
124
-	'fcrUserClosing'         => 3,
125
-	'fcrTaskManagerClosing'  => 4,
126
-	'fcrFormOwnerClosing'    => 5,
127
-	'fcrApplicationExitCall' => 6,
121
+    'fcrNone'                => 0,
122
+    'fcrWindowsShutDown'     => 1,
123
+    'fcrMdiFormClosing'      => 2,
124
+    'fcrUserClosing'         => 3,
125
+    'fcrTaskManagerClosing'  => 4,
126
+    'fcrFormOwnerClosing'    => 5,
127
+    'fcrApplicationExitCall' => 6,
128 128
 	
129
-	# Константы дока
129
+    # Константы дока
130 130
 	
131
-	'dsBottom' => 2,
132
-	'dsFill'   => 5,
133
-	'dsLeft'   => 3,
134
-	'dsNone'   => 0,
135
-	'dsRight'  => 4,
136
-	'dsTop'    => 1,
131
+    'dsBottom' => 2,
132
+    'dsFill'   => 5,
133
+    'dsLeft'   => 3,
134
+    'dsNone'   => 0,
135
+    'dsRight'  => 4,
136
+    'dsTop'    => 1,
137 137
 	
138
-	# Константы FCTB.Language
138
+    # Константы FCTB.Language
139 139
 	
140
-	'langCSharp' => 1,
141
-	'langCustom' => 2,
142
-	'langHTML' 	 => 3,
143
-	'langJS' 	 => 4,
144
-	'langLua'	 => 5,
145
-	'langPHP' 	 => 6,
146
-	'langSQL' 	 => 7,
147
-	'langVB' 	 => 8,
148
-	'langXML' 	 => 9,
140
+    'langCSharp' => 1,
141
+    'langCustom' => 2,
142
+    'langHTML' 	 => 3,
143
+    'langJS' 	 => 4,
144
+    'langLua'	 => 5,
145
+    'langPHP' 	 => 6,
146
+    'langSQL' 	 => 7,
147
+    'langVB' 	 => 8,
148
+    'langXML' 	 => 9,
149 149
 	
150
-	# Константы видимости окна процесса
150
+    # Константы видимости окна процесса
151 151
 	
152
-	'pwsHidden'    => 0,
153
-	'pwsMaximized' => 3,
154
-	'pwsMinimized' => 2,
155
-	'pwsNormal'    => 1,
152
+    'pwsHidden'    => 0,
153
+    'pwsMaximized' => 3,
154
+    'pwsMinimized' => 2,
155
+    'pwsNormal'    => 1,
156 156
 	
157
-	# Константы запуска
157
+    # Константы запуска
158 158
 	
159
-	'runNo'     => 0,
160
-	'runYes'    => 1,
161
-	'runThread' => 2,
159
+    'runNo'     => 0,
160
+    'runYes'    => 1,
161
+    'runThread' => 2,
162 162
 
163
-	# Константы стиля ProgressBar'а
163
+    # Константы стиля ProgressBar'а
164 164
 
165
-	'pbBlocks'	   => 0,
166
-	'pbContinuous' => 1,
167
-	'pbMarquee'    => 2,
165
+    'pbBlocks'	   => 0,
166
+    'pbContinuous' => 1,
167
+    'pbMarquee'    => 2,
168 168
 
169
-	# Константы свойства FlatStyle
169
+    # Константы свойства FlatStyle
170 170
 	
171
-	'flFlat'	 => 0,
172
-	'flPopup'	 => 1,
173
-	'flStandard' => 2,
174
-	'flSystem'   => 3,
171
+    'flFlat'	 => 0,
172
+    'flPopup'	 => 1,
173
+    'flStandard' => 2,
174
+    'flSystem'   => 3,
175 175
 
176
-	# Константы свойства DrawMode
176
+    # Константы свойства DrawMode
177 177
 
178
-	'dwNormal'			  => 0,
179
-	'dwOwnerDrawFixed'	  => 1,
180
-	'dwOwnerDrawVariable' => 2,
178
+    'dwNormal'			  => 0,
179
+    'dwOwnerDrawFixed'	  => 1,
180
+    'dwOwnerDrawVariable' => 2,
181 181
 
182
-	# Константы свойства SizeMode PictureBox'а
182
+    # Константы свойства SizeMode PictureBox'а
183 183
 
184
-	'smNormal' 		 => 0,
185
-	'smStretchImage' => 1,
186
-	'smAutoSize'	 => 2,
187
-	'smCenterImage'  => 3,
188
-	'smZoom'		 => 4,
184
+    'smNormal' 		 => 0,
185
+    'smStretchImage' => 1,
186
+    'smAutoSize'	 => 2,
187
+    'smCenterImage'  => 3,
188
+    'smZoom'		 => 4,
189 189
 
190
-	# Цветовые константы
190
+    # Цветовые константы
191 191
 	
192
-	'clAliceBlue'			 => 0xFFF0F8FF,
193
-	'clAntiqueWhite'		 => 0xFFFAEBD7,
194
-	'clAqua'				 => 0xFF00FFFF,
195
-	'clAquamarine'			 => 0xFF7FFFD4,
196
-	'clAzure'				 => 0xFFF0FFFF,
197
-	'clBeige'				 => 0xFFF5F5DC,
198
-	'clBisque'				 => 0xFFFFE4C4,
199
-	'clBlack'				 => 0xFF000000,
200
-	'clBlanchedAlmond'		 => 0xFFFFEBCD,
201
-	'clBlue'				 => 0xFF0000FF,
202
-	'clBlueViolet'			 => 0xFF8A2BE2,
203
-	'clBrown'				 => 0xFFA52A2A,
204
-	'clBurlyWood'			 => 0xFFDEB887,
205
-	'clCadetBlue' 			 => 0xFF5F9EA0,
206
-	'clChartreuse'			 => 0xFF7FFF00,
207
-	'clChocolate'			 => 0xFFD2691E,
208
-	'clCoral'				 => 0xFFFF7F50,
209
-	'clCornflowerBlue'		 => 0xFF6495ED,
210
-	'clCornsilk'			 => 0xFFFFF8DC,
211
-	'clCrimson'				 => 0xFFDC143C,
212
-	'clCyan'				 => 0xFF00FFFF,
213
-	'clDarkBlue'			 => 0xFF00008B,
214
-	'clDarkCyan'			 => 0xFF008B8B,
215
-	'clDarkGoldenrod'		 => 0xFFB8860B,
216
-	'clDarkGray'			 => 0xFFA9A9A9,
217
-	'clDarkGreen'			 => 0xFF006400,
218
-	'clDarkKhaki'			 => 0xFFBDB76B,
219
-	'clDarkMagenta'			 => 0xFF8B008B,
220
-	'clDarkOliveGreen'		 => 0xFF556B2F,
221
-	'clDarkOrange'			 => 0xFFFF8C00,
222
-	'clDarkOrchid'			 => 0xFF9932CC,
223
-	'clDarkRed'				 => 0xFF8B0000,
224
-	'clDarkSalmon'			 => 0xFFE9967A,
225
-	'clDarkSeaGreen'		 => 0xFF8FBC8F,
226
-	'clDarkSlateBlue'		 => 0xFF483D8B,
227
-	'clDarkSlateGray'		 => 0xFF2F4F4F,
228
-	'clDarkTurquoise'		 => 0xFF00CED1,
229
-	'clDarkViolet'			 => 0xFF9400D3,
230
-	'clDeepPink'			 => 0xFFFF1493,
231
-	'clDeepSkyBlue'			 => 0xFF00BFFF,
232
-	'clDimGray'				 => 0xFF696969,
233
-	'clDodgerBlue'			 => 0xFF1E90FF,
234
-	'clFirebrick'			 => 0xFFB22222,
235
-	'clFloralWhite'			 => 0xFFFFFAF0,
236
-	'clForestGreen'			 => 0xFF228B22,
237
-	'clFuchsia'				 => 0xFFFF00FF,
238
-	'clGainsboro'			 => 0xFFDCDCDC,
239
-	'clGhostWhite'			 => 0xFFF8F8FF,
240
-	'clGold'				 => 0xFFFFD700,
241
-	'clGoldenrod'			 => 0xFFDAA520,
242
-	'clGray'				 => 0xFF808080,
243
-	'clGreen'				 => 0xFF008000,
244
-	'clGreenYellow'			 => 0xFFADFF2F,
245
-	'clHoneydew'			 => 0xFFF0FFF0,
246
-	'clHotPink'				 => 0xFFFF69B4,
247
-	'clIndianRed'			 => 0xFFCD5C5C,
248
-	'clIndigo'				 => 0xFF4B0082,
249
-	'clIvory'				 => 0xFFFFFFF0,
250
-	'clKhaki'				 => 0xFFF0E68C,
251
-	'clLavender'			 => 0xFFE6E6FA,
252
-	'clLavenderBlush'		 => 0xFFFFF0F5,
253
-	'clLawnGreen'			 => 0xFF7CFC00,
254
-	'clLemonChiffon'		 => 0xFFFFFACD,
255
-	'clLightBlue'			 => 0xFFADD8E6,
256
-	'clLightCoral'			 => 0xFFF08080,
257
-	'clLightCyan'			 => 0xFFE0FFFF,
258
-	'clLightGoldenrodYellow' => 0xFFFAFAD2,
259
-	'clLightGray' 			 => 0xFFD3D3D3,
260
-	'clLightGreen'			 => 0xFF90EE90,
261
-	'clLightPink' 			 => 0xFFFFB6C1,
262
-	'clLightSalmon'			 => 0xFFFFA07A,
263
-	'clLightSeaGreen'		 => 0xFF20B2AA,
264
-	'clLightSkyBlue'		 => 0xFF87CEFA,
265
-	'clLightSlateGray'		 => 0xFF778899,
266
-	'clLightSteelBlue'		 => 0xFFB0C4DE,
267
-	'clLightYellow'			 => 0xFFFFFFE0,
268
-	'clLime'				 => 0xFF00FF00,
269
-	'clLimeGreen'			 => 0xFF32CD32,
270
-	'clLinen'				 => 0xFFFAF0E6,
271
-	'clMagenta'				 => 0xFFFF00FF,
272
-	'clMaroon'				 => 0xFF800000,
273
-	'clMediumAquamarine'	 => 0xFF66CDAA,
274
-	'clMediumBlue' 			 => 0xFF0000CD,
275
-	'clMediumOrchid'		 => 0xFFBA55D3,
276
-	'clMediumPurple'		 => 0xFF9370DB,
277
-	'clMediumSeaGreen'		 => 0xFF3CB371,
278
-	'clMediumSlateBlue'		 => 0xFF7B68EE,
279
-	'clMediumSpringGreen'	 => 0xFF00FA9A,
280
-	'clMediumTurquoise'		 => 0xFF48D1CC,
281
-	'clMediumVioletRed'		 => 0xFFC71585,
282
-	'clMidnightBlue'		 => 0xFF191970,
283
-	'clMintCream'			 => 0xFFF5FFFA,
284
-	'clMistyRose'			 => 0xFFFFE4E1,
285
-	'clMoccasin'			 => 0xFFFFE4B5,
286
-	'clNavajoWhite'			 => 0xFFFFDEAD,
287
-	'clNavy'				 => 0xFF000080,
288
-	'clOldLace'				 => 0xFFFDF5E6,
289
-	'clOlive'				 => 0xFF808000,
290
-	'clOliveDrab'			 => 0xFF6B8E23,
291
-	'clOrange'				 => 0xFFFFA500,
292
-	'clOrangeRed'			 => 0xFFFF4500,
293
-	'clOrchid'				 => 0xFFDA70D6,
294
-	'clPaleGoldenrod'		 => 0xFFEEE8AA,
295
-	'clPaleGreen'			 => 0xFF98FB98,
296
-	'clPaleTurquoise'		 => 0xFFAFEEEE,
297
-	'clPaleVioletRed'		 => 0xFFDB7093,
298
-	'clPapayaWhip'			 => 0xFFFFEFD5,
299
-	'clPeachPuff'			 => 0xFFFFDAB9,
300
-	'clPeru'				 => 0xFFCD853F,
301
-	'clPink'				 => 0xFFFFC0CB,
302
-	'clPlum'				 => 0xFFDDA0DD,
303
-	'clPowderBlue'			 => 0xFFB0E0E6,
304
-	'clPurple'				 => 0xFF800080,
305
-	'clRed'					 => 0xFFFF0000,
306
-	'clRosyBrown'			 => 0xFFBC8F8F,
307
-	'clRoyalBlue'			 => 0xFF4169E1,
308
-	'clSaddleBrown'			 => 0xFF8B4513,
309
-	'clSalmon'				 => 0xFFFA8072,
310
-	'clSandyBrown'			 => 0xFFF4A460,
311
-	'clSeaGreen'			 => 0xFF2E8B57,
312
-	'clSeaShell'			 => 0xFFFFF5EE,
313
-	'clSienna'				 => 0xFFA0522D,
314
-	'clSilver'				 => 0xFFC0C0C0,
315
-	'clSkyBlue'				 => 0xFF87CEEB,
316
-	'clSlateBlue'			 => 0xFF6A5ACD,
317
-	'clSlateGray'			 => 0xFF708090,
318
-	'clSnow'				 => 0xFFFFFAFA,
319
-	'clSpringGreen'			 => 0xFF00FF7F,
320
-	'clSteelBlue'			 => 0xFF4682B4,
321
-	'clTan'					 => 0xFFD2B48C,
322
-	'clTeal'				 => 0xFF008080,
323
-	'clThistle'				 => 0xFFD8BFD8,
324
-	'clTomato'				 => 0xFFFF6347,
325
-	'clTurquoise'			 => 0xFF40E0D0,
326
-	'clViolet'				 => 0xFFEE82EE,
327
-	'clWheat'				 => 0xFFF5DEB3,
328
-	'clWhite'				 => 0xFFFFFFFF,
329
-	'clWhiteSmoke'			 => 0xFFF5F5F5,
330
-	'clYellow'				 => 0xFFFFFF00,
331
-	'clYellowGreen'			 => 0xFF9ACD32,
332
-
333
-	# Моя подборка цветов
334
-
335
-	'clDark'	  => $converter->fromHtml ('#0D0F12'),
336
-	'clDark2'	  => $converter->fromHtml ('#121416'),
337
-	'clTurquoise' => $converter->fromHtml ('#00ADB5'),
338
-	'clLight'  	  => $converter->fromHtml ('#EEEEEE')
192
+    'clAliceBlue'			 => 0xFFF0F8FF,
193
+    'clAntiqueWhite'		 => 0xFFFAEBD7,
194
+    'clAqua'				 => 0xFF00FFFF,
195
+    'clAquamarine'			 => 0xFF7FFFD4,
196
+    'clAzure'				 => 0xFFF0FFFF,
197
+    'clBeige'				 => 0xFFF5F5DC,
198
+    'clBisque'				 => 0xFFFFE4C4,
199
+    'clBlack'				 => 0xFF000000,
200
+    'clBlanchedAlmond'		 => 0xFFFFEBCD,
201
+    'clBlue'				 => 0xFF0000FF,
202
+    'clBlueViolet'			 => 0xFF8A2BE2,
203
+    'clBrown'				 => 0xFFA52A2A,
204
+    'clBurlyWood'			 => 0xFFDEB887,
205
+    'clCadetBlue' 			 => 0xFF5F9EA0,
206
+    'clChartreuse'			 => 0xFF7FFF00,
207
+    'clChocolate'			 => 0xFFD2691E,
208
+    'clCoral'				 => 0xFFFF7F50,
209
+    'clCornflowerBlue'		 => 0xFF6495ED,
210
+    'clCornsilk'			 => 0xFFFFF8DC,
211
+    'clCrimson'				 => 0xFFDC143C,
212
+    'clCyan'				 => 0xFF00FFFF,
213
+    'clDarkBlue'			 => 0xFF00008B,
214
+    'clDarkCyan'			 => 0xFF008B8B,
215
+    'clDarkGoldenrod'		 => 0xFFB8860B,
216
+    'clDarkGray'			 => 0xFFA9A9A9,
217
+    'clDarkGreen'			 => 0xFF006400,
218
+    'clDarkKhaki'			 => 0xFFBDB76B,
219
+    'clDarkMagenta'			 => 0xFF8B008B,
220
+    'clDarkOliveGreen'		 => 0xFF556B2F,
221
+    'clDarkOrange'			 => 0xFFFF8C00,
222
+    'clDarkOrchid'			 => 0xFF9932CC,
223
+    'clDarkRed'				 => 0xFF8B0000,
224
+    'clDarkSalmon'			 => 0xFFE9967A,
225
+    'clDarkSeaGreen'		 => 0xFF8FBC8F,
226
+    'clDarkSlateBlue'		 => 0xFF483D8B,
227
+    'clDarkSlateGray'		 => 0xFF2F4F4F,
228
+    'clDarkTurquoise'		 => 0xFF00CED1,
229
+    'clDarkViolet'			 => 0xFF9400D3,
230
+    'clDeepPink'			 => 0xFFFF1493,
231
+    'clDeepSkyBlue'			 => 0xFF00BFFF,
232
+    'clDimGray'				 => 0xFF696969,
233
+    'clDodgerBlue'			 => 0xFF1E90FF,
234
+    'clFirebrick'			 => 0xFFB22222,
235
+    'clFloralWhite'			 => 0xFFFFFAF0,
236
+    'clForestGreen'			 => 0xFF228B22,
237
+    'clFuchsia'				 => 0xFFFF00FF,
238
+    'clGainsboro'			 => 0xFFDCDCDC,
239
+    'clGhostWhite'			 => 0xFFF8F8FF,
240
+    'clGold'				 => 0xFFFFD700,
241
+    'clGoldenrod'			 => 0xFFDAA520,
242
+    'clGray'				 => 0xFF808080,
243
+    'clGreen'				 => 0xFF008000,
244
+    'clGreenYellow'			 => 0xFFADFF2F,
245
+    'clHoneydew'			 => 0xFFF0FFF0,
246
+    'clHotPink'				 => 0xFFFF69B4,
247
+    'clIndianRed'			 => 0xFFCD5C5C,
248
+    'clIndigo'				 => 0xFF4B0082,
249
+    'clIvory'				 => 0xFFFFFFF0,
250
+    'clKhaki'				 => 0xFFF0E68C,
251
+    'clLavender'			 => 0xFFE6E6FA,
252
+    'clLavenderBlush'		 => 0xFFFFF0F5,
253
+    'clLawnGreen'			 => 0xFF7CFC00,
254
+    'clLemonChiffon'		 => 0xFFFFFACD,
255
+    'clLightBlue'			 => 0xFFADD8E6,
256
+    'clLightCoral'			 => 0xFFF08080,
257
+    'clLightCyan'			 => 0xFFE0FFFF,
258
+    'clLightGoldenrodYellow' => 0xFFFAFAD2,
259
+    'clLightGray' 			 => 0xFFD3D3D3,
260
+    'clLightGreen'			 => 0xFF90EE90,
261
+    'clLightPink' 			 => 0xFFFFB6C1,
262
+    'clLightSalmon'			 => 0xFFFFA07A,
263
+    'clLightSeaGreen'		 => 0xFF20B2AA,
264
+    'clLightSkyBlue'		 => 0xFF87CEFA,
265
+    'clLightSlateGray'		 => 0xFF778899,
266
+    'clLightSteelBlue'		 => 0xFFB0C4DE,
267
+    'clLightYellow'			 => 0xFFFFFFE0,
268
+    'clLime'				 => 0xFF00FF00,
269
+    'clLimeGreen'			 => 0xFF32CD32,
270
+    'clLinen'				 => 0xFFFAF0E6,
271
+    'clMagenta'				 => 0xFFFF00FF,
272
+    'clMaroon'				 => 0xFF800000,
273
+    'clMediumAquamarine'	 => 0xFF66CDAA,
274
+    'clMediumBlue' 			 => 0xFF0000CD,
275
+    'clMediumOrchid'		 => 0xFFBA55D3,
276
+    'clMediumPurple'		 => 0xFF9370DB,
277
+    'clMediumSeaGreen'		 => 0xFF3CB371,
278
+    'clMediumSlateBlue'		 => 0xFF7B68EE,
279
+    'clMediumSpringGreen'	 => 0xFF00FA9A,
280
+    'clMediumTurquoise'		 => 0xFF48D1CC,
281
+    'clMediumVioletRed'		 => 0xFFC71585,
282
+    'clMidnightBlue'		 => 0xFF191970,
283
+    'clMintCream'			 => 0xFFF5FFFA,
284
+    'clMistyRose'			 => 0xFFFFE4E1,
285
+    'clMoccasin'			 => 0xFFFFE4B5,
286
+    'clNavajoWhite'			 => 0xFFFFDEAD,
287
+    'clNavy'				 => 0xFF000080,
288
+    'clOldLace'				 => 0xFFFDF5E6,
289
+    'clOlive'				 => 0xFF808000,
290
+    'clOliveDrab'			 => 0xFF6B8E23,
291
+    'clOrange'				 => 0xFFFFA500,
292
+    'clOrangeRed'			 => 0xFFFF4500,
293
+    'clOrchid'				 => 0xFFDA70D6,
294
+    'clPaleGoldenrod'		 => 0xFFEEE8AA,
295
+    'clPaleGreen'			 => 0xFF98FB98,
296
+    'clPaleTurquoise'		 => 0xFFAFEEEE,
297
+    'clPaleVioletRed'		 => 0xFFDB7093,
298
+    'clPapayaWhip'			 => 0xFFFFEFD5,
299
+    'clPeachPuff'			 => 0xFFFFDAB9,
300
+    'clPeru'				 => 0xFFCD853F,
301
+    'clPink'				 => 0xFFFFC0CB,
302
+    'clPlum'				 => 0xFFDDA0DD,
303
+    'clPowderBlue'			 => 0xFFB0E0E6,
304
+    'clPurple'				 => 0xFF800080,
305
+    'clRed'					 => 0xFFFF0000,
306
+    'clRosyBrown'			 => 0xFFBC8F8F,
307
+    'clRoyalBlue'			 => 0xFF4169E1,
308
+    'clSaddleBrown'			 => 0xFF8B4513,
309
+    'clSalmon'				 => 0xFFFA8072,
310
+    'clSandyBrown'			 => 0xFFF4A460,
311
+    'clSeaGreen'			 => 0xFF2E8B57,
312
+    'clSeaShell'			 => 0xFFFFF5EE,
313
+    'clSienna'				 => 0xFFA0522D,
314
+    'clSilver'				 => 0xFFC0C0C0,
315
+    'clSkyBlue'				 => 0xFF87CEEB,
316
+    'clSlateBlue'			 => 0xFF6A5ACD,
317
+    'clSlateGray'			 => 0xFF708090,
318
+    'clSnow'				 => 0xFFFFFAFA,
319
+    'clSpringGreen'			 => 0xFF00FF7F,
320
+    'clSteelBlue'			 => 0xFF4682B4,
321
+    'clTan'					 => 0xFFD2B48C,
322
+    'clTeal'				 => 0xFF008080,
323
+    'clThistle'				 => 0xFFD8BFD8,
324
+    'clTomato'				 => 0xFFFF6347,
325
+    'clTurquoise'			 => 0xFF40E0D0,
326
+    'clViolet'				 => 0xFFEE82EE,
327
+    'clWheat'				 => 0xFFF5DEB3,
328
+    'clWhite'				 => 0xFFFFFFFF,
329
+    'clWhiteSmoke'			 => 0xFFF5F5F5,
330
+    'clYellow'				 => 0xFFFFFF00,
331
+    'clYellowGreen'			 => 0xFF9ACD32,
332
+
333
+    # Моя подборка цветов
334
+
335
+    'clDark'	  => $converter->fromHtml ('#0D0F12'),
336
+    'clDark2'	  => $converter->fromHtml ('#121416'),
337
+    'clTurquoise' => $converter->fromHtml ('#00ADB5'),
338
+    'clLight'  	  => $converter->fromHtml ('#EEEEEE')
339 339
 ];
340 340
 
341 341
 foreach ($constants as $name => $value)
342
-	define ($name, $value);
342
+    define ($name, $value);
343 343
 
344 344
 $argv = START_PARAMS;
345 345
 $argc = sizeof ($argv);
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -2,17 +2,17 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace VoidEngine;
4 4
 
5
-$env 	= new NetClass ('System.Environment', 'mscorlib');
6
-$params = $env->getCommandLineArgs ()->list;
5
+$env = new NetClass('System.Environment', 'mscorlib');
6
+$params = $env->getCommandLineArgs()->list;
7 7
 
8
-$converter = new NetClass ('System.Drawing.ColorTranslator');
8
+$converter = new NetClass('System.Drawing.ColorTranslator');
9 9
 
10 10
 $constants = [
11 11
 	# Информация об окружении
12 12
 	
13 13
 	'EXE_NAME'     => $APPLICATION->executablePath,
14
-	'DOC_ROOT'     => dirname ($APPLICATION->executablePath),
15
-	'IS_ADMIN'     => is_writable (getenv ('SystemRoot')),
14
+	'DOC_ROOT'     => dirname($APPLICATION->executablePath),
15
+	'IS_ADMIN'     => is_writable(getenv('SystemRoot')),
16 16
 	'START_PARAMS' => $params,
17 17
 	'USERNAME'	   => $env->username,
18 18
 
@@ -332,17 +332,17 @@  discard block
 block discarded – undo
332 332
 
333 333
 	# Моя подборка цветов
334 334
 
335
-	'clDark'	  => $converter->fromHtml ('#0D0F12'),
336
-	'clDark2'	  => $converter->fromHtml ('#121416'),
337
-	'clTurquoise' => $converter->fromHtml ('#00ADB5'),
338
-	'clLight'  	  => $converter->fromHtml ('#EEEEEE')
335
+	'clDark'	  => $converter->fromHtml('#0D0F12'),
336
+	'clDark2'	  => $converter->fromHtml('#121416'),
337
+	'clTurquoise' => $converter->fromHtml('#00ADB5'),
338
+	'clLight'  	  => $converter->fromHtml('#EEEEEE')
339 339
 ];
340 340
 
341 341
 foreach ($constants as $name => $value)
342
-	define ($name, $value);
342
+	define($name, $value);
343 343
 
344 344
 $argv = START_PARAMS;
345
-$argc = sizeof ($argv);
345
+$argc = sizeof($argv);
346 346
 
347
-\VoidCore::removeObjects ($converter->selector);
347
+\VoidCore::removeObjects($converter->selector);
348 348
 unset ($constants, $env, $params, $converter);
Please login to merge, or discard this patch.
app_bundle/start.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
 
10 10
 # Подгружаем PHP расширения
11 11
 foreach (glob (CORE_DIR .'/ext/php_*.dll') as $ext)
12
-	if (!extension_loaded (substr (basename ($ext), 4, -4)))
13
-		load_extension ($ext);
12
+    if (!extension_loaded (substr (basename ($ext), 4, -4)))
13
+        load_extension ($ext);
14 14
 
15 15
 # Подгружаем Qero-пакеты
16 16
 require __DIR__ .'/../qero-packages/autoload.php';
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,9 +8,10 @@
 block discarded – undo
8 8
 define ('VoidEngine\CORE_DIR', dirname (__DIR__) .'/qero-packages/winforms-php/VoidFramework/core');
9 9
 
10 10
 # Подгружаем PHP расширения
11
-foreach (glob (CORE_DIR .'/ext/php_*.dll') as $ext)
11
+foreach (glob (CORE_DIR .'/ext/php_*.dll') as $ext) {
12 12
 	if (!extension_loaded (substr (basename ($ext), 4, -4)))
13 13
 		load_extension ($ext);
14
+}
14 15
 
15 16
 # Подгружаем Qero-пакеты
16 17
 require __DIR__ .'/../qero-packages/autoload.php';
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -10,19 +10,19 @@
 block discarded – undo
10 10
 # Объявление констант
11 11
 const APP_DIR = __DIR__;
12 12
 
13
-define ('VoidEngine\CORE_DIR', dirname (__DIR__) .'/qero-packages/winforms-php/VoidFramework/core');
13
+define('VoidEngine\CORE_DIR', dirname(__DIR__).'/qero-packages/winforms-php/VoidFramework/core');
14 14
 
15 15
 # Подгружаем PHP расширения
16
-foreach (glob (CORE_DIR .'/ext/php_*.dll') as $ext)
17
-	if (!extension_loaded (substr (basename ($ext), 4, -4)))
18
-		load_extension ($ext);
16
+foreach (glob(CORE_DIR.'/ext/php_*.dll') as $ext)
17
+	if (!extension_loaded(substr(basename($ext), 4, -4)))
18
+		load_extension($ext);
19 19
 
20 20
 # Подгружаем Qero-пакеты
21
-require __DIR__ .'/../qero-packages/autoload.php';
21
+require __DIR__.'/../qero-packages/autoload.php';
22 22
 
23
-chdir (APP_DIR); // Меняем стандартную директорию на директорию приложения
23
+chdir(APP_DIR); // Меняем стандартную директорию на директорию приложения
24 24
 
25 25
 # Парсим разметку app.vlf и запускаем приложение
26
-$objects = Interpreter::run (Parser::parse ('app.vlf'));
26
+$objects = Interpreter::run(Parser::parse('app.vlf'));
27 27
 
28
-$APPLICATION->run ($objects['MainForm']);
28
+$APPLICATION->run($objects['MainForm']);
Please login to merge, or discard this patch.
engine/components/Control.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
         $this->text = $caption;
25 25
     }
26 26
 	
27
-	public function set_font ($font): void
28
-	{
27
+    public function set_font ($font): void
28
+    {
29 29
         if (is_array ($font))
30 30
         {
31 31
             $font = array_values ($font);
Please login to merge, or discard this patch.
Spacing   +51 added lines, -52 removed lines patch added patch discarded remove patch
@@ -6,101 +6,100 @@  discard block
 block discarded – undo
6 6
 
7 7
 abstract class Control extends Component
8 8
 {
9
-    public function __construct (NetObject $parent = null, ...$args)
9
+    public function __construct(NetObject $parent = null, ...$args)
10 10
     {
11
-        parent::__construct (...$args);
11
+        parent::__construct(...$args);
12 12
 
13 13
         if ($parent !== null)
14 14
             $this->parent = $parent;
15 15
     }
16 16
 
17
-    public function get_caption (): string
17
+    public function get_caption(): string
18 18
     {
19 19
         return $this->text;
20 20
     }
21 21
 	
22
-    public function set_caption (string $caption): void
22
+    public function set_caption(string $caption): void
23 23
     {
24 24
         $this->text = $caption;
25 25
     }
26 26
 	
27
-	public function set_font ($font): void
27
+	public function set_font($font): void
28 28
 	{
29
-        if (is_array ($font))
29
+        if (is_array($font))
30 30
         {
31
-            $font = array_values ($font);
31
+            $font = array_values($font);
32 32
 
33 33
             $obj = isset ($font[2]) ?
34
-                VoidCore::createObject ('System.Drawing.Font', 'System.Drawing', $font[0], $font[1], [$font[2], 'System.Drawing.FontStyle, System.Drawing']) :
35
-                VoidCore::createObject ('System.Drawing.Font', 'System.Drawing', $font[0], $font[1]);
34
+                VoidCore::createObject('System.Drawing.Font', 'System.Drawing', $font[0], $font[1], [$font[2], 'System.Drawing.FontStyle, System.Drawing']) : VoidCore::createObject('System.Drawing.Font', 'System.Drawing', $font[0], $font[1]);
36 35
             
37
-            $this->setProperty ('Font', $obj);
36
+            $this->setProperty('Font', $obj);
38 37
         }
39 38
 
40
-        else $this->setProperty ('Font', EngineAdditions::uncoupleSelector ($font));
39
+        else $this->setProperty('Font', EngineAdditions::uncoupleSelector($font));
41 40
     }
42 41
 	
43
-    public function get_backgroundColor ()
42
+    public function get_backgroundColor()
44 43
     {
45
-        return $this->getProperty (['BackColor', VC_COLOR]);
44
+        return $this->getProperty(['BackColor', VC_COLOR]);
46 45
     }
47 46
 	
48
-    public function set_backgroundColor ($color): void
47
+    public function set_backgroundColor($color): void
49 48
     {
50
-        $this->setProperty ('BackColor', $color);
49
+        $this->setProperty('BackColor', $color);
51 50
     }
52 51
 	
53
-    public function get_foregroundColor ()
52
+    public function get_foregroundColor()
54 53
     {
55
-        return $this->getProperty (['ForeColor', VC_COLOR]);
54
+        return $this->getProperty(['ForeColor', VC_COLOR]);
56 55
     }
57 56
 	
58
-    public function set_foregroundColor ($color): void
57
+    public function set_foregroundColor($color): void
59 58
     {
60
-        $this->setProperty ('ForeColor', $color);
59
+        $this->setProperty('ForeColor', $color);
61 60
     }
62 61
 	
63
-    public function get_w (): int
62
+    public function get_w(): int
64 63
     {
65 64
         return $this->width;
66 65
     }
67 66
 	
68
-    public function set_w (int $w): void
67
+    public function set_w(int $w): void
69 68
     {
70 69
         $this->width = $w;
71 70
     }
72 71
 	
73
-    public function get_h (): int
72
+    public function get_h(): int
74 73
     {
75 74
         return $this->height;
76 75
     }
77 76
 	
78
-    public function set_h (int $h): void
77
+    public function set_h(int $h): void
79 78
     {
80 79
         $this->height = $h;
81 80
     }
82 81
 	
83
-    public function get_x (): int
82
+    public function get_x(): int
84 83
     {
85 84
         return $this->left;
86 85
     }
87 86
 	
88
-    public function set_x (int $x): void
87
+    public function set_x(int $x): void
89 88
     {
90 89
         $this->left = $x;
91 90
     }
92 91
 	
93
-    public function get_y (): int
92
+    public function get_y(): int
94 93
     {
95 94
         return $this->top;
96 95
     }
97 96
 	
98
-    public function set_y (int $y): void
97
+    public function set_y(int $y): void
99 98
     {
100 99
         $this->top = $y;
101 100
     }
102 101
 
103
-    public function get_bounds (): array
102
+    public function get_bounds(): array
104 103
     {
105 104
         return [
106 105
             $this->left,
@@ -110,11 +109,11 @@  discard block
 block discarded – undo
110 109
         ];
111 110
     }
112 111
 	
113
-    public function set_bounds ($bounds): void
112
+    public function set_bounds($bounds): void
114 113
     {
115
-        if (is_array ($bounds))
114
+        if (is_array($bounds))
116 115
         {
117
-            $bounds = array_values ($bounds);
116
+            $bounds = array_values($bounds);
118 117
             
119 118
             $this->left   = (int) $bounds[0];
120 119
             $this->top    = (int) $bounds[1];
@@ -122,10 +121,10 @@  discard block
 block discarded – undo
122 121
             $this->height = (int) $bounds[3];
123 122
         }
124 123
 
125
-        else $this->setProperty ('Bounds', EngineAdditions::uncoupleSelector ($bounds));
124
+        else $this->setProperty('Bounds', EngineAdditions::uncoupleSelector($bounds));
126 125
     }
127 126
 	
128
-    public function get_location (): array
127
+    public function get_location(): array
129 128
     {
130 129
         return [
131 130
             $this->left,
@@ -133,20 +132,20 @@  discard block
 block discarded – undo
133 132
         ];
134 133
     }
135 134
 	
136
-    public function set_location ($location)
135
+    public function set_location($location)
137 136
     {
138
-        if (is_array ($location))
137
+        if (is_array($location))
139 138
         {
140
-            $location = array_values ($location);
139
+            $location = array_values($location);
141 140
             
142 141
             $this->left = $location[0];
143 142
             $this->top  = $location[1];
144 143
         }
145 144
 
146
-        else $this->setProperty ('Location', EngineAdditions::uncoupleSelector ($location));
145
+        else $this->setProperty('Location', EngineAdditions::uncoupleSelector($location));
147 146
     }
148 147
 	
149
-    public function get_size (): array
148
+    public function get_size(): array
150 149
     {
151 150
         return [
152 151
             $this->width,
@@ -154,41 +153,41 @@  discard block
 block discarded – undo
154 153
         ];
155 154
     }
156 155
 	
157
-    public function set_size ($size): void
156
+    public function set_size($size): void
158 157
     {
159
-        if (is_array ($size))
158
+        if (is_array($size))
160 159
         {
161
-            $size = array_values ($size);
160
+            $size = array_values($size);
162 161
             
163 162
             $this->width  = (int) $size[0];
164 163
             $this->height = (int) $size[1];
165 164
         }
166 165
 
167
-        else $this->setProperty ('Size', EngineAdditions::uncoupleSelector ($size));
166
+        else $this->setProperty('Size', EngineAdditions::uncoupleSelector($size));
168 167
     }
169 168
 	
170
-    public function setBounds (int $x, int $y, int $w, int $h): void
169
+    public function setBounds(int $x, int $y, int $w, int $h): void
171 170
     {
172
-        $this->set_bounds ([$x, $y, $w, $h]);
171
+        $this->set_bounds([$x, $y, $w, $h]);
173 172
     }
174 173
 	
175
-    public function setLocation (int $x, int $y): void
174
+    public function setLocation(int $x, int $y): void
176 175
     {
177
-        $this->set_location ([$x, $y]);
176
+        $this->set_location([$x, $y]);
178 177
     }
179 178
 	
180
-    public function setSize (int $w, int $h): void
179
+    public function setSize(int $w, int $h): void
181 180
     {
182
-        $this->set_size ([$w, $h]);
181
+        $this->set_size([$w, $h]);
183 182
     }
184 183
 	
185
-    public function toBack (): void
184
+    public function toBack(): void
186 185
     {
187
-        $this->callMethod ('SendToBack');
186
+        $this->callMethod('SendToBack');
188 187
     }
189 188
 	
190
-    public function toFront (): void
189
+    public function toFront(): void
191 190
     {
192
-        $this->callMethod ('BringToFront');
191
+        $this->callMethod('BringToFront');
193 192
     }
194 193
 }
Please login to merge, or discard this patch.
Braces   +11 added lines, -10 removed lines patch added patch discarded remove patch
@@ -10,8 +10,9 @@  discard block
 block discarded – undo
10 10
     {
11 11
         parent::__construct (...$args);
12 12
 
13
-        if ($parent !== null)
14
-            $this->parent = $parent;
13
+        if ($parent !== null) {
14
+                    $this->parent = $parent;
15
+        }
15 16
     }
16 17
 
17 18
     public function get_caption (): string
@@ -35,9 +36,9 @@  discard block
 block discarded – undo
35 36
                 VoidCore::createObject ('System.Drawing.Font', 'System.Drawing', $font[0], $font[1]);
36 37
             
37 38
             $this->setProperty ('Font', $obj);
39
+        } else {
40
+            $this->setProperty ('Font', EngineAdditions::uncoupleSelector ($font));
38 41
         }
39
-
40
-        else $this->setProperty ('Font', EngineAdditions::uncoupleSelector ($font));
41 42
     }
42 43
 	
43 44
     public function get_backgroundColor ()
@@ -120,9 +121,9 @@  discard block
 block discarded – undo
120 121
             $this->top    = (int) $bounds[1];
121 122
             $this->width  = (int) $bounds[2];
122 123
             $this->height = (int) $bounds[3];
124
+        } else {
125
+            $this->setProperty ('Bounds', EngineAdditions::uncoupleSelector ($bounds));
123 126
         }
124
-
125
-        else $this->setProperty ('Bounds', EngineAdditions::uncoupleSelector ($bounds));
126 127
     }
127 128
 	
128 129
     public function get_location (): array
@@ -141,9 +142,9 @@  discard block
 block discarded – undo
141 142
             
142 143
             $this->left = $location[0];
143 144
             $this->top  = $location[1];
145
+        } else {
146
+            $this->setProperty ('Location', EngineAdditions::uncoupleSelector ($location));
144 147
         }
145
-
146
-        else $this->setProperty ('Location', EngineAdditions::uncoupleSelector ($location));
147 148
     }
148 149
 	
149 150
     public function get_size (): array
@@ -162,9 +163,9 @@  discard block
 block discarded – undo
162 163
             
163 164
             $this->width  = (int) $size[0];
164 165
             $this->height = (int) $size[1];
166
+        } else {
167
+            $this->setProperty ('Size', EngineAdditions::uncoupleSelector ($size));
165 168
         }
166
-
167
-        else $this->setProperty ('Size', EngineAdditions::uncoupleSelector ($size));
168 169
     }
169 170
 	
170 171
     public function setBounds (int $x, int $y, int $w, int $h): void
Please login to merge, or discard this patch.
core/script.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,17 +6,17 @@
 block discarded – undo
6 6
 chdir (CORE_DIR);
7 7
 
8 8
 foreach (glob ('ext/php_*.dll') as $ext)
9
-	if (!extension_loaded (substr (basename ($ext), 4, -4)))
10
-		load_extension ($ext);
9
+    if (!extension_loaded (substr (basename ($ext), 4, -4)))
10
+        load_extension ($ext);
11 11
 
12 12
 if (file_exists ('../engine/VoidEngine.php'))
13
-	require '../engine/VoidEngine.php';
13
+    require '../engine/VoidEngine.php';
14 14
 
15 15
 else message ('VoidEngine not founded');
16 16
 
17 17
 $app = '../../app/start.php';
18 18
 
19 19
 if (file_exists ($app))
20
-	require $app;
20
+    require $app;
21 21
 
22 22
 else \VoidCore::callMethod (\VoidCore::createObject ('WinForms_PHP.DebugForm'), 'ShowDialog');
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,20 +3,20 @@
 block discarded – undo
3 3
 namespace VoidEngine;
4 4
 
5 5
 const CORE_DIR = __DIR__;
6
-chdir (CORE_DIR);
6
+chdir(CORE_DIR);
7 7
 
8
-foreach (glob ('ext/php_*.dll') as $ext)
9
-	if (!extension_loaded (substr (basename ($ext), 4, -4)))
10
-		load_extension ($ext);
8
+foreach (glob('ext/php_*.dll') as $ext)
9
+	if (!extension_loaded(substr(basename($ext), 4, -4)))
10
+		load_extension($ext);
11 11
 
12
-if (file_exists ('../engine/VoidEngine.php'))
12
+if (file_exists('../engine/VoidEngine.php'))
13 13
 	require '../engine/VoidEngine.php';
14 14
 
15
-else message ('VoidEngine not founded');
15
+else message('VoidEngine not founded');
16 16
 
17 17
 $app = '../../app/start.php';
18 18
 
19
-if (file_exists ($app))
19
+if (file_exists($app))
20 20
 	require $app;
21 21
 
22
-else \VoidCore::callMethod (\VoidCore::createObject ('WinForms_PHP.DebugForm'), 'ShowDialog');
22
+else \VoidCore::callMethod(\VoidCore::createObject('WinForms_PHP.DebugForm'), 'ShowDialog');
Please login to merge, or discard this patch.
Braces   +10 added lines, -7 removed lines patch added patch discarded remove patch
@@ -5,18 +5,21 @@
 block discarded – undo
5 5
 const CORE_DIR = __DIR__;
6 6
 chdir (CORE_DIR);
7 7
 
8
-foreach (glob ('ext/php_*.dll') as $ext)
8
+foreach (glob ('ext/php_*.dll') as $ext) {
9 9
 	if (!extension_loaded (substr (basename ($ext), 4, -4)))
10 10
 		load_extension ($ext);
11
+}
11 12
 
12
-if (file_exists ('../engine/VoidEngine.php'))
13
+if (file_exists ('../engine/VoidEngine.php')) {
13 14
 	require '../engine/VoidEngine.php';
14
-
15
-else message ('VoidEngine not founded');
15
+} else {
16
+    message ('VoidEngine not founded');
17
+}
16 18
 
17 19
 $app = '../../app/start.php';
18 20
 
19
-if (file_exists ($app))
21
+if (file_exists ($app)) {
20 22
 	require $app;
21
-
22
-else \VoidCore::callMethod (\VoidCore::createObject ('WinForms_PHP.DebugForm'), 'ShowDialog');
23
+} else {
24
+    \VoidCore::callMethod (\VoidCore::createObject ('WinForms_PHP.DebugForm'), 'ShowDialog');
25
+}
Please login to merge, or discard this patch.
engine/extensions/VLF/bin/Translator.php 2 patches
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -4,25 +4,25 @@  discard block
 block discarded – undo
4 4
 
5 5
 class Translator
6 6
 {
7
-    public static function translate (AST $tree): string
7
+    public static function translate(AST $tree): string
8 8
     {
9 9
         $code = "<?php\n\nnamespace VoidEngine;\n\n";
10 10
         $definedObjects = [];
11 11
 
12
-        foreach ($tree->getNodes () as $node)
13
-            $code .= self::translateNode ($node, null, $definedObjects) ."\n";
12
+        foreach ($tree->getNodes() as $node)
13
+            $code .= self::translateNode($node, null, $definedObjects)."\n";
14 14
 
15 15
         return $code;
16 16
     }
17 17
 
18
-    protected static function translateNode (Node $node, Node $owner = null, array &$definedObjects = []): string
18
+    protected static function translateNode(Node $node, Node $owner = null, array &$definedObjects = []): string
19 19
     {
20 20
         $code = '';
21 21
 
22 22
         switch ($node->type)
23 23
         {
24 24
             case RUNTIME_EXECUTION:
25
-                $code .= self::formatLine ($node->args['code'], $definedObjects) ."\n\n";
25
+                $code .= self::formatLine($node->args['code'], $definedObjects)."\n\n";
26 26
 
27 27
                 break;
28 28
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
                 if (isset ($definedObjects[$node->args['name']]))
31 31
                     break;
32 32
                 
33
-                $code .= '$'. $node->args['name'] .' = new '. $node->args['class'] .' ('. implode (', ', self::processArgs ($node->args['args'], $definedObjects)) .');' ."\n". '$'. $node->args['name'] .'->name = \''. $node->args['name'] .'\';' ."\n";
33
+                $code .= '$'.$node->args['name'].' = new '.$node->args['class'].' ('.implode(', ', self::processArgs($node->args['args'], $definedObjects)).');'."\n".'$'.$node->args['name'].'->name = \''.$node->args['name'].'\';'."\n";
34 34
 
35 35
                 $definedObjects[$node->args['name']] = $node->args['name'];
36 36
 
@@ -39,74 +39,74 @@  discard block
 block discarded – undo
39 39
             case PROPERTY_SET:
40 40
                 $preset = '';
41 41
 
42
-                if (preg_match ('/function \((.*)\) use \((.*)\)/', $node->args['property_value']))
42
+                if (preg_match('/function \((.*)\) use \((.*)\)/', $node->args['property_value']))
43 43
                 {
44
-                    $use = substr ($node->args['property_value'], strpos ($node->args['property_value'], 'use'));
45
-                    $use = $ouse = substr ($use, ($pos = strpos ($use, '(') + 1), strpos ($use, ')') - $pos);
46
-                    $use = explode (' ', $use);
44
+                    $use = substr($node->args['property_value'], strpos($node->args['property_value'], 'use'));
45
+                    $use = $ouse = substr($use, ($pos = strpos($use, '(') + 1), strpos($use, ')') - $pos);
46
+                    $use = explode(' ', $use);
47 47
 
48 48
                     foreach ($use as $id => $useParam)  
49 49
                         if (isset ($definedObjects[$useParam]) && $use[$id + 1][0] == '$')
50 50
                         {
51 51
                             $fname = $use[$id + 1];
52 52
 
53
-                            if (substr ($fname, strlen ($fname) - 1) == ',')
54
-                                $fname = substr ($fname, 0, -1);
53
+                            if (substr($fname, strlen($fname) - 1) == ',')
54
+                                $fname = substr($fname, 0, -1);
55 55
 
56 56
                             $preset .= "$fname = $useParam; ";
57 57
 
58 58
                             unset ($use[$id]);
59 59
                         }
60 60
 
61
-                    $preset = self::formatLine ($preset, $definedObjects) ."\n";
61
+                    $preset = self::formatLine($preset, $definedObjects)."\n";
62 62
 
63
-                    $node->args['property_value'] = self::formatLine (str_replace ($ouse, join (' ', $use), $node->args['property_value']), $definedObjects);
63
+                    $node->args['property_value'] = self::formatLine(str_replace($ouse, join(' ', $use), $node->args['property_value']), $definedObjects);
64 64
                 }
65 65
                 
66
-                $code .= $preset .'$'. $owner->args['name'] .'->'. $node->args['property_name'] .' = '. self::formatLine ($node->args['property_value'], $definedObjects) .';' ."\n";
66
+                $code .= $preset.'$'.$owner->args['name'].'->'.$node->args['property_name'].' = '.self::formatLine($node->args['property_value'], $definedObjects).';'."\n";
67 67
 
68 68
                 break;
69 69
 
70 70
             case METHOD_CALL:
71
-                $code .= '$'. $owner->args['name'] .'->'. $node->args['method_name'] .' ('. implode (', ', self::processArgs ($node->args['method_args'], $definedObjects)) .');' ."\n";
71
+                $code .= '$'.$owner->args['name'].'->'.$node->args['method_name'].' ('.implode(', ', self::processArgs($node->args['method_args'], $definedObjects)).');'."\n";
72 72
 
73 73
                 break;
74 74
         }
75 75
 
76
-        foreach ($node->getNodes () as $subnode)
77
-            $code .= self::translateNode ($subnode, $node, $definedObjects);
76
+        foreach ($node->getNodes() as $subnode)
77
+            $code .= self::translateNode($subnode, $node, $definedObjects);
78 78
 
79 79
         return $code;
80 80
     }
81 81
 
82
-    protected static function processArgs (array $args, array $definedObjects = []): array
82
+    protected static function processArgs(array $args, array $definedObjects = []): array
83 83
     {
84 84
         $newArgs = [];
85 85
 
86 86
         foreach ($args as $arg)
87
-            $newArgs[] = self::formatLine ($arg, $definedObjects);
87
+            $newArgs[] = self::formatLine($arg, $definedObjects);
88 88
 
89 89
         return $newArgs;
90 90
     }
91 91
 
92
-    protected static function formatLine (string $line, array $objects = []): string
92
+    protected static function formatLine(string $line, array $objects = []): string
93 93
     {
94
-        if (sizeof ($objects) > 0)
94
+        if (sizeof($objects) > 0)
95 95
         {
96
-            $len     = strlen ($line);
96
+            $len     = strlen($line);
97 97
             $newLine = '';
98 98
 
99
-            $replacement = array_map (function ($object)
99
+            $replacement = array_map(function($object)
100 100
             {
101
-                return '$'. $object;
101
+                return '$'.$object;
102 102
             }, $objects);
103 103
 
104
-            $replacement = array_map (function ($name)
104
+            $replacement = array_map(function($name)
105 105
             {
106
-                return strlen ($name = trim ($name)) + substr_count ($name, '_');
107
-            }, $omap = array_flip ($replacement));
106
+                return strlen($name = trim($name)) + substr_count($name, '_');
107
+            }, $omap = array_flip($replacement));
108 108
 
109
-            arsort ($replacement);
109
+            arsort($replacement);
110 110
 
111 111
             $nReplacement = [];
112 112
 
@@ -114,14 +114,14 @@  discard block
 block discarded – undo
114 114
                 $nReplacement[$omap[$replaceTo]] = $replaceTo;
115 115
 
116 116
             $replacement = $nReplacement;
117
-            $blacklist   = array_flip (['\'', '"', '$']);
117
+            $blacklist   = array_flip(['\'', '"', '$']);
118 118
 
119 119
             for ($i = 0; $i < $len; ++$i)
120 120
             {
121 121
                 $replaced = false;
122 122
 
123 123
                 foreach ($replacement as $name => $replaceAt)
124
-                    if (substr ($line, $i, ($l = strlen ($name))) == $name && !isset ($blacklist[$line[$i - 1]]))
124
+                    if (substr($line, $i, ($l = strlen($name))) == $name && !isset ($blacklist[$line[$i - 1]]))
125 125
                     {
126 126
                         $newLine .= $replaceAt;
127 127
 
Please login to merge, or discard this patch.
Braces   +27 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,8 +9,9 @@  discard block
 block discarded – undo
9 9
         $code = "<?php\n\nnamespace VoidEngine;\n\n";
10 10
         $definedObjects = [];
11 11
 
12
-        foreach ($tree->getNodes () as $node)
13
-            $code .= self::translateNode ($node, null, $definedObjects) ."\n";
12
+        foreach ($tree->getNodes () as $node) {
13
+                    $code .= self::translateNode ($node, null, $definedObjects) ."\n";
14
+        }
14 15
 
15 16
         return $code;
16 17
     }
@@ -27,8 +28,9 @@  discard block
 block discarded – undo
27 28
                 break;
28 29
 
29 30
             case OBJECT_DEFINITION:
30
-                if (isset ($definedObjects[$node->args['name']]))
31
-                    break;
31
+                if (isset ($definedObjects[$node->args['name']])) {
32
+                                    break;
33
+                }
32 34
                 
33 35
                 $code .= '$'. $node->args['name'] .' = new '. $node->args['class'] .' ('. implode (', ', self::processArgs ($node->args['args'], $definedObjects)) .');' ."\n". '$'. $node->args['name'] .'->name = \''. $node->args['name'] .'\';' ."\n";
34 36
 
@@ -45,13 +47,15 @@  discard block
 block discarded – undo
45 47
                     $use = $ouse = substr ($use, ($pos = strpos ($use, '(') + 1), strpos ($use, ')') - $pos);
46 48
                     $use = explode (' ', $use);
47 49
 
48
-                    foreach ($use as $id => $useParam)  
49
-                        if (isset ($definedObjects[$useParam]) && $use[$id + 1][0] == '$')
50
+                    foreach ($use as $id => $useParam) {
51
+                                            if (isset ($definedObjects[$useParam]) && $use[$id + 1][0] == '$')
50 52
                         {
51 53
                             $fname = $use[$id + 1];
54
+                    }
52 55
 
53
-                            if (substr ($fname, strlen ($fname) - 1) == ',')
54
-                                $fname = substr ($fname, 0, -1);
56
+                            if (substr ($fname, strlen ($fname) - 1) == ',') {
57
+                                                            $fname = substr ($fname, 0, -1);
58
+                            }
55 59
 
56 60
                             $preset .= "$fname = $useParam; ";
57 61
 
@@ -73,8 +77,9 @@  discard block
 block discarded – undo
73 77
                 break;
74 78
         }
75 79
 
76
-        foreach ($node->getNodes () as $subnode)
77
-            $code .= self::translateNode ($subnode, $node, $definedObjects);
80
+        foreach ($node->getNodes () as $subnode) {
81
+                    $code .= self::translateNode ($subnode, $node, $definedObjects);
82
+        }
78 83
 
79 84
         return $code;
80 85
     }
@@ -83,8 +88,9 @@  discard block
 block discarded – undo
83 88
     {
84 89
         $newArgs = [];
85 90
 
86
-        foreach ($args as $arg)
87
-            $newArgs[] = self::formatLine ($arg, $definedObjects);
91
+        foreach ($args as $arg) {
92
+                    $newArgs[] = self::formatLine ($arg, $definedObjects);
93
+        }
88 94
 
89 95
         return $newArgs;
90 96
     }
@@ -110,8 +116,9 @@  discard block
 block discarded – undo
110 116
 
111 117
             $nReplacement = [];
112 118
 
113
-            foreach ($replacement as $replaceTo => $nLn)
114
-                $nReplacement[$omap[$replaceTo]] = $replaceTo;
119
+            foreach ($replacement as $replaceTo => $nLn) {
120
+                            $nReplacement[$omap[$replaceTo]] = $replaceTo;
121
+            }
115 122
 
116 123
             $replacement = $nReplacement;
117 124
             $blacklist   = array_flip (['\'', '"', '$']);
@@ -120,10 +127,11 @@  discard block
 block discarded – undo
120 127
             {
121 128
                 $replaced = false;
122 129
 
123
-                foreach ($replacement as $name => $replaceAt)
124
-                    if (substr ($line, $i, ($l = strlen ($name))) == $name && !isset ($blacklist[$line[$i - 1]]))
130
+                foreach ($replacement as $name => $replaceAt) {
131
+                                    if (substr ($line, $i, ($l = strlen ($name))) == $name && !isset ($blacklist[$line[$i - 1]]))
125 132
                     {
126 133
                         $newLine .= $replaceAt;
134
+                }
127 135
 
128 136
                         $i += $l - 1;
129 137
                         $replaced = true;
@@ -131,8 +139,9 @@  discard block
 block discarded – undo
131 139
                         break;
132 140
                     }
133 141
 
134
-                if (!$replaced)
135
-                    $newLine .= $line[$i];
142
+                if (!$replaced) {
143
+                                    $newLine .= $line[$i];
144
+                }
136 145
             }
137 146
 
138 147
             $line = $newLine;
Please login to merge, or discard this patch.
engine/extensions/VLF/bin/AST/Node.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -8,10 +8,10 @@  discard block
 block discarded – undo
8 8
 class Node
9 9
 {
10 10
     public ?string $line = null; // Строка
11
-    public array $words  = [];   // Список слов
12
-    public int $height   = 0;    // Высота строки
13
-    public int $type     = 0;    // Тип ноды
14
-    public array $args   = [];   // Аргументы ноды
11
+    public array $words  = []; // Список слов
12
+    public int $height   = 0; // Высота строки
13
+    public int $type     = 0; // Тип ноды
14
+    public array $args   = []; // Аргументы ноды
15 15
 
16 16
     protected array $nodes = []; // Ветви ноды
17 17
 
@@ -20,10 +20,10 @@  discard block
 block discarded – undo
20 20
      * 
21 21
      * [@param array $node = null] - массив для импорта ноды
22 22
      */
23
-    public function __construct (array $node = null)
23
+    public function __construct(array $node = null)
24 24
     {
25 25
         if ($node !== null)
26
-            $this->import ($node);
26
+            $this->import($node);
27 27
     }
28 28
 
29 29
     /**
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      * 
34 34
      * @return Node - возвращает саму себя
35 35
      */
36
-    public function import (array $node): Node
36
+    public function import(array $node): Node
37 37
     {
38 38
         $this->line   = $node['line'] ?? null;
39 39
         $this->words  = $node['words'] ?? [];
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
         $this->type   = $node['type'] ?? 0;
42 42
         $this->args   = $node['args'] ?? [];
43 43
 
44
-        $this->nodes = array_map (fn (array $t) => new Node ($t), $node['nodes'] ?? []);
44
+        $this->nodes = array_map(fn(array $t) => new Node($t), $node['nodes'] ?? []);
45 45
 
46 46
         return $this;
47 47
     }
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * 
52 52
      * @return array - возвращает массив экспортированной ноды
53 53
      */
54
-    public function export (): array
54
+    public function export(): array
55 55
     {
56 56
         return [
57 57
             'line'   => $this->line,
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
             'type'   => $this->type,
61 61
             'args'   => $this->args,
62 62
 
63
-            'nodes'  => array_map (fn (Node $node) => $node->export (), $this->nodes)
63
+            'nodes'  => array_map(fn(Node $node) => $node->export(), $this->nodes)
64 64
         ];
65 65
     }
66 66
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      * 
72 72
      * @return Node - возвращает саму себя
73 73
      */
74
-    public function push (Node $node): Node
74
+    public function push(Node $node): Node
75 75
     {
76 76
         $this->nodes[] = $node;
77 77
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      * 
84 84
      * @return array - возвращает список ветвей
85 85
      */
86
-    public function getNodes (): array
86
+    public function getNodes(): array
87 87
     {
88 88
         return $this->nodes;
89 89
     }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,8 +22,9 @@
 block discarded – undo
22 22
      */
23 23
     public function __construct (array $node = null)
24 24
     {
25
-        if ($node !== null)
26
-            $this->import ($node);
25
+        if ($node !== null) {
26
+                    $this->import ($node);
27
+        }
27 28
     }
28 29
 
29 30
     /**
Please login to merge, or discard this patch.
engine/extensions/VLF/bin/AST/Tree.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
      * 
16 16
      * [@param array $tree = null] - массив для импорта дерева
17 17
      */
18
-    public function __construct (array $tree = null)
18
+    public function __construct(array $tree = null)
19 19
     {
20 20
         if ($tree !== null)
21
-            $this->import ($tree);
21
+            $this->import($tree);
22 22
     }
23 23
 
24 24
     /**
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
      * 
29 29
      * @return AST - возвращает сам себя
30 30
      */
31
-    public function import (array $tree): AST
31
+    public function import(array $tree): AST
32 32
     {
33 33
         foreach ($tree as $node)
34
-            $this->nodes[] = new Node ($node);
34
+            $this->nodes[] = new Node($node);
35 35
 
36 36
         return $this;
37 37
     }
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
      * 
42 42
      * @return array - возращает массив экспортированного дерева
43 43
      */
44
-    public function export (): array
44
+    public function export(): array
45 45
     {
46
-        return array_map (fn (Node $node) => $node->export (), $this->nodes);
46
+        return array_map(fn(Node $node) => $node->export(), $this->nodes);
47 47
     }
48 48
 
49 49
     /**
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * 
54 54
      * @return AST - возвращает сам себя
55 55
      */
56
-    public function push (Node $node): AST
56
+    public function push(Node $node): AST
57 57
     {
58 58
         $this->nodes[] = $node;
59 59
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * 
66 66
      * @return array - возвращает список корневых нод
67 67
      */
68
-    public function getNodes (): array
68
+    public function getNodes(): array
69 69
     {
70 70
         return $this->nodes;
71 71
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,8 +17,9 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function __construct (array $tree = null)
19 19
     {
20
-        if ($tree !== null)
21
-            $this->import ($tree);
20
+        if ($tree !== null) {
21
+                    $this->import ($tree);
22
+        }
22 23
     }
23 24
 
24 25
     /**
@@ -30,8 +31,9 @@  discard block
 block discarded – undo
30 31
      */
31 32
     public function import (array $tree): AST
32 33
     {
33
-        foreach ($tree as $node)
34
-            $this->nodes[] = new Node ($node);
34
+        foreach ($tree as $node) {
35
+                    $this->nodes[] = new Node ($node);
36
+        }
35 37
 
36 38
         return $this;
37 39
     }
Please login to merge, or discard this patch.
engine/extensions/VLF/bin/Stack.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
      * 
18 18
      * @return Stack - возвращает сам себя
19 19
      */
20
-    public function push ($item): Stack
20
+    public function push($item): Stack
21 21
     {
22 22
         $this->items[] = $item;
23 23
 
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
      * 
30 30
      * @return mixed - возвращает текущий элемент
31 31
      */
32
-    public function current ()
32
+    public function current()
33 33
     {
34
-        return end ($this->items);
34
+        return end($this->items);
35 35
     }
36 36
 
37 37
     /**
@@ -39,9 +39,9 @@  discard block
 block discarded – undo
39 39
      * 
40 40
      * @return mixed - возвращает текущий элемент
41 41
      */
42
-    public function pop ()
42
+    public function pop()
43 43
     {
44
-        return array_pop ($this->items);
44
+        return array_pop($this->items);
45 45
     }
46 46
 
47 47
     /**
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
      * 
50 50
      * @return int - возвращает размер стэка
51 51
      */
52
-    public function size (): int
52
+    public function size(): int
53 53
     {
54
-        return sizeof ($this->items);
54
+        return sizeof($this->items);
55 55
     }
56 56
 }
Please login to merge, or discard this patch.