Passed
Push — master ( 70a5dd...72f7b3 )
by Observer
01:54
created
qero-packages/winforms-php/VoidFramework/engine/components/TabControl.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
     protected $items;
10 10
 
11 11
     public function __construct (Component $parent = null)
12
-	{
12
+    {
13 13
         parent::__construct ($parent, $this->class);
14 14
 
15 15
         $this->items = new WFObject ($this->getProperty ('TabPages'));
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@  discard block
 block discarded – undo
8 8
 
9 9
     protected $items;
10 10
 
11
-    public function __construct (Component $parent = null)
11
+    public function __construct(Component $parent = null)
12 12
 	{
13
-        parent::__construct ($parent, $this->class);
13
+        parent::__construct($parent, $this->class);
14 14
 
15
-        $this->items = new WFObject ($this->getProperty ('TabPages'));
15
+        $this->items = new WFObject($this->getProperty('TabPages'));
16 16
     }
17 17
 }
18 18
 
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
 {
21 21
     public $class = 'System.Windows.Forms.TabPage';
22 22
 
23
-    public function __construct (string $text = '')
23
+    public function __construct(string $text = '')
24 24
     {
25
-        parent::__construct (null, $this->class);
25
+        parent::__construct(null, $this->class);
26 26
 
27 27
         $this->text = $text;
28 28
     }
Please login to merge, or discard this patch.
qero-packages/winforms-php/VoidFramework/engine/components/PictureBox.php 2 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -4,48 +4,48 @@
 block discarded – undo
4 4
 
5 5
 class PictureBox extends Control
6 6
 {
7
-	public $class = 'System.Windows.Forms.PictureBox';
7
+    public $class = 'System.Windows.Forms.PictureBox';
8 8
 
9
-	protected $image;
9
+    protected $image;
10 10
 	
11
-	public function __construct (Component $parent = null)
12
-	{
11
+    public function __construct (Component $parent = null)
12
+    {
13 13
         parent::__construct ($parent, $this->class);
14 14
         
15
-		$this->image = new PictureBoxImage ($this->selector);
16
-	}
15
+        $this->image = new PictureBoxImage ($this->selector);
16
+    }
17 17
 }
18 18
 
19 19
 class PictureBoxImage
20 20
 {
21
-	protected $selector;
21
+    protected $selector;
22 22
     protected $pictureBoxSelector;
23 23
     protected $clipboard;
24 24
     
25
-	public function __construct (int $pictureBoxSelector)
26
-	{
27
-		$this->pictureBoxSelector = $pictureBoxSelector;
28
-		$this->selector			  = VoidEngine::getProperty ($pictureBoxSelector, 'Image');
29
-		$this->clipboard		  = new WFClass ('System.Windows.Forms.Clipboard');
30
-	}
25
+    public function __construct (int $pictureBoxSelector)
26
+    {
27
+        $this->pictureBoxSelector = $pictureBoxSelector;
28
+        $this->selector			  = VoidEngine::getProperty ($pictureBoxSelector, 'Image');
29
+        $this->clipboard		  = new WFClass ('System.Windows.Forms.Clipboard');
30
+    }
31 31
 	
32
-	public function loadFromFile (string $file)
33
-	{
32
+    public function loadFromFile (string $file)
33
+    {
34 34
         VoidEngine::setProperty ($this->pictureBoxSelector, 'Image', (new Image ())->loadFromFile ($file)->selector);
35
-	}
35
+    }
36 36
 	
37
-	public function saveToFile (string $file)
38
-	{
39
-		VoidEngine::callMethod ($this->selector, 'Save', $file);
40
-	}
37
+    public function saveToFile (string $file)
38
+    {
39
+        VoidEngine::callMethod ($this->selector, 'Save', $file);
40
+    }
41 41
 	
42
-	public function loadFromClipboard ()
43
-	{
44
-		VoidEngine::setProperty ($this->pictureBoxSelector, 'Image', $this->clipboard->getImage ());
45
-	}
42
+    public function loadFromClipboard ()
43
+    {
44
+        VoidEngine::setProperty ($this->pictureBoxSelector, 'Image', $this->clipboard->getImage ());
45
+    }
46 46
 	
47
-	public function saveToClipboard ()
48
-	{
49
-		$this->clipboard->setImage (VoidEngine::getProperty ($this->pictureBoxSelector, 'Image'));
50
-	}
47
+    public function saveToClipboard ()
48
+    {
49
+        $this->clipboard->setImage (VoidEngine::getProperty ($this->pictureBoxSelector, 'Image'));
50
+    }
51 51
 }
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@  discard block
 block discarded – undo
8 8
 
9 9
 	protected $image;
10 10
 	
11
-	public function __construct (Component $parent = null)
11
+	public function __construct(Component $parent = null)
12 12
 	{
13
-        parent::__construct ($parent, $this->class);
13
+        parent::__construct($parent, $this->class);
14 14
         
15
-		$this->image = new PictureBoxImage ($this->selector);
15
+		$this->image = new PictureBoxImage($this->selector);
16 16
 	}
17 17
 }
18 18
 
@@ -22,30 +22,30 @@  discard block
 block discarded – undo
22 22
     protected $pictureBoxSelector;
23 23
     protected $clipboard;
24 24
     
25
-	public function __construct (int $pictureBoxSelector)
25
+	public function __construct(int $pictureBoxSelector)
26 26
 	{
27 27
 		$this->pictureBoxSelector = $pictureBoxSelector;
28
-		$this->selector			  = VoidEngine::getProperty ($pictureBoxSelector, 'Image');
29
-		$this->clipboard		  = new WFClass ('System.Windows.Forms.Clipboard');
28
+		$this->selector			  = VoidEngine::getProperty($pictureBoxSelector, 'Image');
29
+		$this->clipboard		  = new WFClass('System.Windows.Forms.Clipboard');
30 30
 	}
31 31
 	
32
-	public function loadFromFile (string $file)
32
+	public function loadFromFile(string $file)
33 33
 	{
34
-        VoidEngine::setProperty ($this->pictureBoxSelector, 'Image', (new Image ())->loadFromFile ($file)->selector);
34
+        VoidEngine::setProperty($this->pictureBoxSelector, 'Image', (new Image())->loadFromFile($file)->selector);
35 35
 	}
36 36
 	
37
-	public function saveToFile (string $file)
37
+	public function saveToFile(string $file)
38 38
 	{
39
-		VoidEngine::callMethod ($this->selector, 'Save', $file);
39
+		VoidEngine::callMethod($this->selector, 'Save', $file);
40 40
 	}
41 41
 	
42
-	public function loadFromClipboard ()
42
+	public function loadFromClipboard()
43 43
 	{
44
-		VoidEngine::setProperty ($this->pictureBoxSelector, 'Image', $this->clipboard->getImage ());
44
+		VoidEngine::setProperty($this->pictureBoxSelector, 'Image', $this->clipboard->getImage());
45 45
 	}
46 46
 	
47
-	public function saveToClipboard ()
47
+	public function saveToClipboard()
48 48
 	{
49
-		$this->clipboard->setImage (VoidEngine::getProperty ($this->pictureBoxSelector, 'Image'));
49
+		$this->clipboard->setImage(VoidEngine::getProperty($this->pictureBoxSelector, 'Image'));
50 50
 	}
51 51
 }
