Passed
Push — master ( ec54f3...451c11 )
by Observer
01:22
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
@@ -42,4 +42,4 @@
 block discarded – undo
42 42
 unlink ('README.md');
43 43
 
44 44
 echo '    Configuration completed'. PHP_EOL .
45
-     '    Thank for installing winforms-php/VoidFramework!'. PHP_EOL . PHP_EOL;
45
+        '    Thank for installing winforms-php/VoidFramework!'. PHP_EOL . PHP_EOL;
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -1,45 +1,45 @@
 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
-$info['scripts']['start'] = '"qero-packages'. str_replace (dirname (__DIR__, 3), '', __DIR__) .'/core/VoidCore.exe" "app/start.php"';
25
+$info['scripts']['start'] = '"qero-packages'.str_replace(dirname(__DIR__, 3), '', __DIR__).'/core/VoidCore.exe" "app/start.php"';
26 26
 
27
-file_put_contents (QERO_DIR .'/qero-info.json', json_encode ($info, defined ('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0));
28
-file_put_contents (QERO_DIR .'/start.bat', '@echo off
27
+file_put_contents(QERO_DIR.'/qero-info.json', json_encode($info, defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 0));
28
+file_put_contents(QERO_DIR.'/start.bat', '@echo off
29 29
 '. $info['scripts']['start']);
30 30
 
31
-if (!is_dir (QERO_DIR .'/app'))
31
+if (!is_dir(QERO_DIR.'/app'))
32 32
 {
33
-    echo '    Configuring application...'. PHP_EOL;
33
+    echo '    Configuring application...'.PHP_EOL;
34 34
 
35
-    mkdir (QERO_DIR .'/app');
36
-    dir_copy (__DIR__ .'/app_bundle', QERO_DIR .'/app');
35
+    mkdir(QERO_DIR.'/app');
36
+    dir_copy(__DIR__.'/app_bundle', QERO_DIR.'/app');
37 37
 }
38 38
 
39
-Qero\dir_delete (__DIR__ .'/app_bundle');
40
-unlink (__FILE__);
41
-unlink ('.gitignore');
42
-unlink ('README.md');
39
+Qero\dir_delete(__DIR__.'/app_bundle');
40
+unlink(__FILE__);
41
+unlink('.gitignore');
42
+unlink('README.md');
43 43
 
44
-echo '    Configuration completed'. PHP_EOL .
45
-     '    Thank for installing winforms-php/VoidFramework!'. PHP_EOL . PHP_EOL;
44
+echo '    Configuration completed'.PHP_EOL.
45
+     '    Thank for installing winforms-php/VoidFramework!'.PHP_EOL.PHP_EOL;
Please login to merge, or discard this patch.
engine/extensions/VLF/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
     public $name; // Имя объекта
43 43
     public $link; // АСД-ссылка на объект
44 44
 
45
-    public function __construct (string $name, int $link)
45
+    public function __construct(string $name, int $link)
46 46
     {
47 47
         $this->name = $name;
48 48
         $this->link = $link;
Please login to merge, or discard this patch.
engine/extensions/VLF/bin/importer.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 
5 5
 class VLFImporter
6 6
 {
7
-    static function import (string $vlf, PropertyGrid $propertyGrid, ListBox $eventsList, ComboBox $currentSelectedItem, TabControl $formsList, array $settings = array (
7
+    static function import(string $vlf, PropertyGrid $propertyGrid, ListBox $eventsList, ComboBox $currentSelectedItem, TabControl $formsList, array $settings = array(
8 8
         'strong_line_parser'            => false,
9 9
         'ignore_postobject_info'        => true,
10 10
         'ignore_unexpected_method_args' => true,
@@ -13,20 +13,20 @@  discard block
 block discarded – undo
13 13
         'debug_mode'  => false
14 14
     )): array
15 15
     {
16
-        $objects   = VLFInterpreter::run (new VLFParser ($vlf, $settings));
16
+        $objects   = VLFInterpreter::run(new VLFParser($vlf, $settings));
17 17
         $designers = [];
18 18
 
19 19
         foreach ($objects as $name => $object)
20 20
             if ($object instanceof Form)
21 21
             {
22
-                $page = new TabPage ($name);
23
-                $designers[$object->selector] = new VoidDesigner ($page, $name, $propertyGrid, $eventsList, $currentSelectedItem, $formsList, $object);
22
+                $page = new TabPage($name);
23
+                $designers[$object->selector] = new VoidDesigner($page, $name, $propertyGrid, $eventsList, $currentSelectedItem, $formsList, $object);
24 24
 
25 25
                 $designers[$object->selector]->form->text = $object->text;
26 26
 
27
-                VoidStudioAPI::addObjects ('main', ['Designer__'. $name .'Designer' => $designers[$object->selector]]);
27
+                VoidStudioAPI::addObjects('main', ['Designer__'.$name.'Designer' => $designers[$object->selector]]);
28 28
 
29
-                $formsList->items->add ($page);
29
+                $formsList->items->add($page);
30 30
                 $formsList->selectedTab = $page->selector;
31 31
             }
32 32
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                         $parent = $parent->parent;
39 39
 
40 40
                     if (isset ($designers[$parent->selector]))
41
-                        $designers[$parent->selector]->addComponent ($object->selector, $name);
41
+                        $designers[$parent->selector]->addComponent($object->selector, $name);
42 42
                 }
43 43
 
44 44
                 catch (\Throwable $e) {}
Please login to merge, or discard this patch.
Braces   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -16,10 +16,11 @@  discard block
 block discarded – undo
16 16
         $objects   = VLFInterpreter::run (new VLFParser ($vlf, $settings));
17 17
         $designers = [];
18 18
 
19
-        foreach ($objects as $name => $object)
20
-            if ($object instanceof Form)
19
+        foreach ($objects as $name => $object) {
20
+                    if ($object instanceof Form)
21 21
             {
22 22
                 $page = new TabPage ($name);
23
+        }
23 24
                 $designers[$object->selector] = new VoidDesigner ($page, $name, $propertyGrid, $eventsList, $currentSelectedItem, $formsList, $object);
24 25
 
25 26
                 $designers[$object->selector]->form->text = $object->text;
@@ -28,20 +29,19 @@  discard block
 block discarded – undo
28 29
 
29 30
                 $formsList->items->add ($page);
30 31
                 $formsList->selectedTab = $page->selector;
31
-            }
32
-
33
-            elseif ($object instanceof Control)
34
-                try
32
+            } elseif ($object instanceof Control) {
33
+                            try
35 34
                 {
36 35
                     $parent = $object->parent;
37
-                    while (!isset ($designers[$parent->selector]) && $parent->parent)
38
-                        $parent = $parent->parent;
39
-
40
-                    if (isset ($designers[$parent->selector]))
41
-                        $designers[$parent->selector]->addComponent ($object->selector, $name);
42
-                }
43
-
44
-                catch (\Throwable $e) {}
36
+            }
37
+                    while (!isset ($designers[$parent->selector]) && $parent->parent) {
38
+                                            $parent = $parent->parent;
39
+                    }
40
+
41
+                    if (isset ($designers[$parent->selector])) {
42
+                                            $designers[$parent->selector]->addComponent ($object->selector, $name);
43
+                    }
44
+                } catch (\Throwable $e) {}
45 45
 
46 46
         return $designers;
47 47
     }
Please login to merge, or discard this patch.
engine/extensions/VLF/bin/interpreter.php 2 patches
Spacing   +55 added lines, -56 removed lines patch added patch discarded remove patch
@@ -20,13 +20,13 @@  discard block
 block discarded – undo
20 20
      * @return array - возвращает список созданных объектов
21 21
      */
22 22
 
23
-    public static function run ($syntaxTree, string $resourcesDir = null, array $parent = null): array
23
+    public static function run($syntaxTree, string $resourcesDir = null, array $parent = null): array
24 24
     {
25 25
         if ($syntaxTree instanceof VLFParser)
26 26
             $syntaxTree = $syntaxTree->tree;
27 27
 
28
-        elseif (!is_array ($syntaxTree) && self::$throw_errors)
29
-            throw new \Exception ('$syntaxTree argument must be instance of VoidEngine\VLFParser or contains Abstract Syntax Tree - multi-dimensional array');
28
+        elseif (!is_array($syntaxTree) && self::$throw_errors)
29
+            throw new \Exception('$syntaxTree argument must be instance of VoidEngine\VLFParser or contains Abstract Syntax Tree - multi-dimensional array');
30 30
 
31 31
         foreach ($syntaxTree as $id => $syntaxInfo)
32 32
             if (isset ($syntaxInfo['type']))
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
                             $args = $syntaxInfo['info']['arguments'];
44 44
 
45 45
                             foreach ($args as $arg_id => $arg)
46
-                                if (is_object ($arg) && $arg instanceof VLFLink)
46
+                                if (is_object($arg) && $arg instanceof VLFLink)
47 47
                                     $args[$arg_id] = isset (self::$objects[$arg->name]) ?
48
-                                        self::formatLine ($arg->name, self::$objects) : null;
48
+                                        self::formatLine($arg->name, self::$objects) : null;
49 49
 
50
-                                else $args[$arg_id] = self::formatLine ($arg, self::$objects);
50
+                                else $args[$arg_id] = self::formatLine($arg, self::$objects);
51 51
                         }
52 52
 
53 53
                         try
54 54
                         {
55
-                            self::$objects[$name] = eval ("namespace VoidEngine; return new $class (". implode (', ', $args) .");");
55
+                            self::$objects[$name] = eval ("namespace VoidEngine; return new $class (".implode(', ', $args).");");
56 56
 
57 57
                             try
58 58
                             {
@@ -65,12 +65,12 @@  discard block
 block discarded – undo
65 65
                         catch (\Throwable $e)
66 66
                         {
67 67
                             if (self::$throw_errors)
68
-                                throw new \Exception ('Interpeter couldn\'t create object "'. $class .'" with name "'. $name .'" at line "'. $syntaxInfo['line'] .'". Exception info:'. "\n\n". (string) $e, 0, $e);
68
+                                throw new \Exception('Interpeter couldn\'t create object "'.$class.'" with name "'.$name.'" at line "'.$syntaxInfo['line'].'". Exception info:'."\n\n".(string) $e, 0, $e);
69 69
                         }
70 70
                     break;
71 71
 
72 72
                     case VLF_SUBOBJECT_DEFINITION:
73
-                        self::$objects = self::run ((new VLFParser ($syntaxInfo['info']['object_vlf_info']))->tree, null, $syntaxInfo);
73
+                        self::$objects = self::run((new VLFParser($syntaxInfo['info']['object_vlf_info']))->tree, null, $syntaxInfo);
74 74
                     break;
75 75
 
76 76
                     case VLF_PROPERTY_SET:
@@ -80,34 +80,34 @@  discard block
 block discarded – undo
80 80
                             $propertyValue = $syntaxInfo['info']['property_value'];
81 81
                             $preset        = '';
82 82
 
83
-                            if (is_object ($propertyValue) && $propertyValue instanceof VLFLink)
83
+                            if (is_object($propertyValue) && $propertyValue instanceof VLFLink)
84 84
                                 $propertyValue = isset (self::$objects[$propertyValue->name]) ?
85
-                                    self::formatLine ($propertyValue->name, self::$objects) : null;
85
+                                    self::formatLine($propertyValue->name, self::$objects) : null;
86 86
 
87
-                            elseif (preg_match ('/function \((.*)\) use \((.*)\)/', $propertyValue))
87
+                            elseif (preg_match('/function \((.*)\) use \((.*)\)/', $propertyValue))
88 88
                             {
89
-                                $use = substr ($propertyValue, strpos ($propertyValue, 'use'));
90
-                                $use = $ouse = substr ($use, ($pos = strpos ($use, '(') + 1), strpos ($use, ')') - $pos);
91
-                                $use = explode (' ', $use);
89
+                                $use = substr($propertyValue, strpos($propertyValue, 'use'));
90
+                                $use = $ouse = substr($use, ($pos = strpos($use, '(') + 1), strpos($use, ')') - $pos);
91
+                                $use = explode(' ', $use);
92 92
 
93 93
                                 foreach ($use as $id => $useParam)  
94 94
                                     if (isset (self::$objects[$useParam]) && $use[$id + 1][0] == '$')
95 95
                                     {
96 96
                                         $fname = $use[$id + 1];
97 97
 
98
-                                        if (substr ($fname, strlen ($fname) - 1) == ',')
99
-                                            $fname = substr ($fname, 0, -1);
98
+                                        if (substr($fname, strlen($fname) - 1) == ',')
99
+                                            $fname = substr($fname, 0, -1);
100 100
 
101 101
                                         $preset .= "$fname = $useParam; ";
102 102
 
103 103
                                         unset ($use[$id]);
104 104
                                     }
105 105
 
106
-                                $preset        = self::formatLine ($preset, self::$objects);
107
-                                $propertyValue = self::formatLine (str_replace ($ouse, join (' ', $use), $propertyValue), self::$objects);
106
+                                $preset        = self::formatLine($preset, self::$objects);
107
+                                $propertyValue = self::formatLine(str_replace($ouse, join(' ', $use), $propertyValue), self::$objects);
108 108
                             }
109 109
 
110
-                            else $propertyValue = self::formatLine ($propertyValue, self::$objects);
110
+                            else $propertyValue = self::formatLine($propertyValue, self::$objects);
111 111
 
112 112
                             try
113 113
                             {
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
                                 {
121 121
                                     $propertyValue = $syntaxInfo['info']['property_raw_value'];
122 122
 
123
-                                    if (strpos ($propertyName, '->') !== false)
124
-                                        eval ('namespace VoidEngine; '. $preset .' _c('. self::$objects[$name]->selector .')->'. $propertyName .' = '. $propertyValue .';');
123
+                                    if (strpos($propertyName, '->') !== false)
124
+                                        eval ('namespace VoidEngine; '.$preset.' _c('.self::$objects[$name]->selector.')->'.$propertyName.' = '.$propertyValue.';');
125 125
 
126 126
                                     else self::$objects[$name]->$propertyName = eval ("namespace VoidEngine; $preset return $propertyValue;");
127 127
                                 }
@@ -129,13 +129,13 @@  discard block
 block discarded – undo
129 129
                                 catch (\Throwable $e)
130 130
                                 {
131 131
                                     if (self::$throw_errors)
132
-                                        throw new \Exception ('Interpeter couldn\'t set property "'. $propertyName .'" with value "'. $propertyValue .'" at line "'. $syntaxInfo['line'] .'". Exception info:'. "\n\n". (string) $e, 0, $e);
132
+                                        throw new \Exception('Interpeter couldn\'t set property "'.$propertyName.'" with value "'.$propertyValue.'" at line "'.$syntaxInfo['line'].'". Exception info:'."\n\n".(string) $e, 0, $e);
133 133
                                 }
134 134
                             }
135 135
                         }
136 136
 
137 137
                         elseif (self::$throw_errors)
138
-                            throw new \Exception ('Setting property to an non-object at line "'. $syntaxInfo['line']);
138
+                            throw new \Exception('Setting property to an non-object at line "'.$syntaxInfo['line']);
139 139
                     break;
140 140
 
141 141
                     case VLF_METHOD_CALL:
@@ -145,58 +145,58 @@  discard block
 block discarded – undo
145 145
                             $methodArgs = $syntaxInfo['info']['method_arguments'];
146 146
 
147 147
                             foreach ($methodArgs as $arg_id => $arg)
148
-                                if (is_object ($arg) && $arg instanceof VLFLink)
148
+                                if (is_object($arg) && $arg instanceof VLFLink)
149 149
                                     $methodArgs[$arg_id] = isset (self::$objects[$arg->name]) ?
150
-                                        self::formatLine ($arg->name, self::$objects) : null;
150
+                                        self::formatLine($arg->name, self::$objects) : null;
151 151
 
152
-                                else $methodArgs[$arg_id] = self::formatLine ($arg, self::$objects);
152
+                                else $methodArgs[$arg_id] = self::formatLine($arg, self::$objects);
153 153
 
154 154
                             try
155 155
                             {
156
-                                if (strpos ($methodName, '->') !== false && self::$allow_multimethods_calls)
157
-                                    eval ('namespace VoidEngine; _c('. self::$objects[$name]->selector .')->'. $methodName .' ('. implode (', ', $methodArgs) .');');
156
+                                if (strpos($methodName, '->') !== false && self::$allow_multimethods_calls)
157
+                                    eval ('namespace VoidEngine; _c('.self::$objects[$name]->selector.')->'.$methodName.' ('.implode(', ', $methodArgs).');');
158 158
 
159
-                                else self::$objects[$name]->$methodName (...$methodArgs);
159
+                                else self::$objects[$name]->$methodName(...$methodArgs);
160 160
                             }
161 161
 
162 162
                             catch (\Throwable $e)
163 163
                             {
164 164
                                 if (self::$throw_errors)
165
-                                    throw new \Exception ('Interpeter couldn\'t call method "'. $methodName .'" with arguments '. json_encode ($methodArgs) .' at line "'. $syntaxInfo['line'] .'". Exception info:'. "\n\n". (string) $e, 0, $e);
165
+                                    throw new \Exception('Interpeter couldn\'t call method "'.$methodName.'" with arguments '.json_encode($methodArgs).' at line "'.$syntaxInfo['line'].'". Exception info:'."\n\n".(string) $e, 0, $e);
166 166
                             }
167 167
                         }
168 168
 
169 169
                         elseif (self::$throw_errors)
170
-                            throw new \Exception ('Calling method to an non-object at line "'. $syntaxInfo['line'] .'"');
170
+                            throw new \Exception('Calling method to an non-object at line "'.$syntaxInfo['line'].'"');
171 171
                     break;
172 172
 
173 173
                     case VLF_RUNTIME_EXECUTABLE:
174
-                        eval (self::formatLine ($syntaxInfo['info']['code'], self::$objects));
174
+                        eval (self::formatLine($syntaxInfo['info']['code'], self::$objects));
175 175
                     break;
176 176
                 }
177 177
 
178
-                if (isset ($syntaxInfo['syntax_nodes']) && sizeof ($syntaxInfo['syntax_nodes']) > 0)
179
-                    self::$objects = self::run ($syntaxInfo['syntax_nodes'], null, $syntaxInfo);
178
+                if (isset ($syntaxInfo['syntax_nodes']) && sizeof($syntaxInfo['syntax_nodes']) > 0)
179
+                    self::$objects = self::run($syntaxInfo['syntax_nodes'], null, $syntaxInfo);
180 180
             }
181 181
 
182
-            else throw new \Exception ('Catched unknown syntax node: "'. json_encode ($syntaxInfo) .'"');
182
+            else throw new \Exception('Catched unknown syntax node: "'.json_encode($syntaxInfo).'"');
183 183
 
184
-        if (is_dir ($resourcesDir))
185
-            foreach (glob ($resourcesDir .'/*.vrsf') as $id => $dir)
184
+        if (is_dir($resourcesDir))
185
+            foreach (glob($resourcesDir.'/*.vrsf') as $id => $dir)
186 186
             {
187
-                $baseName = basenameNoExt ($dir);
188
-                $info     = explode ('.', $baseName);
187
+                $baseName = basenameNoExt($dir);
188
+                $info     = explode('.', $baseName);
189 189
 
190 190
                 if (isset (self::$objects[$info[0]]))
191 191
                 {
192 192
                     if (isset ($info[2]))
193 193
                     {
194
-                        $collection = VoidEngine::getProperty (self::$objects[$info[0]]->selector, $info[1]);
194
+                        $collection = VoidEngine::getProperty(self::$objects[$info[0]]->selector, $info[1]);
195 195
                         
196
-                        VoidEngine::callMethod ($collection, 'Add', [VoidEngine::importObject (base64_encode (file_get_contents ($dir))), 'object']);
196
+                        VoidEngine::callMethod($collection, 'Add', [VoidEngine::importObject(base64_encode(file_get_contents($dir))), 'object']);
197 197
                     }
198 198
                     
199
-                    else VoidEngine::setProperty (self::$objects[$info[0]]->selector, $info[1], VoidEngine::importObject (base64_encode (file_get_contents ($dir))));
199
+                    else VoidEngine::setProperty(self::$objects[$info[0]]->selector, $info[1], VoidEngine::importObject(base64_encode(file_get_contents($dir))));
200 200
                 }
201 201
             }
202 202
 
@@ -213,26 +213,25 @@  discard block
 block discarded – undo
213 213
      * @return string - возвращает форматированную строку
214 214
      */
215 215
 
216
-    public static function formatLine (string $line, array $objects = []): string
216
+    public static function formatLine(string $line, array $objects = []): string
217 217
     {
218
-        if (sizeof ($objects) > 0)
218
+        if (sizeof($objects) > 0)
219 219
         {
220
-            $len     = strlen ($line);
220
+            $len     = strlen($line);
221 221
             $newLine = '';
222 222
 
223
-            $replacement = array_map (function ($object)
223
+            $replacement = array_map(function($object)
224 224
             {
225
-                return Components::componentExists ($object->selector) !== false ? 
226
-                    '\VoidEngine\_c('. $object->selector .')' :
227
-                    'unserialize (\''. serialize ($object) .'\')';
225
+                return Components::componentExists($object->selector) !== false ? 
226
+                    '\VoidEngine\_c('.$object->selector.')' : 'unserialize (\''.serialize($object).'\')';
228 227
             }, $objects);
229 228
 
230
-            $replacement = array_map (function ($name)
229
+            $replacement = array_map(function($name)
231 230
             {
232
-                return strlen ($name = trim ($name)) + substr_count ($name, '_');
233
-            }, $omap = array_flip ($replacement));
231
+                return strlen($name = trim($name)) + substr_count($name, '_');
232
+            }, $omap = array_flip($replacement));
234 233
 
235
-            arsort ($replacement);
234
+            arsort($replacement);
236 235
 
237 236
             $nReplacement = [];
238 237
 
@@ -240,14 +239,14 @@  discard block
 block discarded – undo
240 239
                 $nReplacement[$omap[$replaceTo]] = $replaceTo;
241 240
 
242 241
             $replacement = $nReplacement;
243
-            $blacklist   = array_flip (['\'', '"', '$']);
242
+            $blacklist   = array_flip(['\'', '"', '$']);
244 243
 
245 244
             for ($i = 0; $i < $len; ++$i)
246 245
             {
247 246
                 $replaced = false;
248 247
 
249 248
                 foreach ($replacement as $name => $replaceAt)
250
-                    if (substr ($line, $i, ($l = strlen ($name))) == $name && !isset ($blacklist[$line[$i - 1]]))
249
+                    if (substr($line, $i, ($l = strlen($name))) == $name && !isset ($blacklist[$line[$i - 1]]))
251 250
                     {
252 251
                         $newLine .= $replaceAt;
253 252
 
Please login to merge, or discard this patch.
Braces   +78 added lines, -72 removed lines patch added patch discarded remove patch
@@ -22,19 +22,20 @@  discard block
 block discarded – undo
22 22
 
23 23
     public static function run ($syntaxTree, string $resourcesDir = null, array $parent = null): array
24 24
     {
25
-        if ($syntaxTree instanceof VLFParser)
26
-            $syntaxTree = $syntaxTree->tree;
27
-
28
-        elseif (!is_array ($syntaxTree) && self::$throw_errors)
29
-            throw new \Exception ('$syntaxTree argument must be instance of VoidEngine\VLFParser or contains Abstract Syntax Tree - multi-dimensional array');
25
+        if ($syntaxTree instanceof VLFParser) {
26
+                    $syntaxTree = $syntaxTree->tree;
27
+        } elseif (!is_array ($syntaxTree) && self::$throw_errors) {
28
+                    throw new \Exception ('$syntaxTree argument must be instance of VoidEngine\VLFParser or contains Abstract Syntax Tree - multi-dimensional array');
29
+        }
30 30
 
31
-        foreach ($syntaxTree as $id => $syntaxInfo)
32
-            if (isset ($syntaxInfo['type']))
31
+        foreach ($syntaxTree as $id => $syntaxInfo) {
32
+                    if (isset ($syntaxInfo['type']))
33 33
             {
34 34
                 switch ($syntaxInfo['type'])
35 35
                 {
36 36
                     case VLF_OBJECT_DEFINITION:
37 37
                         $class = $syntaxInfo['info']['object_class'];
38
+        }
38 39
                         $name  = $syntaxInfo['info']['object_name'];
39 40
                         $args  = [];
40 41
 
@@ -42,12 +43,15 @@  discard block
 block discarded – undo
42 43
                         {
43 44
                             $args = $syntaxInfo['info']['arguments'];
44 45
 
45
-                            foreach ($args as $arg_id => $arg)
46
-                                if (is_object ($arg) && $arg instanceof VLFLink)
46
+                            foreach ($args as $arg_id => $arg) {
47
+                                                            if (is_object ($arg) && $arg instanceof VLFLink)
47 48
                                     $args[$arg_id] = isset (self::$objects[$arg->name]) ?
48 49
                                         self::formatLine ($arg->name, self::$objects) : null;
50
+                            }
49 51
 
50
-                                else $args[$arg_id] = self::formatLine ($arg, self::$objects);
52
+                                else {
53
+                                    $args[$arg_id] = self::formatLine ($arg, self::$objects);
54
+                                }
51 55
                         }
52 56
 
53 57
                         try
@@ -57,15 +61,12 @@  discard block
 block discarded – undo
57 61
                             try
58 62
                             {
59 63
                                 self::$objects[$name]->name = $name;
60
-                            }
61
-
62
-                            catch (\Throwable $e) {}
63
-                        }
64
-
65
-                        catch (\Throwable $e)
64
+                            } catch (\Throwable $e) {}
65
+                        } catch (\Throwable $e)
66 66
                         {
67
-                            if (self::$throw_errors)
68
-                                throw new \Exception ('Interpeter couldn\'t create object "'. $class .'" with name "'. $name .'" at line "'. $syntaxInfo['line'] .'". Exception info:'. "\n\n". (string) $e, 0, $e);
67
+                            if (self::$throw_errors) {
68
+                                                            throw new \Exception ('Interpeter couldn\'t create object "'. $class .'" with name "'. $name .'" at line "'. $syntaxInfo['line'] .'". Exception info:'. "\n\n". (string) $e, 0, $e);
69
+                            }
69 70
                         }
70 71
                     break;
71 72
 
@@ -80,23 +81,24 @@  discard block
 block discarded – undo
80 81
                             $propertyValue = $syntaxInfo['info']['property_value'];
81 82
                             $preset        = '';
82 83
 
83
-                            if (is_object ($propertyValue) && $propertyValue instanceof VLFLink)
84
-                                $propertyValue = isset (self::$objects[$propertyValue->name]) ?
84
+                            if (is_object ($propertyValue) && $propertyValue instanceof VLFLink) {
85
+                                                            $propertyValue = isset (self::$objects[$propertyValue->name]) ?
85 86
                                     self::formatLine ($propertyValue->name, self::$objects) : null;
86
-
87
-                            elseif (preg_match ('/function \((.*)\) use \((.*)\)/', $propertyValue))
87
+                            } elseif (preg_match ('/function \((.*)\) use \((.*)\)/', $propertyValue))
88 88
                             {
89 89
                                 $use = substr ($propertyValue, strpos ($propertyValue, 'use'));
90 90
                                 $use = $ouse = substr ($use, ($pos = strpos ($use, '(') + 1), strpos ($use, ')') - $pos);
91 91
                                 $use = explode (' ', $use);
92 92
 
93
-                                foreach ($use as $id => $useParam)  
94
-                                    if (isset (self::$objects[$useParam]) && $use[$id + 1][0] == '$')
93
+                                foreach ($use as $id => $useParam) {
94
+                                                                    if (isset (self::$objects[$useParam]) && $use[$id + 1][0] == '$')
95 95
                                     {
96 96
                                         $fname = $use[$id + 1];
97
+                                }
97 98
 
98
-                                        if (substr ($fname, strlen ($fname) - 1) == ',')
99
-                                            $fname = substr ($fname, 0, -1);
99
+                                        if (substr ($fname, strlen ($fname) - 1) == ',') {
100
+                                                                                    $fname = substr ($fname, 0, -1);
101
+                                        }
100 102
 
101 103
                                         $preset .= "$fname = $useParam; ";
102 104
 
@@ -105,37 +107,34 @@  discard block
 block discarded – undo
105 107
 
106 108
                                 $preset        = self::formatLine ($preset, self::$objects);
107 109
                                 $propertyValue = self::formatLine (str_replace ($ouse, join (' ', $use), $propertyValue), self::$objects);
110
+                            } else {
111
+                                $propertyValue = self::formatLine ($propertyValue, self::$objects);
108 112
                             }
109 113
 
110
-                            else $propertyValue = self::formatLine ($propertyValue, self::$objects);
111
-
112 114
                             try
113 115
                             {
114 116
                                 self::$objects[$name]->$propertyName = eval ("namespace VoidEngine; $preset return $propertyValue;");
115
-                            }
116
-
117
-                            catch (\Throwable $e)
117
+                            } catch (\Throwable $e)
118 118
                             {
119 119
                                 try
120 120
                                 {
121 121
                                     $propertyValue = $syntaxInfo['info']['property_raw_value'];
122 122
 
123
-                                    if (strpos ($propertyName, '->') !== false)
124
-                                        eval ('namespace VoidEngine; '. $preset .' _c('. self::$objects[$name]->selector .')->'. $propertyName .' = '. $propertyValue .';');
125
-
126
-                                    else self::$objects[$name]->$propertyName = eval ("namespace VoidEngine; $preset return $propertyValue;");
127
-                                }
128
-
129
-                                catch (\Throwable $e)
123
+                                    if (strpos ($propertyName, '->') !== false) {
124
+                                                                            eval ('namespace VoidEngine; '. $preset .' _c('. self::$objects[$name]->selector .')->'. $propertyName .' = '. $propertyValue .';');
125
+                                    } else {
126
+                                        self::$objects[$name]->$propertyName = eval ("namespace VoidEngine; $preset return $propertyValue;");
127
+                                    }
128
+                                } catch (\Throwable $e)
130 129
                                 {
131
-                                    if (self::$throw_errors)
132
-                                        throw new \Exception ('Interpeter couldn\'t set property "'. $propertyName .'" with value "'. $propertyValue .'" at line "'. $syntaxInfo['line'] .'". Exception info:'. "\n\n". (string) $e, 0, $e);
130
+                                    if (self::$throw_errors) {
131
+                                                                            throw new \Exception ('Interpeter couldn\'t set property "'. $propertyName .'" with value "'. $propertyValue .'" at line "'. $syntaxInfo['line'] .'". Exception info:'. "\n\n". (string) $e, 0, $e);
132
+                                    }
133 133
                                 }
134 134
                             }
135
+                        } elseif (self::$throw_errors) {
136
+                                                    throw new \Exception ('Setting property to an non-object at line "'. $syntaxInfo['line']);
135 137
                         }
136
-
137
-                        elseif (self::$throw_errors)
138
-                            throw new \Exception ('Setting property to an non-object at line "'. $syntaxInfo['line']);
139 138
                     break;
140 139
 
141 140
                     case VLF_METHOD_CALL:
@@ -144,30 +143,32 @@  discard block
 block discarded – undo
144 143
                             $methodName = $syntaxInfo['info']['method_name'];
145 144
                             $methodArgs = $syntaxInfo['info']['method_arguments'];
146 145
 
147
-                            foreach ($methodArgs as $arg_id => $arg)
148
-                                if (is_object ($arg) && $arg instanceof VLFLink)
146
+                            foreach ($methodArgs as $arg_id => $arg) {
147
+                                                            if (is_object ($arg) && $arg instanceof VLFLink)
149 148
                                     $methodArgs[$arg_id] = isset (self::$objects[$arg->name]) ?
150 149
                                         self::formatLine ($arg->name, self::$objects) : null;
150
+                            }
151 151
 
152
-                                else $methodArgs[$arg_id] = self::formatLine ($arg, self::$objects);
152
+                                else {
153
+                                    $methodArgs[$arg_id] = self::formatLine ($arg, self::$objects);
154
+                                }
153 155
 
154 156
                             try
155 157
                             {
156
-                                if (strpos ($methodName, '->') !== false && self::$allow_multimethods_calls)
157
-                                    eval ('namespace VoidEngine; _c('. self::$objects[$name]->selector .')->'. $methodName .' ('. implode (', ', $methodArgs) .');');
158
-
159
-                                else self::$objects[$name]->$methodName (...$methodArgs);
160
-                            }
161
-
162
-                            catch (\Throwable $e)
158
+                                if (strpos ($methodName, '->') !== false && self::$allow_multimethods_calls) {
159
+                                                                    eval ('namespace VoidEngine; _c('. self::$objects[$name]->selector .')->'. $methodName .' ('. implode (', ', $methodArgs) .');');
160
+                                } else {
161
+                                    self::$objects[$name]->$methodName (...$methodArgs);
162
+                                }
163
+                            } catch (\Throwable $e)
163 164
                             {
164
-                                if (self::$throw_errors)
165
-                                    throw new \Exception ('Interpeter couldn\'t call method "'. $methodName .'" with arguments '. json_encode ($methodArgs) .' at line "'. $syntaxInfo['line'] .'". Exception info:'. "\n\n". (string) $e, 0, $e);
165
+                                if (self::$throw_errors) {
166
+                                                                    throw new \Exception ('Interpeter couldn\'t call method "'. $methodName .'" with arguments '. json_encode ($methodArgs) .' at line "'. $syntaxInfo['line'] .'". Exception info:'. "\n\n". (string) $e, 0, $e);
167
+                                }
166 168
                             }
169
+                        } elseif (self::$throw_errors) {
170
+                                                    throw new \Exception ('Calling method to an non-object at line "'. $syntaxInfo['line'] .'"');
167 171
                         }
168
-
169
-                        elseif (self::$throw_errors)
170
-                            throw new \Exception ('Calling method to an non-object at line "'. $syntaxInfo['line'] .'"');
171 172
                     break;
172 173
 
173 174
                     case VLF_RUNTIME_EXECUTABLE:
@@ -175,16 +176,18 @@  discard block
 block discarded – undo
175 176
                     break;
176 177
                 }
177 178
 
178
-                if (isset ($syntaxInfo['syntax_nodes']) && sizeof ($syntaxInfo['syntax_nodes']) > 0)
179
-                    self::$objects = self::run ($syntaxInfo['syntax_nodes'], null, $syntaxInfo);
179
+                if (isset ($syntaxInfo['syntax_nodes']) && sizeof ($syntaxInfo['syntax_nodes']) > 0) {
180
+                                    self::$objects = self::run ($syntaxInfo['syntax_nodes'], null, $syntaxInfo);
181
+                }
182
+            } else {
183
+                throw new \Exception ('Catched unknown syntax node: "'. json_encode ($syntaxInfo) .'"');
180 184
             }
181 185
 
182
-            else throw new \Exception ('Catched unknown syntax node: "'. json_encode ($syntaxInfo) .'"');
183
-
184
-        if (is_dir ($resourcesDir))
185
-            foreach (glob ($resourcesDir .'/*.vrsf') as $id => $dir)
186
+        if (is_dir ($resourcesDir)) {
187
+                    foreach (glob ($resourcesDir .'/*.vrsf') as $id => $dir)
186 188
             {
187 189
                 $baseName = basenameNoExt ($dir);
190
+        }
188 191
                 $info     = explode ('.', $baseName);
189 192
 
190 193
                 if (isset (self::$objects[$info[0]]))
@@ -194,9 +197,9 @@  discard block
 block discarded – undo
194 197
                         $collection = VoidEngine::getProperty (self::$objects[$info[0]]->selector, $info[1]);
195 198
                         
196 199
                         VoidEngine::callMethod ($collection, 'Add', [VoidEngine::importObject (base64_encode (file_get_contents ($dir))), 'object']);
200
+                    } else {
201
+                        VoidEngine::setProperty (self::$objects[$info[0]]->selector, $info[1], VoidEngine::importObject (base64_encode (file_get_contents ($dir))));
197 202
                     }
198
-                    
199
-                    else VoidEngine::setProperty (self::$objects[$info[0]]->selector, $info[1], VoidEngine::importObject (base64_encode (file_get_contents ($dir))));
200 203
                 }
201 204
             }
