Completed
Push — master ( e454e2...30b9c0 )
by Kacper
02:38
created
Utils/DnsResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
                 continue;
55 55
             }
56 56
 
57
-            $this->_results = array_merge($this->_results, array_map(function ($record) {
57
+            $this->_results = array_merge($this->_results, array_map(function($record) {
58 58
                 return [$record['target'], $record['port']];
59 59
             }, $result));
60 60
         }
Please login to merge, or discard this patch.
Utils/Helper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
  */
25 25
 function typeof($value) : string
26 26
 {
27
-    if(is_object($value)) {
28
-        return "object of type ".get_class($value);
29
-    } elseif(is_resource($value)) {
30
-        return get_resource_type($value).' resource';
27
+    if (is_object($value)) {
28
+        return "object of type " . get_class($value);
29
+    } elseif (is_resource($value)) {
30
+        return get_resource_type($value) . ' resource';
31 31
     } else {
32 32
         return gettype($value);
33 33
     }
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     return function(...$arguments) use ($callable, $argument, $position) {
39 39
         $arguments = array_merge(
40 40
             array_slice($arguments, 0, $position),
41
-            [ $argument ],
41
+            [$argument],
42 42
             array_slice($arguments, $position)
43 43
         );
44 44
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
 function dd($value)
50 50
 {
51
-    echo Dumper::get()->dump($value).PHP_EOL.PHP_EOL;
51
+    echo Dumper::get()->dump($value) . PHP_EOL . PHP_EOL;
52 52
 }
53 53
 
54 54
 function format($string, array $arguments = [])
Please login to merge, or discard this patch.
XmppClient.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
 
107 107
     protected function handleFeatures(Features $element)
108 108
     {
109
-        if(!parent::handleFeatures($element)) {
109
+        if (!parent::handleFeatures($element)) {
110 110
             return false;
111 111
         }
112 112
 
Please login to merge, or discard this patch.
Xml/XmlParser.php 1 patch
Spacing   +8 added lines, -8 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
 
@@ -119,10 +119,10 @@  discard block
 block discarded – undo
119 119
         list($attributes, $namespaces) = $this->_attributes($attrs);
120 120
         list($tag, $prefix)            = XmlElement::resolve($name);
121 121
 
122
-        $uri   = $this->_lookup($prefix, $namespaces);
122
+        $uri = $this->_lookup($prefix, $namespaces);
123 123
 
124 124
         /** @var XmlElement $element */
125
-        $element = $this->factory->create($uri, $tag, [ $name, $uri ]);
125
+        $element = $this->factory->create($uri, $tag, [$name, $uri]);
126 126
         foreach ($attributes as $name => $value) {
127 127
             $element->setAttribute($name, $value);
128 128
         }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         if (count($this->_stack) > 1) {
138 138
             end($this->_stack)->append($element);
139 139
         }
140
-        $this->emit('parse.begin', [ $element ]);
140
+        $this->emit('parse.begin', [$element]);
141 141
 
142 142
         $this->_stack[] = $element;
143 143
     }
@@ -150,10 +150,10 @@  discard block
 block discarded – undo
150 150
 
151 151
         $element = array_pop($this->_stack);
152 152
         if (count($this->_stack) == 1) {
153
-            $this->emit('element', [ $element ]);
153
+            $this->emit('element', [$element]);
154 154
         }
155 155
 
156
-        $this->emit('parse.end', [ $element ]);
156
+        $this->emit('parse.end', [$element]);
157 157
     }
158 158
 
159 159
     private function handleTextData($data)
Please login to merge, or discard this patch.
Xml/XmlElement.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function getInnerXml()
129 129
     {
130
-        return implode('', array_map(function ($element) {
130
+        return implode('', array_map(function($element) {
131 131
             if (is_string($element)) {
132 132
                 return htmlspecialchars($element);
133 133
             } elseif ($element instanceof XmlElement) {
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
         $attributes = $this->attributes();
155 155
 
156 156
         $result = "<{$this->name}";
157
-        $result .= ' ' . implode(' ', array_map(function ($key, $value) {
157
+        $result .= ' ' . implode(' ', array_map(function($key, $value) {
158 158
                 return $key . '="' . htmlspecialchars($value, ENT_QUOTES) . '"';
159 159
             }, array_keys($attributes), array_values($attributes)));
160 160
 
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
     private function attributes(): array
420 420
     {
421 421
         $namespaces = $this->getNamespaces(false);
422
-        $namespaces = array_map(function ($prefix, $uri) {
422
+        $namespaces = array_map(function($prefix, $uri) {
423 423
             return [$prefix ? "xmlns:{$prefix}" : 'xmlns', $uri];
424 424
         }, array_values($namespaces), array_keys($namespaces));
425 425
 
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
      */
440 440
     protected function _prefix(string $name, string $uri = null): string
441 441
     {
442
-        if($uri === null) {
442
+        if ($uri === null) {
443 443
             return $name;
444 444
         }
445 445
 
Please login to merge, or discard this patch.