@@ -2,50 +2,50 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | namespace VoidEngine; |
| 4 | 4 | |
| 5 | -register_superglobals ('APPLICATION', 'SCREEN'); |
|
| 5 | +register_superglobals('APPLICATION', 'SCREEN'); |
|
| 6 | 6 | |
| 7 | 7 | $APPLICATION = new class |
| 8 | 8 | { |
| 9 | 9 | public WFClass $application; |
| 10 | 10 | public string $executablePath; |
| 11 | 11 | |
| 12 | - public function __construct () |
|
| 12 | + public function __construct() |
|
| 13 | 13 | { |
| 14 | - $this->application = new WFClass ('System.Windows.Forms.Application'); |
|
| 14 | + $this->application = new WFClass('System.Windows.Forms.Application'); |
|
| 15 | 15 | $this->executablePath = $this->application->executablePath; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | - public function run ($form = null): void |
|
| 18 | + public function run($form = null): void |
|
| 19 | 19 | { |
| 20 | 20 | if ($form instanceof WFObject) |
| 21 | - $this->application->run ($form->selector); |
|
| 21 | + $this->application->run($form->selector); |
|
| 22 | 22 | |
| 23 | - elseif (is_int ($form) && VoidEngine::objectExists ($form)) |
|
| 24 | - $this->application->run ($form); |
|
| 23 | + elseif (is_int($form) && VoidEngine::objectExists($form)) |
|
| 24 | + $this->application->run($form); |
|
| 25 | 25 | |
| 26 | 26 | elseif ($form === null) |
| 27 | - $this->application->run (); |
|
| 27 | + $this->application->run(); |
|
| 28 | 28 | |
| 29 | - else throw new \Exception ('$form param must be instance of "VoidEngine\WFObject" ("VoidEngine\Form"), be null or object selector'); |
|
| 29 | + else throw new \Exception('$form param must be instance of "VoidEngine\WFObject" ("VoidEngine\Form"), be null or object selector'); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - public function restart (): void |
|
| 32 | + public function restart(): void |
|
| 33 | 33 | { |
| 34 | - $this->application->restart (); |
|
| 35 | - $this->close (); |
|
| 34 | + $this->application->restart(); |
|
| 35 | + $this->close(); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - public function close (): void |
|
| 38 | + public function close(): void |
|
| 39 | 39 | { |
| 40 | - $this->application->exit (); |
|
| 40 | + $this->application->exit(); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - public function __call (string $name, array $args) |
|
| 43 | + public function __call(string $name, array $args) |
|
| 44 | 44 | { |
| 45 | - return $this->application->$name (...$args); |
|
| 45 | + return $this->application->$name(...$args); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - public function __get (string $name) |
|
| 48 | + public function __get(string $name) |
|
| 49 | 49 | { |
| 50 | 50 | return $this->application->$name; |
| 51 | 51 | } |
@@ -55,14 +55,14 @@ discard block |
||
| 55 | 55 | { |
| 56 | 56 | public WFObject $screen; |
| 57 | 57 | |
| 58 | - public function __construct () |
|
| 58 | + public function __construct() |
|
| 59 | 59 | { |
| 60 | - $this->screen = new WFClass ('System.Windows.Forms.Screen'); |
|
| 60 | + $this->screen = new WFClass('System.Windows.Forms.Screen'); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - public function __get ($name) |
|
| 63 | + public function __get($name) |
|
| 64 | 64 | { |
| 65 | - switch (strtolower ($name)) |
|
| 65 | + switch (strtolower($name)) |
|
| 66 | 66 | { |
| 67 | 67 | case 'width': |
| 68 | 68 | case 'w': |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | } |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | - public function __debugInfo (): array |
|
| 83 | + public function __debugInfo(): array |
|
| 84 | 84 | { |
| 85 | 85 | return [ |
| 86 | 86 | $this->w, |