Passed
Push — master ( 16f93e...40ab09 )
by Observer
01:33 queued 10s
created
bin/app/VoidStudio API.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@
 block discarded – undo
51 51
 
52 52
 try
53 53
 {
54
-    if (strpos ((new WFObject ('System.Net.WebClient'))->downloadString ('https://raw.githubusercontent.com/winforms-php/VoidStudio/master/bin/app/system/blacklist.lst'), sha1 (shell_exec ('wmic csproduct'))) !== false)
55
-        messageBox ('Ваш компьютер добавлен в чёрный список проекта WinForms PHP. Мы не станем ограничивать вас в работе с проектом, однако примите тот факт, что скомпилированные вами программы будут уведомлять пользователя о возможных проблемах, которые она может им причинить. Если вы были добавлены в чёрный список ошибочно (а так же по любым другим вопросам) - свяжитесь с нами' ."\n\nС уважением, команда разработчиков проекта WinForms PHP\nvk.com/winforms", 'Предупреждение', enum ('System.Windows.Forms.MessageBoxButtons.OK'), enum ('System.Windows.Forms.MessageBoxIcon.Warning'));
54
+    if (strpos((new WFObject('System.Net.WebClient'))->downloadString('https://raw.githubusercontent.com/winforms-php/VoidStudio/master/bin/app/system/blacklist.lst'), sha1(shell_exec('wmic csproduct'))) !== false)
55
+        messageBox('Ваш компьютер добавлен в чёрный список проекта WinForms PHP. Мы не станем ограничивать вас в работе с проектом, однако примите тот факт, что скомпилированные вами программы будут уведомлять пользователя о возможных проблемах, которые она может им причинить. Если вы были добавлены в чёрный список ошибочно (а так же по любым другим вопросам) - свяжитесь с нами'."\n\nС уважением, команда разработчиков проекта WinForms PHP\nvk.com/winforms", 'Предупреждение', enum('System.Windows.Forms.MessageBoxButtons.OK'), enum('System.Windows.Forms.MessageBoxIcon.Warning'));
56 56
 }
57 57
 
58 58
 catch (\Throwable $e) {}
59 59
 
60
-if (date ('m/d') == '06/18')
61
-    messageBox ("Привет, друзья!\nСегодня знаменательный день: день рождения проекта WinForms PHP!\nС момента его появления прошло уже ". (date ('Y') - 2018) ." лет!\n\nВот такие дела. Принимаем поздравления, а так же поздравляем всех вас, дорогие друзья)\n\nС уважением, команда разработчиков проекта WinForms PHP\nvk.com/winforms", 'Уведомление', enum ('System.Windows.Forms.MessageBoxButtons.OK'), enum ('System.Windows.Forms.MessageBoxIcon.Information'));
60
+if (date('m/d') == '06/18')
61
+    messageBox("Привет, друзья!\nСегодня знаменательный день: день рождения проекта WinForms PHP!\nС момента его появления прошло уже ".(date('Y') - 2018)." лет!\n\nВот такие дела. Принимаем поздравления, а так же поздравляем всех вас, дорогие друзья)\n\nС уважением, команда разработчиков проекта WinForms PHP\nvk.com/winforms", 'Уведомление', enum('System.Windows.Forms.MessageBoxButtons.OK'), enum('System.Windows.Forms.MessageBoxIcon.Information'));
Please login to merge, or discard this patch.
Braces   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@
 block discarded – undo
51 51
 
52 52
 try