202 205
 
@@ -236,8 +239,9 @@  discard block
 block discarded – undo
236 239
 
237 240
             $nReplacement = [];
238 241
 
239
-            foreach ($replacement as $replaceTo => $nLn)
240
-                $nReplacement[$omap[$replaceTo]] = $replaceTo;
242
+            foreach ($replacement as $replaceTo => $nLn) {
243
+                            $nReplacement[$omap[$replaceTo]] = $replaceTo;
244
+            }
241 245
 
242 246
             $replacement = $nReplacement;
243 247
             $blacklist   = array_flip (['\'', '"', '$']);
@@ -246,10 +250,11 @@  discard block
 block discarded – undo
246 250
             {
247 251
                 $replaced = false;
248 252
 
249
-                foreach ($replacement as $name => $replaceAt)
250
-                    if (substr ($line, $i, ($l = strlen ($name))) == $name && !isset ($blacklist[$line[$i - 1]]))
253
+                foreach ($replacement as $name => $replaceAt) {
254
+                                    if (substr ($line, $i, ($l = strlen ($name))) == $name && !isset ($blacklist[$line[$i - 1]]))
251 255
                     {
252 256
                         $newLine .= $replaceAt;
257
+                }
253 258
 
254 259
                         $i += $l - 1;
255 260
                         $replaced = true;
@@ -257,8 +262,9 @@  discard block
 block discarded – undo
257 262
                         break;
258 263
                     }
259 264
 
260
-                if (!$replaced)
261
-                    $newLine .= $line[$i];
265
+                if (!$replaced) {
266
+                                    $newLine .= $line[$i];
267
+                }
262 268
             }
