Completed
Push — master ( 939cef...4aee11 )
by Kacper
03:59
created
Component/TlsEnabler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@
 block discarded – undo
29 29
     {
30 30
         parent::setClient($client);
31 31
 
32
-        $client->on('features', function (Features $features) {
32
+        $client->on('features', function(Features $features) {
33 33
             return $this->handleFeatures($features);
34 34
         }, null, 10);
35 35
 
36
-        $client->on('element', function (XmlElement $element) {
36
+        $client->on('element', function(XmlElement $element) {
37 37
             $this->handleTls($element);
38 38
         }, with\xmlns(Features\StartTls::XMLNS));
39 39
     }
Please login to merge, or discard this patch.
Component/SaslAuthenticator.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     {
60 60
         parent::setClient($client);
61 61
 
62
-        $client->on('features', function (Features $features) {
62
+        $client->on('features', function(Features $features) {
63 63
             return !$this->auth($features);
64 64
         });
65 65
     }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     {
69 69
         if (!empty($features->mechanisms)) {
70 70
             foreach ($features->mechanisms as $name) {
71
-                if($this->tryMechanism($name)) {
71
+                if ($this->tryMechanism($name)) {
72 72
                     return true;
73 73
                 }
74 74
             }
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
             $response = '=';
113 113
         }
114 114
 
115
-        $callback = $this->_client->on('element', function (XmlElement $challenge) use ($mechanism) {
115
+        $callback = $this->_client->on('element', function(XmlElement $challenge) use ($mechanism) {
116 116
             $this->handleChallenge($challenge, $mechanism);
117 117
         }, with\all(with\tag('challenge'), with\xmlns(self::XMLNS)));
118 118
 
119
-        $this->_client->once('element', function (XmlElement $result) use ($callback) {
119
+        $this->_client->once('element', function(XmlElement $result) use ($callback) {
120 120
             $this->_client->removeListener('element', $callback);
121 121
             $this->handleAuthResult($result);
122 122
         }, with\all(with\any(with\tag('success'), with\tag('failure')), with\xmlns(self::XMLNS)));
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
     private function mechanismWithoutChallenge(AuthenticationInterface $mechanism)
128 128
     {
129
-        $this->_client->once('element', function (XmlElement $result) {
129
+        $this->_client->once('element', function(XmlElement $result) {
130 130
             $this->handleAuthResult($result);
131 131
         }, with\all(with\any(with\tag('success'), with\tag('failure')), with\xmlns(self::XMLNS)));
132 132
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     private function handleAuthResult(XmlElement $result)
145 145
     {
146 146
         if ($result->localName === 'failure') {
147
-            throw new AuthenticationException('Unable to auth. '.trim($result->innerXml));
147
+            throw new AuthenticationException('Unable to auth. ' . trim($result->innerXml));
148 148
         }
149 149
 
150 150
         $this->_client->getLogger()->info('Successfully authorized as {name}.', ['name' => (string)$this->_client->jid]);
Please login to merge, or discard this patch.
Stanza/Iq.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     protected function appendChild($element)
50 50
     {
51
-        if(count($this->children) > 0) {
51
+        if (count($this->children) > 0) {
52 52
             throw new \RuntimeException('Iq stanzas cannot have more than one child.');
53 53
         }
54 54
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     public static function getXmlCollocations() : array
78 78
     {
79 79
         return array_merge(
80
-            [[ Query::class, 'name' => pass(), 'uri' => pass() ]],
80
+            [[Query::class, 'name' => pass(), 'uri' => pass()]],
81 81
             parent::getXmlCollocations()
82 82
         );
83 83
     }
Please login to merge, or discard this patch.