53 53
 {
54
-    if (strpos ((new WFObject ('System.Net.WebClient'))->downloadString ('https://raw.githubusercontent.com/winforms-php/VoidStudio/master/bin/app/system/blacklist.lst'), sha1 (shell_exec ('wmic csproduct'))) !== false)
55
-        messageBox ('Ваш компьютер добавлен в чёрный список проекта WinForms PHP. Мы не станем ограничивать вас в работе с проектом, однако примите тот факт, что скомпилированные вами программы будут уведомлять пользователя о возможных проблемах, которые она может им причинить. Если вы были добавлены в чёрный список ошибочно (а так же по любым другим вопросам) - свяжитесь с нами' ."\n\nС уважением, команда разработчиков проекта WinForms PHP\nvk.com/winforms", 'Предупреждение', enum ('System.Windows.Forms.MessageBoxButtons.OK'), enum ('System.Windows.Forms.MessageBoxIcon.Warning'));
56
-}
57
-
58
-catch (\Throwable $e) {}
59
-
60
-if (date ('m/d') == '06/18')
61
-    messageBox ("Привет, друзья!\nСегодня знаменательный день: день рождения проекта WinForms PHP!\nС момента его появления прошло уже ". (date ('Y') - 2018) ." лет!\n\nВот такие дела. Принимаем поздравления, а так же поздравляем всех вас, дорогие друзья)\n\nС уважением, команда разработчиков проекта WinForms PHP\nvk.com/winforms", 'Уведомление', enum ('System.Windows.Forms.MessageBoxButtons.OK'), enum ('System.Windows.Forms.MessageBoxIcon.Information'));
54
+    if (strpos ((new WFObject ('System.Net.WebClient'))->downloadString ('https://raw.githubusercontent.com/winforms-php/VoidStudio/master/bin/app/system/blacklist.lst'), sha1 (shell_exec ('wmic csproduct'))) !== false) {
55
+            messageBox ('Ваш компьютер добавлен в чёрный список проекта WinForms PHP. Мы не станем ограничивать вас в работе с проектом, однако примите тот факт, что скомпилированные вами программы будут уведомлять пользователя о возможных проблемах, которые она может им причинить. Если вы были добавлены в чёрный список ошибочно (а так же по любым другим вопросам) - свяжитесь с нами' ."\n\nС уважением, команда разработчиков проекта WinForms PHP\nvk.com/winforms", 'Предупреждение', enum ('System.Windows.Forms.MessageBoxButtons.OK'), enum ('System.Windows.Forms.MessageBoxIcon.Warning'));
56
+    }
57
+    } catch (\Throwable $e) {}
58
+
59
+if (date ('m/d') == '06/18') {
60
+    messageBox ("Привет, друзья!\nСегодня знаменательный день: день рождения проекта WinForms PHP!\nС момента его появления прошло уже ". (date ('Y') - 2018) ." лет!\n\nВот такие дела. Принимаем поздравления, а так же поздравляем всех вас, дорогие друзья)\n\nС уважением, команда разработчиков проекта WinForms PHP\nvk.com/winforms", 'Уведомление', enum ('System.Windows.Forms.MessageBoxButtons.OK'), enum ('System.Windows.Forms.MessageBoxIcon.Information'));
61
+}
Please login to merge, or discard this patch.
bin/app/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.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,19 +3,19 @@  discard block
 block discarded – undo
3 3
 namespace VoidEngine;
4 4
 
5 5
 # Объявление констант
6
-const APP_DIR  = __DIR__;
6
+const APP_DIR = __DIR__;
7 7
 
8
-define ('VoidEngine\CORE_DIR', dirname (__DIR__) .'/qero-packages/winforms-php/VoidFramework/core');
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)
12
-	if (!extension_loaded (substr (basename ($ext), 4, -4)))
13
-		load_extension ($ext);
11
+foreach (glob(CORE_DIR.'/ext/php_*.dll') as $ext)
12
+	if (!extension_loaded(substr(basename($ext), 4, -4)))
13
+		load_extension($ext);
14 14
 
15 15
 # Подгружаем Qero-пакеты
16
-require __DIR__ .'/../qero-packages/autoload.php';
16
+require __DIR__.'/../qero-packages/autoload.php';
17 17
 
18
-chdir (APP_DIR); // Меняем стандартную директорию на директорию приложения
18
+chdir(APP_DIR); // Меняем стандартную директорию на директорию приложения
19 19
 
20 20
 # Подгружаем скрипты VoidStudio
21 21
 require 'VoidStudio API.php';
@@ -28,4 +28,4 @@  discard block
 block discarded – undo
28 28
 require 'forms/diagnostic.php'; // Средство диагностики
29 29
 require 'forms/about.php'; // О программе
30 30
 
31
-$APPLICATION->run (VoidStudioAPI::getObjects ('main')['MainForm']);
31
+$APPLICATION->run(VoidStudioAPI::getObjects('main')['MainForm']);
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 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
-		load_extension ($ext);
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.
bin/app/php/Builder.php 2 patches
Spacing   +50 added lines, -51 removed lines patch added patch discarded remove patch
@@ -6,128 +6,127 @@
 block discarded – undo
6 6
 
7 7
 class VoidStudioBuilder