263 269
 
264 270
             $line = $newLine;
Please login to merge, or discard this patch.
engine/extensions/WinAPI/main.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 {
30 30
     protected $WinAPI;
31 31
 
32
-    public function __construct ()
32
+    public function __construct()
33 33
     {
34 34
         /**
35 35
          * Большинство функций было взято из класса "WinAPI" проекта "DevelStudio XL"
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
          * 
41 41
          */
42 42
 
43
-        $this->WinAPI = \FFI::cdef ('
43
+        $this->WinAPI = \FFI::cdef('
44 44
             struct LPCTSTR
45 45
             {
46 46
                 char string;
@@ -76,25 +76,25 @@  discard block
 block discarded – undo
76 76
         ', 'User32.dll');
77 77
     }
78 78
 
79
-    public function __call ($method, $args)
79
+    public function __call($method, $args)
80 80
     {
81
-        if (method_exists ($this, $method))
82
-            return $this->$method (...$args);
81
+        if (method_exists($this, $method))
82
+            return $this->$method(...$args);
83 83
         
84 84
         else try
85 85
         {
86
-            return $this->WinAPI->$method (...$args);
86
+            return $this->WinAPI->$method(...$args);
87 87
         }
88 88
 
89 89
         catch (\Throwable $e)
90 90
         {
91
-            throw new \Exception ('Method "'. $method .'" not found or return an exception. Exception info: '. "\n\n". (string) $e);
91
+            throw new \Exception('Method "'.$method.'" not found or return an exception. Exception info: '."\n\n".(string) $e);
92 92
         }
93 93
     }
94 94
 
95
-    public function findWindow (string $caption, string $class = null): ?int
95
+    public function findWindow(string $caption, string $class = null): ?int
96 96
     {
97
-        return $this->FindWindowA ($class, $caption);
97
+        return $this->FindWindowA($class, $caption);
98 98
     }
99 99
 
100 100
     /*public function getWindowCaption (int $handle)
Please login to merge, or discard this patch.
Braces   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -78,15 +78,14 @@
 block discarded – undo
78 78
 
79 79
     public function __call ($method, $args)
80 80
     {
81
-        if (method_exists ($this, $method))
82
-            return $this->$method (...$args);
83
-        
84
-        else try
81
+        if (method_exists ($this, $method)) {
82
+                    return $this->$method (...$args);
83
+        } else {
84
+            try
85 85
         {
86 86
             return $this->WinAPI->$method (...$args);
87 87
         }
88
-
89
-        catch (\Throwable $e)
88
+        } catch (\Throwable $e)
90 89
         {
91 90
             throw new \Exception ('Method "'. $method .'" not found or return an exception. Exception info: '. "\n\n". (string) $e);
92 91
         }
Please login to merge, or discard this patch.
engine/common/Globals.php 2 patches
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -7,43 +7,43 @@  discard block
 block discarded – undo
7 7
     public $application;
8 8
     public $executablePath;
9 9
     
10
-    public function __construct ()
10
+    public function __construct()
11 11
     {
12
-        $this->application    = new WFClass ('System.Windows.Forms.Application');
12
+        $this->application    = new WFClass('System.Windows.Forms.Application');
13 13
         $this->executablePath = $this->application->executablePath;
14 14
     }
15 15
     
16
-    public function run ($form = null): void
16
+    public function run($form = null): void
17 17
     {
18 18
         if ($form instanceof WFObject)
19
-            $this->application->run ($form->selector);
19
+            $this->application->run($form->selector);
20 20
         
21
-        elseif (is_int ($form) && VoidEngine::objectExists ($form))
22
-            $this->application->run ($form);
21
+        elseif (is_int($form) && VoidEngine::objectExists($form))
22
+            $this->application->run($form);
23 23
         
24 24
         elseif ($form === null)
25
-            $this->application->run ();
25
+            $this->application->run();
26 26
 
27
-        else throw new \Exception ('$form param must be instance of "VoidEngine\WFObject" ("VoidEngine\Form"), be null or object selector');
27
+        else throw new \Exception('$form param must be instance of "VoidEngine\WFObject" ("VoidEngine\Form"), be null or object selector');
28 28
     }
29 29
     
30
-    public function restart (): void
30
+    public function restart(): void
31 31
     {
32
-        $this->application->restart ();
33
-        $this->close ();
32
+        $this->application->restart();
33
+        $this->close();
34 34
     }
35 35
     
36
-    public function close (): void
36
+    public function close(): void
37 37
     {
38
-        $this->application->exit ();
38
+        $this->application->exit();
39 39
     }
40 40
 
41
-    public function __call (string $name, array $args)
41
+    public function __call(string $name, array $args)
42 42
     {
43
-        return $this->application->$name (...$args);
43
+        return $this->application->$name(...$args);
44 44
     }
45 45
 
46
-    public function __get (string $name)
46
+    public function __get(string $name)
47 47
     {
48 48
         return $this->application->$name;
49 49
     }
@@ -53,14 +53,14 @@  discard block
 block discarded – undo
53 53
 {
54 54
     public $screen;
55 55
     
56
-    public function __construct ()
56
+    public function __construct()
57 57
     {
58
-        $this->screen = new WFClass ('System.Windows.Forms.Screen');
58
+        $this->screen = new WFClass('System.Windows.Forms.Screen');
59 59
     }
60 60
     
61
-    public function __get ($name)
61
+    public function __get($name)
62 62
     {
63
-        switch (strtolower ($name))
63
+        switch (strtolower($name))
64 64
         {
65 65
             case 'width':
66 66
             case 'w':
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
         }
79 79
     }
80 80
     
81
-    public function __debugInfo (): array
81
+    public function __debugInfo(): array
82 82
     {
83 83
         return [
84 84
             $this->w,
Please login to merge, or discard this patch.
Braces   +9 added lines, -10 removed lines patch added patch discarded remove patch
@@ -15,16 +15,15 @@
 block discarded – undo
15 15
     
16 16
     public function run ($form = null): void
17 17
     {
18
-        if ($form instanceof WFObject)
19
-            $this->application->run ($form->selector);
20
-        
21
-        elseif (is_int ($form) && VoidEngine::objectExists ($form))
22
-            $this->application->run ($form);
23
-        
24
-        elseif ($form === null)
25
-            $this->application->run ();
26
-
27
-        else throw new \Exception ('$form param must be instance of "VoidEngine\WFObject" ("VoidEngine\Form"), be null or object selector');
18
+        if ($form instanceof WFObject) {
19
+                    $this->application->run ($form->selector);
20
+        } elseif (is_int ($form) && VoidEngine::objectExists ($form)) {
21
+                    $this->application->run ($form);
22
+        } elseif ($form === null) {
23
+                    $this->application->run ();
24
+        } else {
25
+            throw new \Exception ('$form param must be instance of "VoidEngine\WFObject" ("VoidEngine\Form"), be null or object selector');
26
+        }
28 27
     }
29 28
     
30 29
     public function restart (): void
Please login to merge, or discard this patch.
engine/common/Constants.php 3 patches
Indentation   +299 added lines, -299 removed lines patch added patch discarded remove patch
@@ -8,338 +8,338 @@
 block discarded – undo
8 8
 $converter = new WFClass ('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 WFClass ('System.Environment', 'mscorlib');
6
-$params = $env->getCommandLineArgs ()->list;
5
+$env = new WFClass('System.Environment', 'mscorlib');
6
+$params = $env->getCommandLineArgs()->list;
7 7
 
8
-$converter = new WFClass ('System.Drawing.ColorTranslator');
8
+$converter = new WFClass('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
-VoidEngine::removeObjects ($converter->selector);
347
+VoidEngine::removeObjects($converter->selector);
348 348
 unset ($constants, $env, $params, $converter);
Please login to merge, or discard this patch.
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.
engine/components/Scintilla.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,11 +12,11 @@
 block discarded – undo
12 12
     protected $styles;
13 13
 
14 14
     public function __construct (Component $parent = null)
15
-	{
15
+    {
16 16
         parent::__construct ($parent, $this->class);
17 17
 
18 18
         $this->styles = $this->getProperty ('Styles');
19
-	}
19
+    }
20 20
 
21 21
     public function resetSyntax ()
22 22
     {
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace VoidEngine;
4 4
 
5
-EngineAdditions::loadModule ('ScintillaNET.dll');
5
+EngineAdditions::loadModule('ScintillaNET.dll');
6 6
 
7 7
 class Scintilla extends NoVisual
8 8
 {
@@ -11,71 +11,71 @@  discard block
 block discarded – undo
11 11
 
12 12
     protected $styles;
13 13
 
14
-    public function __construct (Component $parent = null)
14
+    public function __construct(Component $parent = null)
15 15
 	{
16
-        parent::__construct ($parent, $this->class);
16
+        parent::__construct($parent, $this->class);
17 17
 
18
-        $this->styles = $this->getProperty ('Styles');
18
+        $this->styles = $this->getProperty('Styles');
19 19
 	}
20 20
 
21
-    public function resetSyntax ()
21
+    public function resetSyntax()
22 22
     {
23
-        $this->callMethod ('StyleResetDefault');
23
+        $this->callMethod('StyleResetDefault');
24 24
     }
25 25
 
26
-    public function clearSyntax ()
26
+    public function clearSyntax()
27 27
     {
28
-        $this->callMethod ('StyleClearAll');
28
+        $this->callMethod('StyleClearAll');
29 29
     }
30 30
 
31
-    public function setKeywords (int $index, string $keywords)
31
+    public function setKeywords(int $index, string $keywords)
32 32
     {
33
-        $this->callMethod ('SetKeywords', [$index, 'int'], [$keywords, 'string']);
33
+        $this->callMethod('SetKeywords', [$index, 'int'], [$keywords, 'string']);
34 34
     }
35 35
 
36
-    public function propertyInit (string $propertyName, $propertyValue)
36
+    public function propertyInit(string $propertyName, $propertyValue)
37 37
     {
38
-        $this->callMethod ('SetProperty', [$propertyName, 'string'], [$propertyValue, 'string']);
38
+        $this->callMethod('SetProperty', [$propertyName, 'string'], [$propertyValue, 'string']);
39 39
     }
40 40
 
41
-    public function set_syntax ($syntax)
41
+    public function set_syntax($syntax)
42 42
     {
43
-        if (file_exists ($syntax))
44
-            $syntax = file_get_contents ($syntax);
43
+        if (file_exists($syntax))
44
+            $syntax = file_get_contents($syntax);
45 45
 
46
-        $syntax = json_decode ($syntax, true);
46
+        $syntax = json_decode($syntax, true);
47 47
 
48 48
         if (
49
-            !is_array ($syntax['syntax']) ||
50
-            !is_array ($syntax['references']) ||
49
+            !is_array($syntax['syntax']) ||
50
+            !is_array($syntax['references']) ||
51 51
             !isset ($syntax['lexer'])
52 52
         ) return false;
53 53
 
54 54
         else
55 55
         {
56
-            $this->resetSyntax ();
57
-            $this->clearSyntax ();
56
+            $this->resetSyntax();
57
+            $this->clearSyntax();
58 58
             
59 59
             foreach ($syntax['references'] as $name => $value)
60 60
                 if (isset ($syntax['syntax'][$name]))
61 61
                 {
62
-                    $element = VoidEngine::getArrayValue ($this->styles, $value);
62
+                    $element = VoidEngine::getArrayValue($this->styles, $value);
63 63
                     $color   = $syntax['syntax'][$name];
64 64
 
65
-                    if (defined ($color))
66
-                        $color = constant ($color);
65
+                    if (defined($color))
66
+                        $color = constant($color);
67 67
                     
68
-                    VoidEngine::setProperty ($element, 'ForeColor', [$color, 'color']);
68
+                    VoidEngine::setProperty($element, 'ForeColor', [$color, 'color']);
69 69
                 }
70 70
 
71 71
             $this->lexer = $syntax['lexer'];
72 72
 
73
-            if (is_array ($syntax['keywords']))
73
+            if (is_array($syntax['keywords']))
74 74
                 foreach ($syntax['keywords'] as $id => $keywords)
75
-                    $this->setKeywords ($id, $keywords);
75
+                    $this->setKeywords($id, $keywords);
76 76
 
77
-            $this->propertyInit ('fold', 1);
78
-            $this->propertyInit ('fold.compact', 1);
77
+            $this->propertyInit('fold', 1);
78
+            $this->propertyInit('fold.compact', 1);
79 79
 
80 80
             return true;
81 81
         }
Please login to merge, or discard this patch.
Braces   +15 added lines, -11 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@  discard block
 block discarded – undo
40 40
 
41 41
     public function set_syntax ($syntax)
42 42
     {
43
-        if (file_exists ($syntax))
44
-            $syntax = file_get_contents ($syntax);
43
+        if (file_exists ($syntax)) {
44
+                    $syntax = file_get_contents ($syntax);
45
+        }
45 46
 
46 47
         $syntax = json_decode ($syntax, true);
47 48
 
@@ -49,30 +50,33 @@  discard block
 block discarded – undo
49 50
             !is_array ($syntax['syntax']) ||
50 51
             !is_array ($syntax['references']) ||
51 52
             !isset ($syntax['lexer'])
52
-        ) return false;
53
-
54
-        else
53
+        ) {
54
+            return false;
55
+        } else
55 56
         {
56 57
             $this->resetSyntax ();
57 58
             $this->clearSyntax ();
58 59
             
59
-            foreach ($syntax['references'] as $name => $value)
60
-                if (isset ($syntax['syntax'][$name]))
60
+            foreach ($syntax['references'] as $name => $value) {
61
+                            if (isset ($syntax['syntax'][$name]))
61 62
                 {
62 63
                     $element = VoidEngine::getArrayValue ($this->styles, $value);
64
+            }
63 65
                     $color   = $syntax['syntax'][$name];
64 66
 
65
-                    if (defined ($color))
66
-                        $color = constant ($color);
67
+                    if (defined ($color)) {
68
+                                            $color = constant ($color);
69
+                    }
67 70
                     
68 71
                     VoidEngine::setProperty ($element, 'ForeColor', [$color, 'color']);
69 72
                 }
70 73
 
71 74
             $this->lexer = $syntax['lexer'];
72 75
 
73
-            if (is_array ($syntax['keywords']))
74
-                foreach ($syntax['keywords'] as $id => $keywords)
76
+            if (is_array ($syntax['keywords'])) {
77
+                            foreach ($syntax['keywords'] as $id => $keywords)
75 78
                     $this->setKeywords ($id, $keywords);
79
+            }
76 80
 
77 81
             $this->propertyInit ('fold', 1);
78 82
             $this->propertyInit ('fold.compact', 1);
Please login to merge, or discard this patch.
engine/components/ProgressBar.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -6,33 +6,33 @@
 block discarded – undo
6 6
 {
7 7
     public $class = 'System.Windows.Forms.ProgressBar';
8 8
 
9
-    public function get_max ()
9
+    public function get_max()
10 10
     {
11
-        return $this->getProperty ('Maximum');
11
+        return $this->getProperty('Maximum');
12 12
     }
13 13
 
14
-    public function set_max (int $max)
14
+    public function set_max(int $max)
15 15
     {
16
-        $this->setProperty ('Maximum', $max);
16
+        $this->setProperty('Maximum', $max);
17 17
     }
18 18
 
19
-    public function get_min ()
19
+    public function get_min()
20 20
     {
21
-        return $this->getProperty ('Minimum');
21
+        return $this->getProperty('Minimum');
22 22
     }
23 23
 
24
-    public function set_min (int $min)
24
+    public function set_min(int $min)
25 25
     {
26
-        $this->setProperty ('Minimum', $min);
26
+        $this->setProperty('Minimum', $min);
27 27
     }
28 28
 
29
-    public function get_position ()
29
+    public function get_position()
30 30
     {
31
-        return $this->getProperty ('Value');
31
+        return $this->getProperty('Value');
32 32
     }
33 33
 
34
-    public function set_position (int $position)
34
+    public function set_position(int $position)
35 35
     {
36
-        $this->setProperty ('Value', $position);
36
+        $this->setProperty('Value', $position);
37 37
     }
38 38
 }
Please login to merge, or discard this patch.