Completed
Push — master ( 5eff09...92586b )
by Kacper
03:19
created
Xml/XmlParser.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
         xml_parser_set_option($this->_parser, XML_OPTION_SKIP_WHITE, 1);
72 72
         xml_parser_set_option($this->_parser, XML_OPTION_CASE_FOLDING, 0);
73 73
 
74
-        xml_set_element_handler($this->_parser, function ($parser, $name, $attrs) {
74
+        xml_set_element_handler($this->_parser, function($parser, $name, $attrs) {
75 75
             $this->handleElementStart($name, $attrs);
76
-        }, function () {
76
+        }, function() {
77 77
             $this->handleElementEnd();
78 78
         });
79 79
 
80
-        xml_set_character_data_handler($this->_parser, function ($parser, $data) {
80
+        xml_set_character_data_handler($this->_parser, function($parser, $data) {
81 81
             $this->handleTextData($data);
82 82
         });
83 83
 
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
             return 'http://www.w3.org/2000/xmlns/';
112 112
         }
113 113
 
114
-        if (isset($namespaces[ $prefix ])) {
115
-            return $namespaces[ $prefix ];
114
+        if (isset($namespaces[$prefix])) {
115
+            return $namespaces[$prefix];
116 116
         }
117 117
 
118 118
         return !empty($this->_stack) ? end($this->_stack)->lookupUri($prefix) : null;
@@ -123,10 +123,10 @@  discard block
 block discarded – undo
123 123
         list($attributes, $namespaces) = $this->_attributes($attrs);
124 124
         list($tag, $prefix)            = XmlElement::resolve($name);
125 125
 
126
-        $uri   = $this->_lookup($prefix, $namespaces);
126
+        $uri = $this->_lookup($prefix, $namespaces);
127 127
 
128 128
         /** @var XmlElement $element */
129
-        $element = $this->factory->create($uri, $tag, [ $name, $uri ]);
129
+        $element = $this->factory->create($uri, $tag, [$name, $uri]);
130 130
 
131 131
         foreach ($namespaces as $prefix => $uri) {
132 132
             $element->setNamespace($uri, $prefix);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         if (count($this->_stack) > 1) {
146 146
             end($this->_stack)->append($element);
147 147
         }
148
-        $this->emit('parse.begin', [ $element ]);
148
+        $this->emit('parse.begin', [$element]);
149 149
 
150 150
         $this->_stack[] = $element;
151 151
     }
@@ -158,10 +158,10 @@  discard block
 block discarded – undo
158 158
 
159 159
         $element = array_pop($this->_stack);
160 160
         if (count($this->_stack) == 1) {
161
-            $this->emit('element', [ $element ]);
161
+            $this->emit('element', [$element]);
162 162
         }
163 163
 
164
-        $this->emit('parse.end', [ $element ]);
164
+        $this->emit('parse.end', [$element]);
165 165
     }
166 166
 
167 167
     private function handleTextData($data)
Please login to merge, or discard this patch.
XmppClient.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -110,11 +110,11 @@  discard block
 block discarded – undo
110 110
 
111 111
         $this->applyOptions($options);
112 112
 
113
-        $this->_connector->on('connect', function (...$arguments) {
113
+        $this->_connector->on('connect', function(...$arguments) {
114 114
             return $this->emit('connect', $arguments);
115 115
         });
116 116
 
117
-        $this->on('element', function (Features $element) {
117
+        $this->on('element', function(Features $element) {
118 118
             $this->_features = $element;
119 119
             $this->emit('features', [$element]);
120 120
         }, Features::class);
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             'password'  => -1
134 134
         ]);
135 135
 
136
-        if($options['default-modules']) {
136
+        if ($options['default-modules']) {
137 137
             $options['modules'] = array_merge([
138 138
                 TlsEnabler::class    => new TlsEnabler(),
139 139
                 Binding::class       => new Binding(),
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
             ));
219 219
         }
220 220
 
221
-        $this->_connector->on('connect', function ($stream) {
221
+        $this->_connector->on('connect', function($stream) {
222 222
             $this->handleConnect($stream);
223 223
         });
224 224
     }
Please login to merge, or discard this patch.