Please login to merge, or discard this patch.
bin/qero-packages/winforms-php/VoidFramework/engine/components/CheckBox.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,5 +4,5 @@
 block discarded – undo
4 4
 
5 5
 class CheckBox extends Control
6 6
 {
7
-	public $class = 'System.Windows.Forms.CheckBox';
7
+    public $class = 'System.Windows.Forms.CheckBox';
8 8
 }
Please login to merge, or discard this patch.
qero-packages/winforms-php/VoidFramework/engine/components/CommonDialog.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
 {
7 7
     public $class = 'System.Windows.Forms.CommonDialog';
8 8
 
9
-    public function execute (): int
9
+    public function execute(): int
10 10
     {
11
-        return $this->callMethod ('ShowDialog');
11
+        return $this->callMethod('ShowDialog');
12 12
     }
13 13
 }
Please login to merge, or discard this patch.
bin/qero-packages/winforms-php/VoidFramework/engine/components/Process.php 3 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -4,28 +4,28 @@
 block discarded – undo
4 4
 
5 5
 class Process extends Component
6 6
 {
7
-	public $class 	  = 'System.Diagnostics.Process';
8
-	public $namespace = 'System';
7
+    public $class 	  = 'System.Diagnostics.Process';
8
+    public $namespace = 'System';
9 9
 
10
-	public function __construct (int $pid = null)
11
-	{
10
+    public function __construct (int $pid = null)
11
+    {
12 12
         $this->selector = VoidEngine::createClass ($this->class, $this->namespace);
13 13
 
14
-		if ($pid !== null)
14
+        if ($pid !== null)
15 15
             $this->selector = $pid == getmypid () ?
16 16
                 VoidEngine::callMethod ($this->selector, 'GetCurrentProcess') :
17 17
                 VoidEngine::callMethod ($this->selector, 'GetProcessById', $pid);
18 18
 
19
-		Components::addComponent ($this->selector, $this);
20
-	}
19
+        Components::addComponent ($this->selector, $this);
20
+    }
21 21
 	
22
-	public static function getProcessById (int $pid)
23
-	{
24
-		return new self ($pid);
25
-	}
22
+    public static function getProcessById (int $pid)
23
+    {
24
+        return new self ($pid);
25
+    }
26 26
 	
27
-	public static function getCurrentProcess ()
28
-	{
29
-		return new self (getmypid ());
30
-	}
27
+    public static function getCurrentProcess ()
28
+    {
29
+        return new self (getmypid ());
30
+    }
31 31
 }