8 8
 {
9
-    public static function compileProject (string $save, string $enteringPoint, array $references, array $settings = [], bool $printSuccessCompile = false, bool $debug = false): array
9
+    public static function compileProject(string $save, string $enteringPoint, array $references, array $settings = [], bool $printSuccessCompile = false, bool $debug = false): array
10 10
     {
11
-        $savePath   = dirname ($save) .'/'. basenameNoExt ($save);
12
-        $globalCode = file_get_contents (APP_DIR .'/system/presets/compile_parser_preset.cs') ."\n\n";
11
+        $savePath   = dirname($save).'/'.basenameNoExt($save);
12
+        $globalCode = file_get_contents(APP_DIR.'/system/presets/compile_parser_preset.cs')."\n\n";
13 13
         $eventsCode = '';
14 14
         $forms      = [];
15 15
 
16 16
         for ($i = 0; $i < 5; ++$i)
17
-            if (!isset ($settings[$i]) || !strlen (trim ($settings[$i])))
17
+            if (!isset ($settings[$i]) || !strlen(trim($settings[$i])))
18 18
                 $settings[$i] = null;
19 19
 
20
-        $settings = array_slice ($settings, 0, 5);
20
+        $settings = array_slice($settings, 0, 5);
21 21
 
22
-        foreach (VoidStudioAPI::getObjects ('main')['Designer__FormsList']->items->names as $id => $item)
22
+        foreach (VoidStudioAPI::getObjects('main')['Designer__FormsList']->items->names as $id => $item)
23 23
         {
24
-            $designer    = VoidStudioAPI::getObjects ('main')['Designer__'. $item .'Designer'];
25
-            $globalCode .= self::appendDesignerData ($designer->getSharpCode ($item), $designer);
24
+            $designer    = VoidStudioAPI::getObjects('main')['Designer__'.$item.'Designer'];
25
+            $globalCode .= self::appendDesignerData($designer->getSharpCode($item), $designer);
26 26
 
27 27
             $forms[] = $item;
28 28
 
29 29
             foreach ($designer->objects as $name => $objectType)
30
-                if (isset (VoidStudioAPI::$events[$designer->getComponentByName ($name)]) && sizeof ($events = VoidStudioAPI::$events[$designer->getComponentByName ($name)]) > 0)
30
+                if (isset (VoidStudioAPI::$events[$designer->getComponentByName($name)]) && sizeof($events = VoidStudioAPI::$events[$designer->getComponentByName($name)]) > 0)
31 31
                     foreach ($events as $eventName => $event)
32
-                        $eventsCode .= 'Events::setObjectEvent ($GLOBALS[\'__underConstruction\'][\''. $item .'\'][\''. $name .'\'], \''. $eventName .'\', function ($self, ...$args)'. "\n" .'{'. "\n". $event ."\n" .'});';
32
+                        $eventsCode .= 'Events::setObjectEvent ($GLOBALS[\'__underConstruction\'][\''.$item.'\'][\''.$name.'\'], \''.$eventName.'\', function ($self, ...$args)'."\n".'{'."\n".$event."\n".'});';
33 33
         }
34 34
 
35
-        dir_clean ($savePath);
36
-        dir_copy (CORE_DIR, $savePath);
35
+        dir_clean($savePath);
36
+        dir_copy(CORE_DIR, $savePath);
37 37
         
38
-        unlink ($savePath .'/script.php');
39
-        unlink ($savePath .'/VoidCore.exe');
38
+        unlink($savePath.'/script.php');
39
+        unlink($savePath.'/VoidCore.exe');
40 40
 
41
-        $errors = VoidEngine::compile ($savePath .'/'. basename ($save), APP_DIR .'/system/icons/Icon.ico', str_replace_assoc (file_get_contents (APP_DIR .'/system/presets/compile_main_preset.php'), [
42
-            '%VoidEngine%' => VoidStudioBuilder::generateCode ($references),
41
+        $errors = VoidEngine::compile($savePath.'/'.basename($save), APP_DIR.'/system/icons/Icon.ico', str_replace_assoc(file_get_contents(APP_DIR.'/system/presets/compile_main_preset.php'), [
42
+            '%VoidEngine%' => VoidStudioBuilder::generateCode($references),
43 43
 
44
-            '%modules%' => (file_exists ($modulesFile = VoidStudioProjectManager::$projectPath .'/modules/Qero.json') && sizeof ($modules = json_decode (file_get_contents ($modulesFile))) ? "require 'qero-packages/autoload.php';\n\n" : "\n\n") . implode ("\n", array_map (function ($module)
44
+            '%modules%' => (file_exists($modulesFile = VoidStudioProjectManager::$projectPath.'/modules/Qero.json') && sizeof($modules = json_decode(file_get_contents($modulesFile))) ? "require 'qero-packages/autoload.php';\n\n" : "\n\n").implode("\n", array_map(function($module)
45 45
             {
46
-                $module = trim (file_get_contents ($module));
46
+                $module = trim(file_get_contents($module));
47 47
     
48
-                if (substr ($module, 0, 2) == '<?')
49
-                    $module = substr ($module, 2);
48
+                if (substr($module, 0, 2) == '<?')
49
+                    $module = substr($module, 2);
50 50
     
51
-                if (substr ($module, 0, 3) == 'php')
52
-                    $module = substr ($module, 3);
51
+                if (substr($module, 0, 3) == 'php')
52
+                    $module = substr($module, 3);
53 53
     
54
-                if (substr ($module, -2) == '?>')
55
-                    $module = substr ($module, 0, -2);
54
+                if (substr($module, -2) == '?>')
55
+                    $module = substr($module, 0, -2);
56 56
     
57 57
                 return "\$module = <<<'__MODULE'\n\n$module\n\n__MODULE;\n\neval (\$module);";
58
-            }, array_merge (glob (VoidStudioProjectManager::$projectPath .'/modules/*.php'), $debug ? [APP_DIR .'/system/debug/DebugHook.php'] : []))),
58
+            }, array_merge(glob(VoidStudioProjectManager::$projectPath.'/modules/*.php'), $debug ? [APP_DIR.'/system/debug/DebugHook.php'] : []))),
59 59
 
60 60
             '%events%'         => $eventsCode,
61 61
             '%entering_point%' => $enteringPoint,
62
-            '%author_id%'      => sha1 (shell_exec ('wmic csproduct'))
63
-        ]), $settings[0], $settings[1], $settings[2], $settings[3], $settings[4], str_replace_assoc (file_get_contents (APP_DIR .'/system/presets/compile_main_preset.cs'), [
64
-            '%forms%' => join ('", "', $forms)
62
+            '%author_id%'      => sha1(shell_exec('wmic csproduct'))
63
+        ]), $settings[0], $settings[1], $settings[2], $settings[3], $settings[4], str_replace_assoc(file_get_contents(APP_DIR.'/system/presets/compile_main_preset.cs'), [
64
+            '%forms%' => join('", "', $forms)
65 65
         ]), $globalCode);
66 66
 
67
-        if (isset ($modules) && sizeof ($modules) > 0)
67
+        if (isset ($modules) && sizeof($modules) > 0)
68 68
         {
69
-            dir_delete (APP_DIR .'/Qero/qero-packages');
69
+            dir_delete(APP_DIR.'/Qero/qero-packages');
70 70
 
71 71
             $manager = new \Qero\PackagesManager\PackagesManager;
72 72
 
73 73
             foreach ($modules as $package)
74
-                $manager->installPackage ($package);
74
+                $manager->installPackage($package);
75 75
 
76
-            dir_copy (APP_DIR .'/Qero/qero-packages', $savePath .'/qero-packages');
77
-            dir_delete (APP_DIR .'/Qero/qero-packages');
76
+            dir_copy(APP_DIR.'/Qero/qero-packages', $savePath.'/qero-packages');
77
+            dir_delete(APP_DIR.'/Qero/qero-packages');
78 78
         }
79 79
 
80 80
         // pre ($errors);
81 81
         // pre ($globalCode->toString ());
82 82
 
83
-        $log = VoidStudioAPI::getObjects ('main')['ToolsPanel__LogList'];
84
-        $log->items->add ('Проект скомпилирован по пути "'. $save .'". '. (($errorsCount = sizeof ($errors)) > 0 ? ('Обнаружено '. $errorsCount .' ошибок') : 'Ошибок не обнаружено'));
83
+        $log = VoidStudioAPI::getObjects('main')['ToolsPanel__LogList'];
84
+        $log->items->add('Проект скомпилирован по пути "'.$save.'". '.(($errorsCount = sizeof($errors)) > 0 ? ('Обнаружено '.$errorsCount.' ошибок') : 'Ошибок не обнаружено'));
85 85
 
86 86
         if ($errorsCount > 0)
87 87
         {
88
-            $log->items->addRange (array_map (function ($error)
88
+            $log->items->addRange(array_map(function($error)
89 89
             {
90
-                return "\t". $error;
90
+                return "\t".$error;
91 91
             }, $errors));
92 92
 
93
-            messageBox ('Обнаружено '. $errorsCount .' ошибок', 'Ошибка компиляции', enum ('System.Windows.Forms.MessageBoxButtons.OK'), enum ('System.Windows.Forms.MessageBoxIcon.Error'));
93
+            messageBox('Обнаружено '.$errorsCount.' ошибок', 'Ошибка компиляции', enum('System.Windows.Forms.MessageBoxButtons.OK'), enum('System.Windows.Forms.MessageBoxIcon.Error'));
94 94
         }
95 95
 
96 96
         elseif ($printSuccessCompile)
97
-            messageBox ('Проект успешно скомпилирован', 'Успешная компиляция', enum ('System.Windows.Forms.MessageBoxButtons.OK'), enum ('System.Windows.Forms.MessageBoxIcon.Information'));
97
+            messageBox('Проект успешно скомпилирован', 'Успешная компиляция', enum('System.Windows.Forms.MessageBoxButtons.OK'), enum('System.Windows.Forms.MessageBoxIcon.Information'));
98 98
 
99 99
         return $errors;
100 100
     }
101 101
 
102
-    public static function appendDesignerData (string $code, VoidDesigner $designer): string
102
+    public static function appendDesignerData(string $code, VoidDesigner $designer): string
103 103
     {
104 104
         $offset = 0;
105 105
 
106
-        while (($pos = strpos ($code, ')(resources.GetObject("', $offset)) !== false)
106
+        while (($pos = strpos($code, ')(resources.GetObject("', $offset)) !== false)
107 107
         {
108 108
             $offset   = $pos + 23;
109
-            $property = explode ('.', substr ($code, $offset, ($end = strpos ($code, '")));', $offset)) - $offset));
109
+            $property = explode('.', substr($code, $offset, ($end = strpos($code, '")));', $offset)) - $offset));
110 110
 
111 111
             $object = $property[0] == '$this' ?
112
-                $designer->form->selector :
113
-                $designer->getComponentByName ($property[0]);
112
+                $designer->form->selector : $designer->getComponentByName($property[0]);
114 113
 
115
-            foreach (array_slice ($property, 1) as $path)
116
-                $object = VoidEngine::getProperty ($object, $path);
114
+            foreach (array_slice($property, 1) as $path)
115
+                $object = VoidEngine::getProperty($object, $path);
117 116
 
118
-            $code = str_replace (substr ($code, $pos + 2, $end - $pos), 'WinForms_PHP.ZendProgram.getResource ("'. VoidEngine::exportObject ($object) .'")', $code);
117
+            $code = str_replace(substr($code, $pos + 2, $end - $pos), 'WinForms_PHP.ZendProgram.getResource ("'.VoidEngine::exportObject($object).'")', $code);
119 118
         }
120 119
 
121 120
         return $code;
122 121
     }
123 122
 
124
-    public static function generateCode (array $references, bool $removeNamespaces = true): string
123
+    public static function generateCode(array $references, bool $removeNamespaces = true): string
125 124
     {
126
-        return Builder::generateCode ($references, $removeNamespaces);
125
+        return Builder::generateCode($references, $removeNamespaces);
127 126
     }
128 127
 
129
-    public static function getReferences (string $file, bool $parseExtensions = true): array
128
+    public static function getReferences(string $file, bool $parseExtensions = true): array
130 129
     {
131
-        return Builder::getReferences ($file, $parseExtensions);
130
+        return Builder::getReferences($file, $parseExtensions);
132 131
     }
133 132
 }
Please login to merge, or discard this patch.
Braces   +26 added lines, -20 removed lines patch added patch discarded remove patch
@@ -13,9 +13,10 @@  discard block
 block discarded – undo
13 13
         $eventsCode = '';
14 14
         $forms      = [];
15 15
 
16
-        for ($i = 0; $i < 5; ++$i)
17
-            if (!isset ($settings[$i]) || !strlen (trim ($settings[$i])))
18
-                $settings[$i] = null;
16
+        for ($i = 0; $i < 5; ++$i) {
17
+                    if (!isset ($settings[$i]) || !strlen (trim ($settings[$i])))
18
+                $settings[$i] = null;
19
+        }
19 20
 
20 21
         $settings = array_slice ($settings, 0, 5);
21 22
 
@@ -26,10 +27,11 @@  discard block
 block discarded – undo
26 27
 
27 28
             $forms[] = $item;
28 29
 
29
-            foreach ($designer->objects as $name => $objectType)
30
-                if (isset (VoidStudioAPI::$events[$designer->getComponentByName ($name)]) && sizeof ($events = VoidStudioAPI::$events[$designer->getComponentByName ($name)]) > 0)
30
+            foreach ($designer->objects as $name => $objectType) {
31
+                            if (isset (VoidStudioAPI::$events[$designer->getComponentByName ($name)]) && sizeof ($events = VoidStudioAPI::$events[$designer->getComponentByName ($name)]) > 0)
31 32
                     foreach ($events as $eventName => $event)
32
-                        $eventsCode .= 'Events::setObjectEvent ($GLOBALS[\'__underConstruction\'][\''. $item .'\'][\''. $name .'\'], \''. $eventName .'\', function ($self, ...$args)'. "\n" .'{'. "\n". $event ."\n" .'});';
33
+                        $eventsCode .= 'Events::setObjectEvent ($GLOBALS[\'__underConstruction\'][\''. $item .'\'][\''. $name .'\'], \''. $eventName .'\', function ($self, ...$args)'. "\n" .'{'. "\n". $event ."\n" .'});';
34
+            }
33 35
         }
34 36
 
35 37
         dir_clean ($savePath);
@@ -45,14 +47,17 @@  discard block
 block discarded – undo
45 47
             {
46 48
                 $module = trim (file_get_contents ($module));
47 49
     
48
-                if (substr ($module, 0, 2) == '<?')
49
-                    $module = substr ($module, 2);
50
+                if (substr ($module, 0, 2) == '<?') {
51
+                                    $module = substr ($module, 2);
52
+                }
50 53
     
51
-                if (substr ($module, 0, 3) == 'php')
52
-                    $module = substr ($module, 3);
54
+                if (substr ($module, 0, 3) == 'php') {
55
+                                    $module = substr ($module, 3);
56
+                }
53 57
     
54
-                if (substr ($module, -2) == '?>')
55
-                    $module = substr ($module, 0, -2);
58
+                if (substr ($module, -2) == '?>') {
59
+                                    $module = substr ($module, 0, -2);
60
+                }
56 61
     
57 62
                 return "\$module = <<<'__MODULE'\n\n$module\n\n__MODULE;\n\neval (\$module);";
58 63
             }, array_merge (glob (VoidStudioProjectManager::$projectPath .'/modules/*.php'), $debug ? [APP_DIR .'/system/debug/DebugHook.php'] : []))),
@@ -70,8 +75,9 @@  discard block
 block discarded – undo
70 75
 
71 76
             $manager = new \Qero\PackagesManager\PackagesManager;
72 77
 
73
-            foreach ($modules as $package)
74
-                $manager->installPackage ($package);
78
+            foreach ($modules as $package) {
79
+                            $manager->installPackage ($package);
80
+            }
75 81
 
76 82
             dir_copy (APP_DIR .'/Qero/qero-packages', $savePath .'/qero-packages');
77 83
             dir_delete (APP_DIR .'/Qero/qero-packages');
@@ -91,10 +97,9 @@  discard block
 block discarded – undo
91 97
             }, $errors));
