@@ -1,44 +1,44 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -echo ' Configuring VoidFramework...'. PHP_EOL; |
|
3 | +echo ' Configuring VoidFramework...'.PHP_EOL; |
|
4 | 4 | |
5 | -function dir_copy (string $from, string $to): bool |
|
5 | +function dir_copy(string $from, string $to): bool |
|
6 | 6 | { |
7 | - if (!is_dir ($from)) |
|
7 | + if (!is_dir($from)) |
|
8 | 8 | return false; |
9 | 9 | |
10 | - if (!is_dir ($to)) |
|
11 | - dir_create ($to); |
|
10 | + if (!is_dir($to)) |
|
11 | + dir_create($to); |
|
12 | 12 | |
13 | - foreach (array_slice (scandir ($from), 2) as $file) |
|
14 | - if (is_dir ($f = $from .'/'. $file)) |
|
15 | - dir_copy ($f, $to .'/'. $file); |
|
13 | + foreach (array_slice(scandir($from), 2) as $file) |
|
14 | + if (is_dir($f = $from.'/'.$file)) |
|
15 | + dir_copy($f, $to.'/'.$file); |
|
16 | 16 | |
17 | - else copy ($f, $to .'/'. $file); |
|
17 | + else copy($f, $to.'/'.$file); |
|
18 | 18 | |
19 | 19 | return true; |
20 | 20 | } |
21 | 21 | |
22 | -$info = file_exists (QERO_DIR .'/qero-info.json') ? |
|
23 | - json_decode (file_get_contents (QERO_DIR .'/qero-info.json'), true) : array (); |
|
22 | +$info = file_exists(QERO_DIR.'/qero-info.json') ? |
|
23 | + json_decode (file_get_contents(QERO_DIR.'/qero-info.json'), true) : array(); |
|
24 | 24 | |
25 | 25 | $info['scripts']['start'] = '"qero-packages/winforms-php/VoidFramework/core/VoidCore.exe" "app/start.php"'; |
26 | 26 | |
27 | -file_put_contents (QERO_DIR .'/qero-info.json', json_encode ($info, defined ('JSON_PRETTY_PRINT') ? |
|
27 | +file_put_contents(QERO_DIR.'/qero-info.json', json_encode($info, defined('JSON_PRETTY_PRINT') ? |
|
28 | 28 | constant ('JSON_PRETTY_PRINT') : 0)); |
29 | -file_put_contents (QERO_DIR .'/start.bat', '@echo off |
|
29 | +file_put_contents(QERO_DIR.'/start.bat', '@echo off |
|
30 | 30 | '. $info['scripts']['start']); |
31 | 31 | |
32 | -if (!is_dir (QERO_DIR .'/app')) |
|
32 | +if (!is_dir(QERO_DIR.'/app')) |
|
33 | 33 | { |
34 | - echo ' Configuring application...'. PHP_EOL; |
|
34 | + echo ' Configuring application...'.PHP_EOL; |
|
35 | 35 | |
36 | - mkdir (QERO_DIR .'/app'); |
|
37 | - dir_copy (__DIR__ .'/app_bundle', QERO_DIR .'/app'); |
|
36 | + mkdir(QERO_DIR.'/app'); |
|
37 | + dir_copy(__DIR__.'/app_bundle', QERO_DIR.'/app'); |
|
38 | 38 | } |
39 | 39 | |
40 | -Qero\dir_delete (__DIR__ .'/app_bundle'); |
|
41 | -unlink (__FILE__); |
|
40 | +Qero\dir_delete(__DIR__.'/app_bundle'); |
|
41 | +unlink(__FILE__); |
|
42 | 42 | |
43 | -echo ' Configuration completed'. PHP_EOL . |
|
44 | - ' Thank for installing winforms-php/VoidFramework!'. PHP_EOL . PHP_EOL; |
|
43 | +echo ' Configuration completed'.PHP_EOL. |
|
44 | + ' Thank for installing winforms-php/VoidFramework!'.PHP_EOL.PHP_EOL; |
@@ -3,20 +3,20 @@ |
||
3 | 3 | namespace VoidEngine; |
4 | 4 | |
5 | 5 | const CORE_DIR = __DIR__; |
6 | -chdir (CORE_DIR); |
|
6 | +chdir(CORE_DIR); |
|
7 | 7 | |
8 | -foreach (glob ('ext/php_*.dll') as $ext) |
|
9 | - if (!extension_loaded (substr (basename ($ext), 4, -4))) |
|
10 | - load_extension ($ext); |
|
8 | +foreach (glob('ext/php_*.dll') as $ext) |
|
9 | + if (!extension_loaded(substr(basename($ext), 4, -4))) |
|
10 | + load_extension($ext); |
|
11 | 11 | |
12 | -if (file_exists ('../engine/VoidEngine.php')) |
|
12 | +if (file_exists('../engine/VoidEngine.php')) |
|
13 | 13 | require '../engine/VoidEngine.php'; |
14 | 14 | |
15 | -else message ('VoidEngine not founded'); |
|
15 | +else message('VoidEngine not founded'); |
|
16 | 16 | |
17 | 17 | $app = '../../app/start.php'; |
18 | 18 | |
19 | -if (file_exists ($app)) |
|
19 | +if (file_exists($app)) |
|
20 | 20 | require $app; |
21 | 21 | |
22 | -else \VoidCore::callMethod (\VoidCore::createObject ('WinForms_PHP.DebugForm'), 'ShowDialog'); |
|
22 | +else \VoidCore::callMethod(\VoidCore::createObject('WinForms_PHP.DebugForm'), 'ShowDialog'); |
@@ -4,25 +4,25 @@ discard block |
||
4 | 4 | |
5 | 5 | class Translator |
6 | 6 | { |
7 | - public static function translate (AST $tree): string |
|
7 | + public static function translate(AST $tree): string |
|
8 | 8 | { |
9 | 9 | $code = "<?php\n\nnamespace VoidEngine;\n\n"; |
10 | 10 | $definedObjects = []; |
11 | 11 | |
12 | - foreach ($tree->getNodes () as $node) |
|
13 | - $code .= self::translateNode ($node, null, $definedObjects) ."\n"; |
|
12 | + foreach ($tree->getNodes() as $node) |
|
13 | + $code .= self::translateNode($node, null, $definedObjects)."\n"; |
|
14 | 14 | |
15 | 15 | return $code; |
16 | 16 | } |
17 | 17 | |
18 | - protected static function translateNode (Node $node, Node $owner = null, array &$definedObjects = []): string |
|
18 | + protected static function translateNode(Node $node, Node $owner = null, array &$definedObjects = []): string |
|
19 | 19 | { |
20 | 20 | $code = ''; |
21 | 21 | |
22 | 22 | switch ($node->type) |
23 | 23 | { |
24 | 24 | case RUNTIME_EXECUTION: |
25 | - $code .= self::formatLine ($node->args['code'], $definedObjects) ."\n\n"; |
|
25 | + $code .= self::formatLine($node->args['code'], $definedObjects)."\n\n"; |
|
26 | 26 | |
27 | 27 | break; |
28 | 28 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | if (isset ($definedObjects[$node->args['name']])) |
31 | 31 | break; |
32 | 32 | |
33 | - $code .= '$'. $node->args['name'] .' = new '. $node->args['class'] .' ('. implode (', ', self::processArgs ($node->args['args'], $definedObjects)) .');' ."\n". '$'. $node->args['name'] .'->name = \''. $node->args['name'] .'\';' ."\n"; |
|
33 | + $code .= '$'.$node->args['name'].' = new '.$node->args['class'].' ('.implode(', ', self::processArgs($node->args['args'], $definedObjects)).');'."\n".'$'.$node->args['name'].'->name = \''.$node->args['name'].'\';'."\n"; |
|
34 | 34 | |
35 | 35 | $definedObjects[$node->args['name']] = $node->args['name']; |
36 | 36 | |
@@ -39,74 +39,74 @@ discard block |
||
39 | 39 | case PROPERTY_SET: |
40 | 40 | $preset = ''; |
41 | 41 | |
42 | - if (preg_match ('/function \((.*)\) use \((.*)\)/', $node->args['property_value'])) |
|
42 | + if (preg_match('/function \((.*)\) use \((.*)\)/', $node->args['property_value'])) |
|
43 | 43 | { |
44 | - $use = substr ($node->args['property_value'], strpos ($node->args['property_value'], 'use')); |
|
45 | - $use = $ouse = substr ($use, ($pos = strpos ($use, '(') + 1), strpos ($use, ')') - $pos); |
|
46 | - $use = explode (' ', $use); |
|
44 | + $use = substr($node->args['property_value'], strpos($node->args['property_value'], 'use')); |
|
45 | + $use = $ouse = substr($use, ($pos = strpos($use, '(') + 1), strpos($use, ')') - $pos); |
|
46 | + $use = explode(' ', $use); |
|
47 | 47 | |
48 | 48 | foreach ($use as $id => $useParam) |
49 | 49 | if (isset ($definedObjects[$useParam]) && $use[$id + 1][0] == '$') |
50 | 50 | { |
51 | 51 | $fname = $use[$id + 1]; |
52 | 52 | |
53 | - if (substr ($fname, strlen ($fname) - 1) == ',') |
|
54 | - $fname = substr ($fname, 0, -1); |
|
53 | + if (substr($fname, strlen($fname) - 1) == ',') |
|
54 | + $fname = substr($fname, 0, -1); |
|
55 | 55 | |
56 | 56 | $preset .= "$fname = $useParam; "; |
57 | 57 | |
58 | 58 | unset ($use[$id]); |
59 | 59 | } |
60 | 60 | |
61 | - $preset = self::formatLine ($preset, $definedObjects) ."\n"; |
|
61 | + $preset = self::formatLine($preset, $definedObjects)."\n"; |
|
62 | 62 | |
63 | - $node->args['property_value'] = self::formatLine (str_replace ($ouse, join (' ', $use), $node->args['property_value']), $definedObjects); |
|
63 | + $node->args['property_value'] = self::formatLine(str_replace($ouse, join(' ', $use), $node->args['property_value']), $definedObjects); |
|
64 | 64 | } |
65 | 65 | |
66 | - $code .= $preset .'$'. $owner->args['name'] .'->'. $node->args['property_name'] .' = '. self::formatLine ($node->args['property_value'], $definedObjects) .';' ."\n"; |
|
66 | + $code .= $preset.'$'.$owner->args['name'].'->'.$node->args['property_name'].' = '.self::formatLine($node->args['property_value'], $definedObjects).';'."\n"; |
|
67 | 67 | |
68 | 68 | break; |
69 | 69 | |
70 | 70 | case METHOD_CALL: |
71 | - $code .= '$'. $owner->args['name'] .'->'. $node->args['method_name'] .' ('. implode (', ', self::processArgs ($node->args['method_args'], $definedObjects)) .');' ."\n"; |
|
71 | + $code .= '$'.$owner->args['name'].'->'.$node->args['method_name'].' ('.implode(', ', self::processArgs($node->args['method_args'], $definedObjects)).');'."\n"; |
|
72 | 72 | |
73 | 73 | break; |
74 | 74 | } |
75 | 75 | |
76 | - foreach ($node->getNodes () as $subnode) |
|
77 | - $code .= self::translateNode ($subnode, $node, $definedObjects); |
|
76 | + foreach ($node->getNodes() as $subnode) |
|
77 | + $code .= self::translateNode($subnode, $node, $definedObjects); |
|
78 | 78 | |
79 | 79 | return $code; |
80 | 80 | } |
81 | 81 | |
82 | - protected static function processArgs (array $args, array $definedObjects = []): array |
|
82 | + protected static function processArgs(array $args, array $definedObjects = []): array |
|
83 | 83 | { |
84 | 84 | $newArgs = []; |
85 | 85 | |
86 | 86 | foreach ($args as $arg) |
87 | - $newArgs[] = self::formatLine ($arg, $definedObjects); |
|
87 | + $newArgs[] = self::formatLine($arg, $definedObjects); |
|
88 | 88 | |
89 | 89 | return $newArgs; |
90 | 90 | } |
91 | 91 | |
92 | - protected static function formatLine (string $line, array $objects = []): string |
|
92 | + protected static function formatLine(string $line, array $objects = []): string |
|
93 | 93 | { |
94 | - if (sizeof ($objects) > 0) |
|
94 | + if (sizeof($objects) > 0) |
|
95 | 95 | { |
96 | - $len = strlen ($line); |
|
96 | + $len = strlen($line); |
|
97 | 97 | $newLine = ''; |
98 | 98 | |
99 | - $replacement = array_map (function ($object) |
|
99 | + $replacement = array_map(function($object) |
|
100 | 100 | { |
101 | - return '$'. $object; |
|
101 | + return '$'.$object; |
|
102 | 102 | }, $objects); |
103 | 103 | |
104 | - $replacement = array_map (function ($name) |
|
104 | + $replacement = array_map(function($name) |
|
105 | 105 | { |
106 | - return strlen ($name = trim ($name)) + substr_count ($name, '_'); |
|
107 | - }, $omap = array_flip ($replacement)); |
|
106 | + return strlen($name = trim($name)) + substr_count($name, '_'); |
|
107 | + }, $omap = array_flip($replacement)); |
|
108 | 108 | |
109 | - arsort ($replacement); |
|
109 | + arsort($replacement); |
|
110 | 110 | |
111 | 111 | $nReplacement = []; |
112 | 112 | |
@@ -114,14 +114,14 @@ discard block |
||
114 | 114 | $nReplacement[$omap[$replaceTo]] = $replaceTo; |
115 | 115 | |
116 | 116 | $replacement = $nReplacement; |
117 | - $blacklist = array_flip (['\'', '"', '$']); |
|
117 | + $blacklist = array_flip(['\'', '"', '$']); |
|
118 | 118 | |
119 | 119 | for ($i = 0; $i < $len; ++$i) |
120 | 120 | { |
121 | 121 | $replaced = false; |
122 | 122 | |
123 | 123 | foreach ($replacement as $name => $replaceAt) |
124 | - if (substr ($line, $i, ($l = strlen ($name))) == $name && !isset ($blacklist[$line[$i - 1]])) |
|
124 | + if (substr($line, $i, ($l = strlen($name))) == $name && !isset ($blacklist[$line[$i - 1]])) |
|
125 | 125 | { |
126 | 126 | $newLine .= $replaceAt; |
127 | 127 |
@@ -8,10 +8,10 @@ discard block |
||
8 | 8 | class Node |
9 | 9 | { |
10 | 10 | public ?string $line = null; // Строка |
11 | - public array $words = []; // Список слов |
|
12 | - public int $height = 0; // Высота строки |
|
13 | - public int $type = 0; // Тип ноды |
|
14 | - public array $args = []; // Аргументы ноды |
|
11 | + public array $words = []; // Список слов |
|
12 | + public int $height = 0; // Высота строки |
|
13 | + public int $type = 0; // Тип ноды |
|
14 | + public array $args = []; // Аргументы ноды |
|
15 | 15 | |
16 | 16 | protected array $nodes = []; // Ветви ноды |
17 | 17 | |
@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | * |
21 | 21 | * [@param array $node = null] - массив для импорта ноды |
22 | 22 | */ |
23 | - public function __construct (array $node = null) |
|
23 | + public function __construct(array $node = null) |
|
24 | 24 | { |
25 | 25 | if ($node !== null) |
26 | - $this->import ($node); |
|
26 | + $this->import($node); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * |
34 | 34 | * @return Node - возвращает саму себя |
35 | 35 | */ |
36 | - public function import (array $node): Node |
|
36 | + public function import(array $node): Node |
|
37 | 37 | { |
38 | 38 | $this->line = $node['line'] ?? null; |
39 | 39 | $this->words = $node['words'] ?? []; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $this->type = $node['type'] ?? 0; |
42 | 42 | $this->args = $node['args'] ?? []; |
43 | 43 | |
44 | - $this->nodes = array_map (fn (array $t) => new Node ($t), $node['nodes'] ?? []); |
|
44 | + $this->nodes = array_map(fn(array $t) => new Node($t), $node['nodes'] ?? []); |
|
45 | 45 | |
46 | 46 | return $this; |
47 | 47 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * |
52 | 52 | * @return array - возвращает массив экспортированной ноды |
53 | 53 | */ |
54 | - public function export (): array |
|
54 | + public function export(): array |
|
55 | 55 | { |
56 | 56 | return [ |
57 | 57 | 'line' => $this->line, |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | 'type' => $this->type, |
61 | 61 | 'args' => $this->args, |
62 | 62 | |
63 | - 'nodes' => array_map (fn (Node $node) => $node->export (), $this->nodes) |
|
63 | + 'nodes' => array_map(fn(Node $node) => $node->export(), $this->nodes) |
|
64 | 64 | ]; |
65 | 65 | } |
66 | 66 | |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | * |
72 | 72 | * @return Node - возвращает саму себя |
73 | 73 | */ |
74 | - public function push (Node $node): Node |
|
74 | + public function push(Node $node): Node |
|
75 | 75 | { |
76 | 76 | $this->nodes[] = $node; |
77 | 77 | |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * |
84 | 84 | * @return array - возвращает список ветвей |
85 | 85 | */ |
86 | - public function getNodes (): array |
|
86 | + public function getNodes(): array |
|
87 | 87 | { |
88 | 88 | return $this->nodes; |
89 | 89 | } |
@@ -15,10 +15,10 @@ discard block |
||
15 | 15 | * |
16 | 16 | * [@param array $tree = null] - массив для импорта дерева |
17 | 17 | */ |
18 | - public function __construct (array $tree = null) |
|
18 | + public function __construct(array $tree = null) |
|
19 | 19 | { |
20 | 20 | if ($tree !== null) |
21 | - $this->import ($tree); |
|
21 | + $this->import($tree); |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
@@ -28,10 +28,10 @@ discard block |
||
28 | 28 | * |
29 | 29 | * @return AST - возвращает сам себя |
30 | 30 | */ |
31 | - public function import (array $tree): AST |
|
31 | + public function import(array $tree): AST |
|
32 | 32 | { |
33 | 33 | foreach ($tree as $node) |
34 | - $this->nodes[] = new Node ($node); |
|
34 | + $this->nodes[] = new Node($node); |
|
35 | 35 | |
36 | 36 | return $this; |
37 | 37 | } |
@@ -41,9 +41,9 @@ discard block |
||
41 | 41 | * |
42 | 42 | * @return array - возращает массив экспортированного дерева |
43 | 43 | */ |
44 | - public function export (): array |
|
44 | + public function export(): array |
|
45 | 45 | { |
46 | - return array_map (fn (Node $node) => $node->export (), $this->nodes); |
|
46 | + return array_map(fn(Node $node) => $node->export(), $this->nodes); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * |
54 | 54 | * @return AST - возвращает сам себя |
55 | 55 | */ |
56 | - public function push (Node $node): AST |
|
56 | + public function push(Node $node): AST |
|
57 | 57 | { |
58 | 58 | $this->nodes[] = $node; |
59 | 59 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | * |
66 | 66 | * @return array - возвращает список корневых нод |
67 | 67 | */ |
68 | - public function getNodes (): array |
|
68 | + public function getNodes(): array |
|
69 | 69 | { |
70 | 70 | return $this->nodes; |
71 | 71 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | * |
18 | 18 | * @return Stack - возвращает сам себя |
19 | 19 | */ |
20 | - public function push ($item): Stack |
|
20 | + public function push($item): Stack |
|
21 | 21 | { |
22 | 22 | $this->items[] = $item; |
23 | 23 | |
@@ -29,9 +29,9 @@ discard block |
||
29 | 29 | * |
30 | 30 | * @return mixed - возвращает текущий элемент |
31 | 31 | */ |
32 | - public function current () |
|
32 | + public function current() |
|
33 | 33 | { |
34 | - return end ($this->items); |
|
34 | + return end($this->items); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | * |
40 | 40 | * @return mixed - возвращает текущий элемент |
41 | 41 | */ |
42 | - public function pop () |
|
42 | + public function pop() |
|
43 | 43 | { |
44 | - return array_pop ($this->items); |
|
44 | + return array_pop($this->items); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -49,8 +49,8 @@ discard block |
||
49 | 49 | * |
50 | 50 | * @return int - возвращает размер стэка |
51 | 51 | */ |
52 | - public function size (): int |
|
52 | + public function size(): int |
|
53 | 53 | { |
54 | - return sizeof ($this->items); |
|
54 | + return sizeof($this->items); |
|
55 | 55 | } |
56 | 56 | } |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | { |
28 | 28 | protected $WinAPI; |
29 | 29 | |
30 | - public function __construct () |
|
30 | + public function __construct() |
|
31 | 31 | { |
32 | 32 | /** |
33 | 33 | * Большинство функций было взято из класса "WinAPI" проекта "DevelStudio XL" |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @see <https://vk.com/evsoft> |
37 | 37 | * @see <https://vk.com/magic.breeze> |
38 | 38 | */ |
39 | - $this->WinAPI = \FFI::cdef (' |
|
39 | + $this->WinAPI = \FFI::cdef(' |
|
40 | 40 | struct LPCTSTR |
41 | 41 | { |
42 | 42 | char string; |
@@ -72,10 +72,9 @@ discard block |
||
72 | 72 | ', 'User32.dll'); |
73 | 73 | } |
74 | 74 | |
75 | - public function __call ($method, $args) |
|
75 | + public function __call($method, $args) |
|
76 | 76 | { |
77 | - return method_exists ($this, $method) ? |
|
78 | - $this->$method (...$args) : |
|
79 | - $this->WinAPI->$method (...$args); |
|
77 | + return method_exists($this, $method) ? |
|
78 | + $this->$method(...$args) : $this->WinAPI->$method(...$args); |
|
80 | 79 | } |
81 | 80 | } |
@@ -6,34 +6,34 @@ |
||
6 | 6 | |
7 | 7 | class Events |
8 | 8 | { |
9 | - public static function setEvent (int $selector, string $eventName, callable $function): void |
|
9 | + public static function setEvent(int $selector, string $eventName, callable $function): void |
|
10 | 10 | { |
11 | - VoidCore::setEvent ($selector, $eventName, function ($sender, ...$args) use ($function) |
|
11 | + VoidCore::setEvent($selector, $eventName, function($sender, ...$args) use ($function) |
|
12 | 12 | { |
13 | 13 | try |
14 | 14 | { |
15 | 15 | foreach ($args as $id => $arg) |
16 | - $args[$id] = EngineAdditions::coupleSelector ($arg); |
|
16 | + $args[$id] = EngineAdditions::coupleSelector($arg); |
|
17 | 17 | |
18 | - return $function (_c ($sender) ?: new NetObject ($sender), ...$args); |
|
18 | + return $function(_c($sender) ?: new NetObject($sender), ...$args); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | catch (\Throwable $e) |
22 | 22 | { |
23 | - message ([ |
|
24 | - 'type' => get_class ($e), |
|
25 | - 'text' => $e->getMessage (), |
|
26 | - 'file' => $e->getFile (), |
|
27 | - 'line' => $e->getLine (), |
|
28 | - 'code' => $e->getCode (), |
|
29 | - 'trace' => $e->getTraceAsString () |
|
23 | + message([ |
|
24 | + 'type' => get_class($e), |
|
25 | + 'text' => $e->getMessage(), |
|
26 | + 'file' => $e->getFile(), |
|
27 | + 'line' => $e->getLine(), |
|
28 | + 'code' => $e->getCode(), |
|
29 | + 'trace' => $e->getTraceAsString() |
|
30 | 30 | ], 'PHP Critical Error'); |
31 | 31 | } |
32 | 32 | }); |
33 | 33 | } |
34 | 34 | |
35 | - public static function removeEvent (int $selector, string $eventName): void |
|
35 | + public static function removeEvent(int $selector, string $eventName): void |
|
36 | 36 | { |
37 | - VoidCore::removeEvent ($selector, $eventName); |
|
37 | + VoidCore::removeEvent($selector, $eventName); |
|
38 | 38 | } |
39 | 39 | } |
@@ -2,17 +2,17 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace VoidEngine; |
4 | 4 | |
5 | -$env = new NetClass ('System.Environment', 'mscorlib'); |
|
6 | -$params = $env->getCommandLineArgs ()->list; |
|
5 | +$env = new NetClass('System.Environment', 'mscorlib'); |
|
6 | +$params = $env->getCommandLineArgs()->list; |
|
7 | 7 | |
8 | -$converter = new NetClass ('System.Drawing.ColorTranslator'); |
|
8 | +$converter = new NetClass('System.Drawing.ColorTranslator'); |
|
9 | 9 | |
10 | 10 | $constants = [ |
11 | 11 | # Информация об окружении |
12 | 12 | |
13 | 13 | 'EXE_NAME' => $APPLICATION->executablePath, |
14 | - 'DOC_ROOT' => dirname ($APPLICATION->executablePath), |
|
15 | - 'IS_ADMIN' => is_writable (getenv ('SystemRoot')), |
|
14 | + 'DOC_ROOT' => dirname($APPLICATION->executablePath), |
|
15 | + 'IS_ADMIN' => is_writable(getenv('SystemRoot')), |
|
16 | 16 | 'START_PARAMS' => $params, |
17 | 17 | 'USERNAME' => $env->username, |
18 | 18 | |
@@ -332,17 +332,17 @@ discard block |
||
332 | 332 | |
333 | 333 | # Моя подборка цветов |
334 | 334 | |
335 | - 'clDark' => $converter->fromHtml ('#0D0F12'), |
|
336 | - 'clDark2' => $converter->fromHtml ('#121416'), |
|
337 | - 'clTurquoise' => $converter->fromHtml ('#00ADB5'), |
|
338 | - 'clLight' => $converter->fromHtml ('#EEEEEE') |
|
335 | + 'clDark' => $converter->fromHtml('#0D0F12'), |
|
336 | + 'clDark2' => $converter->fromHtml('#121416'), |
|
337 | + 'clTurquoise' => $converter->fromHtml('#00ADB5'), |
|
338 | + 'clLight' => $converter->fromHtml('#EEEEEE') |
|
339 | 339 | ]; |
340 | 340 | |
341 | 341 | foreach ($constants as $name => $value) |
342 | - define ($name, $value); |
|
342 | + define($name, $value); |
|
343 | 343 | |
344 | 344 | $argv = START_PARAMS; |
345 | -$argc = sizeof ($argv); |
|
345 | +$argc = sizeof($argv); |
|
346 | 346 | |
347 | -\VoidCore::removeObjects ($converter->selector); |
|
347 | +\VoidCore::removeObjects($converter->selector); |
|
348 | 348 | unset ($constants, $env, $params, $converter); |