Please login to merge, or discard this patch.
Spacing   +10 added lines, -11 removed lines patch added patch discarded remove patch
@@ -4,28 +4,27 @@
 block discarded – undo
4 4
 
5 5
 class Process extends Component
6 6
 {
7
-	public $class 	  = 'System.Diagnostics.Process';
7
+	public $class = 'System.Diagnostics.Process';
8 8
 	public $namespace = 'System';
9 9
 
10
-	public function __construct (int $pid = null)
10
+	public function __construct(int $pid = null)
11 11
 	{
12
-        $this->selector = VoidEngine::createClass ($this->class, $this->namespace);
12
+        $this->selector = VoidEngine::createClass($this->class, $this->namespace);
13 13
 
14 14
 		if ($pid !== null)
15
-            $this->selector = $pid == getmypid () ?
16
-                VoidEngine::callMethod ($this->selector, 'GetCurrentProcess') :
17
-                VoidEngine::callMethod ($this->selector, 'GetProcessById', $pid);
15
+            $this->selector = $pid == getmypid() ?
16
+                VoidEngine::callMethod($this->selector, 'GetCurrentProcess') : VoidEngine::callMethod($this->selector, 'GetProcessById', $pid);
18 17
 
19
-		Components::addComponent ($this->selector, $this);
18
+		Components::addComponent($this->selector, $this);
20 19
 	}
21 20
 	
22
-	public static function getProcessById (int $pid)
21
+	public static function getProcessById(int $pid)
23 22
 	{
24
-		return new self ($pid);
23
+		return new self($pid);
25 24
 	}
26 25
 	
27
-	public static function getCurrentProcess ()
26
+	public static function getCurrentProcess()
28 27
 	{
29
-		return new self (getmypid ());
28
+		return new self(getmypid());
30 29
 	}
31 30
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,10 +11,11 @@
 block discarded – undo
11 11
 	{
12 12
         $this->selector = VoidEngine::createClass ($this->class, $this->namespace);
13 13
 
14
-		if ($pid !== null)
15
-            $this->selector = $pid == getmypid () ?
14
+		if ($pid !== null) {
15
+		            $this->selector = $pid == getmypid () ?
16 16
                 VoidEngine::callMethod ($this->selector, 'GetCurrentProcess') :
17 17
                 VoidEngine::callMethod ($this->selector, 'GetProcessById', $pid);
18
+		}
18 19
 
19 20
 		Components::addComponent ($this->selector, $this);
20 21
 	}
Please login to merge, or discard this patch.
bin/qero-packages/winforms-php/VoidFramework/engine/components/Form.php 3 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -4,36 +4,36 @@  discard block
 block discarded – undo
4 4
 
5 5
 class Form extends Control
6 6
 {
7
-	public $class = 'System.Windows.Forms.Form';
7
+    public $class = 'System.Windows.Forms.Form';
8 8
 
9
-	public function get_icon ()
10
-	{
11
-		return new FormIcon ($this->selector);
12
-	}
9
+    public function get_icon ()
10
+    {
11
+        return new FormIcon ($this->selector);
12
+    }
13 13
 	
14
-	public function get_clientSize ()
15
-	{
16
-		$obj = $this->getProperty ('ClientSize');
14
+    public function get_clientSize ()
15
+    {
16
+        $obj = $this->getProperty ('ClientSize');
17 17
 
18
-		$w = VoidEngine::getProperty ($obj, 'Width');
19
-		$h = VoidEngine::getProperty ($obj, 'Height');
18
+        $w = VoidEngine::getProperty ($obj, 'Width');
19
+        $h = VoidEngine::getProperty ($obj, 'Height');
20 20
 		
21
-		VoidEngine::removeObjects ($obj);
21
+        VoidEngine::removeObjects ($obj);
22 22
 		
23
-		return [$w, $h];
24
-	}
23
+        return [$w, $h];
24
+    }
25 25
 	
26
-	public function set_clientSize (array $size)
27
-	{
28
-		$obj = $this->getProperty ('ClientSize');
26
+    public function set_clientSize (array $size)
27
+    {
28
+        $obj = $this->getProperty ('ClientSize');
29 29
 
30
-		VoidEngine::setProperty ($obj, 'Width', array_shift ($size));
31
-		VoidEngine::setProperty ($obj, 'Height', array_shift ($size));
30
+        VoidEngine::setProperty ($obj, 'Width', array_shift ($size));
31
+        VoidEngine::setProperty ($obj, 'Height', array_shift ($size));
32 32
 
33
-		$this->setProperty ('ClientSize', $obj);
33
+        $this->setProperty ('ClientSize', $obj);
34 34
 
35
-		VoidEngine::removeObjects ($obj);
36
-	}
35
+        VoidEngine::removeObjects ($obj);
36
+    }
37 37
 }
38 38
 
39 39
 class FormIcon extends Icon
@@ -46,12 +46,12 @@  discard block
 block discarded – undo
46 46
     }