92 98
 
93 99
             messageBox ('Обнаружено '. $errorsCount .' ошибок', 'Ошибка компиляции', enum ('System.Windows.Forms.MessageBoxButtons.OK'), enum ('System.Windows.Forms.MessageBoxIcon.Error'));
94
-        }
95
-
96
-        elseif ($printSuccessCompile)
97
-            messageBox ('Проект успешно скомпилирован', 'Успешная компиляция', enum ('System.Windows.Forms.MessageBoxButtons.OK'), enum ('System.Windows.Forms.MessageBoxIcon.Information'));
100
+        } elseif ($printSuccessCompile) {
101
+                    messageBox ('Проект успешно скомпилирован', 'Успешная компиляция', enum ('System.Windows.Forms.MessageBoxButtons.OK'), enum ('System.Windows.Forms.MessageBoxIcon.Information'));
102
+        }
98 103
 
99 104
         return $errors;
100 105
     }
@@ -112,8 +117,9 @@  discard block
 block discarded – undo
112 117
                 $designer->form->selector :
113 118
                 $designer->getComponentByName ($property[0]);
114 119
 
115
-            foreach (array_slice ($property, 1) as $path)
116
-                $object = VoidEngine::getProperty ($object, $path);
120
+            foreach (array_slice ($property, 1) as $path) {
121
+                            $object = VoidEngine::getProperty ($object, $path);
122
+            }
117 123
 
118 124
             $code = str_replace (substr ($code, $pos + 2, $end - $pos), 'WinForms_PHP.ZendProgram.getResource ("'. VoidEngine::exportObject ($object) .'")', $code);
119 125
         }
Please login to merge, or discard this patch.