47 47
 
48 48
     public function loadFromFile (string $file)
49
-	{
49
+    {
50 50
         $icon = VoidEngine::createObject ('System.Drawing.Icon', 'System.Drawing', $file);
51 51
         
52 52
         VoidEngine::setProperty ($this->formSelector, 'Icon', $icon);
53 53
 
54
-		if (!isset ($this->selector))
55
-		    $this->selector = $icon;
56
-	}
54
+        if (!isset ($this->selector))
55
+            $this->selector = $icon;
56
+    }
57 57
 }
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -6,33 +6,33 @@  discard block
 block discarded – undo
6 6
 {
7 7
 	public $class = 'System.Windows.Forms.Form';
8 8
 
9
-	public function get_icon ()
9
+	public function get_icon()
10 10
 	{
11
-		return new FormIcon ($this->selector);
11
+		return new FormIcon($this->selector);
12 12
 	}
13 13
 	
14
-	public function get_clientSize ()
14
+	public function get_clientSize()
15 15
 	{
16
-		$obj = $this->getProperty ('ClientSize');
16
+		$obj = $this->getProperty('ClientSize');
17 17
 
18
-		$w = VoidEngine::getProperty ($obj, 'Width');
19
-		$h = VoidEngine::getProperty ($obj, 'Height');
18
+		$w = VoidEngine::getProperty($obj, 'Width');
19
+		$h = VoidEngine::getProperty($obj, 'Height');
20 20
 		
21
-		VoidEngine::removeObjects ($obj);
21
+		VoidEngine::removeObjects($obj);
22 22
 		
23 23
 		return [$w, $h];
24 24
 	}
25 25
 	
26
-	public function set_clientSize (array $size)
26
+	public function set_clientSize(array $size)
27 27
 	{
28
-		$obj = $this->getProperty ('ClientSize');
28
+		$obj = $this->getProperty('ClientSize');
29 29
 
30
-		VoidEngine::setProperty ($obj, 'Width', array_shift ($size));
31
-		VoidEngine::setProperty ($obj, 'Height', array_shift ($size));
30
+		VoidEngine::setProperty($obj, 'Width', array_shift($size));
31
+		VoidEngine::setProperty($obj, 'Height', array_shift($size));
32 32
 
33
-		$this->setProperty ('ClientSize', $obj);
33
+		$this->setProperty('ClientSize', $obj);
34 34
 
35
-		VoidEngine::removeObjects ($obj);
35
+		VoidEngine::removeObjects($obj);
36 36
 	}
37 37
 }
38 38
 
@@ -40,16 +40,16 @@  discard block
 block discarded – undo
40 40
 {
41 41
     protected $formSelector;
42 42
 
43
-    public function __construct (int $formSelector)
43
+    public function __construct(int $formSelector)
44 44
     {
45 45
         $this->formSelector = $formSelector;
46 46
     }
47 47
 
48
-    public function loadFromFile (string $file)
48
+    public function loadFromFile(string $file)
49 49
 	{
50
-        $icon = VoidEngine::createObject ('System.Drawing.Icon', 'System.Drawing', $file);
50
+        $icon = VoidEngine::createObject('System.Drawing.Icon', 'System.Drawing', $file);
51 51
         
52
-        VoidEngine::setProperty ($this->formSelector, 'Icon', $icon);
52
+        VoidEngine::setProperty($this->formSelector, 'Icon', $icon);
53 53
 
54 54
 		if (!isset ($this->selector))
55 55
 		    $this->selector = $icon;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,8 @@
 block discarded – undo
51 51
         
52 52
         VoidEngine::setProperty ($this->formSelector, 'Icon', $icon);
53 53
 
54
-		if (!isset ($this->selector))
55
-		    $this->selector = $icon;
54
+		if (!isset ($this->selector)) {
55
+				    $this->selector = $icon;
56
+		}
56 57
 	}
57 58
 }
Please login to merge, or discard this patch.
qero-packages/winforms-php/VoidFramework/engine/components/MessageBox.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
 {
7 7
     public $class = 'System.Windows.Forms.MessageBox';
8 8
 
9
-    public function __construct ()
9
+    public function __construct()
10 10
     {
11
-        parent::__construct ($this->class);
11
+        parent::__construct($this->class);
12 12
     }
13 13
 }
Please login to merge, or discard this patch.
qero-packages/winforms-php/VoidFramework/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.
bin/qero-packages/winforms-php/VoidFramework/engine/components/TreeView.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 {
7 7
     public $class = 'System.Windows.Forms.TreeView';
8 8
 
9
-    public function get_path ()
9
+    public function get_path()
10 10
     {
11 11
         try
12 12
         {
@@ -26,15 +26,15 @@  discard block
 block discarded – undo
26 26
 {
27 27
     public $class = 'System.Windows.Forms.TreeNode';
28 28
 
29
-    public function __construct (string $text = '')
29
+    public function __construct(string $text = '')
30 30
     {
31
-        parent::__construct (null, $this->class);
31
+        parent::__construct(null, $this->class);
32 32
 
33 33
         $this->text = $text;
34 34
     }
35 35
 
36
-    public function get_path ()
36
+    public function get_path()
37 37
     {
38
-        return $this->getProperty ('FullPath');
38
+        return $this->getProperty('FullPath');
39 39
     }
40 40
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,9 +11,7 @@
 block discarded – undo
11 11
         try
12 12
         {
13 13
             $node = $this->selectedNode;
14
-        }
15
-
16
-        catch (\Throwable $e)
14
+        } catch (\Throwable $e)
17 15
         {
18 16
             return false;
19 17
         }
Please login to merge, or discard this patch.