Completed
Push — master ( e6ed61...6d89c4 )
by Michał
02:50
created
src/console/terminals/Windows.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     /**
18 18
      * {@inheritDoc}
19 19
      */
20
-    protected function getDimensions() : ?array
20
+    protected function getDimensions() : ? array
21 21
     {
22 22
         // Ansicon environmental variable is our first fallback. Result of 'mode CON' is the next one.
23 23
         if (null === $dimensions = $this->getDimensionsFromAnsicon()) {
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * @return  array   Either an array containing two keys - 'width' and 'height' or null if the data couldn't
39 39
      *                  be parsed to retrieve anything useful.
40 40
      */
41
-    protected function getDimensionsFromAnsicon() : ?array
41
+    protected function getDimensionsFromAnsicon() : ? array
42 42
     {
43 43
         if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) {
44 44
             return [
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      * @return  array   Either an array containing two keys - 'width' and 'height' or null if the data couldn't
57 57
      *                  be parsed to retrieve anything useful.
58 58
      */
59
-    protected function getDimensionsFromMode() : ?array
59
+    protected function getDimensionsFromMode() : ? array
60 60
     {
61 61
         if (empty($output = $this->execute('mode CON'))) {
62 62
             return null;
Please login to merge, or discard this patch.
src/auth/id/Provider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
     public function request(string $method, string $url, auth\interfaces\Token $token = null, array $options = []) : Promise
109 109
     {
110 110
         return $this->getHttpClient()->requestAsync($method, $url, array_merge_recursive($this->getDefaultRequestOptions($token), $options))->then(
111
-            function (Response $response) use($token) {
111
+            function(Response $response) use($token) {
112 112
                 return $this->onRequestSuccess($response, $token);
113 113
             },
114 114
             function(\Exception $exception) use($token) {
Please login to merge, or discard this patch.
src/auth/id/interfaces/Identity.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,26 +26,26 @@
 block discarded – undo
26 26
      *
27 27
      * @return  string|null
28 28
      */
29
-    public function getUsername() : ?string;
29
+    public function getUsername() : ? string;
30 30
 
31 31
     /**
32 32
      * Returns the full name bound to the Identity.
33 33
      *
34 34
      * @return  string|null
35 35
      */
36
-    public function getName() : ?string;
36
+    public function getName() : ? string;
37 37
 
38 38
     /**
39 39
      * Returns the e-mail address bound to the Identity.
40 40
      *
41 41
      * @return  string|null
42 42
      */
43
-    public function getEmail() : ?string;
43
+    public function getEmail() : ? string;
44 44
 
45 45
     /**
46 46
      * Returns the avatar URI bound to the Identity.
47 47
      *
48 48
      * @return  string|null
49 49
      */
50
-    public function getAvatar() : ?string;
50
+    public function getAvatar() : ? string;
51 51
 }
Please login to merge, or discard this patch.
src/auth/id/Identity.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     /**
114 114
      * {@inheritDoc}
115 115
      */
116
-    public function getUsername() : ?string
116
+    public function getUsername() : ? string
117 117
     {
118 118
         return $this->username;
119 119
     }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     /**
122 122
      * {@inheritDoc}
123 123
      */
124
-    public function getName() : ?string
124
+    public function getName() : ? string
125 125
     {
126 126
         return $this->name;
127 127
     }
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
     /**
130 130
      * {@inheritDoc}
131 131
      */
132
-    public function getEmail() : ?string
132
+    public function getEmail() : ? string
133 133
     {
134 134
         return $this->email;
135 135
     }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     /**
138 138
      * {@inheritDoc}
139 139
      */
140
-    public function getAvatar() : ?string
140
+    public function getAvatar() : ? string
141 141
     {
142 142
         return $this->avatar;
143 143
     }
Please login to merge, or discard this patch.
src/auth/id/protocols/oauth1/Provider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function identify(auth\Credentials $credentials) : Promise
96 96
     {
97
-        return $this->request('GET', $this->getIdentifyUrl(), $credentials)->then(function (array $data) use ($credentials) {
97
+        return $this->request('GET', $this->getIdentifyUrl(), $credentials)->then(function(array $data) use ($credentials) {
98 98
             return $this->createIdentity($credentials, $data);
99 99
         });
100 100
     }
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     {
161 161
         return $this->getHttpClient()
162 162
             ->requestAsync('POST', $url, array_merge_recursive($this->getDefaultRequestOptions($temporary), $options))
163
-            ->then(function (Response $response) use($temporary) {
163
+            ->then(function(Response $response) use($temporary) {
164 164
 
165 165
                 // We are assuming a form-encoded body here - for any Provider that does not return those in this format
166 166
                 // for handshakes and exchanges this will require refactoring.
Please login to merge, or discard this patch.
src/auth/id/protocols/oauth1/middlewares/Authorization.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function setMethod(string $method) : Authorization
91 91
     {
92
-        switch($method) {
92
+        switch ($method) {
93 93
             case self::METHOD_HEADER:
94 94
             case self::METHOD_QUERY:
95 95
                 $this->method = $method;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function __invoke(callable $handler) : callable
110 110
     {
111
-        return function ($request, array& $stackOptions) use ($handler) {
111
+        return function($request, array& $stackOptions) use ($handler) {
112 112
 
113 113
             // Skip to the next handler if we weren't asked to do any stuff.
114 114
             if (!isset($stackOptions['oauth1'])) {
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
             // so we might just as well make all the parameters we gather and append more easily accessible
120 120
             // by pushing into the $stackOptions directly in case there actually *are* handlers in the stack
121 121
             // that have to do some post-processing after us.
122
-            $handlerOptions =& $stackOptions['oauth1'] ?: $stackOptions['oauth1'] = [];
122
+            $handlerOptions = & $stackOptions['oauth1'] ?: $stackOptions['oauth1'] = [];
123 123
 
124 124
             $this->parseOptions($handlerOptions);
125 125
             $this->gatherAuthorizationParams($handlerOptions);
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         // Unite our base parameters (which cannot be overridden) with the optional ones passed in.
188 188
         $options['params'] = [
189 189
             'oauth_version'          => '1.0',
190
-            'oauth_consumer_key'     => isset($options['client']) ? $options['client']->getId()     : $this->client->getId(),
190
+            'oauth_consumer_key'     => isset($options['client']) ? $options['client']->getId() : $this->client->getId(),
191 191
             'oauth_signature_method' => isset($options['signer']) ? $options['signer']->getMethod() : $this->signer->getMethod(),
192 192
             'oauth_nonce'            => utils\Random::string(6, utils\str\Character::CHARS_BASE64, utils\Random::STRENGTH_NONE),
193 193
             'oauth_timestamp'        => time(),
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
             $params[$key] = $key.'="'.rawurlencode($value).'"';
252 252
         }
253 253
 
254
-        return $request->withHeader('Authorization', 'OAuth ' . implode(', ', $params));
254
+        return $request->withHeader('Authorization', 'OAuth '.implode(', ', $params));
255 255
     }
256 256
 
257 257
     /**
Please login to merge, or discard this patch.
src/auth/id/protocols/oauth1/Signer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     protected function normalizeParameters(array $params) : array
96 96
     {
97 97
         // Recursively percent encode each key/value pair in the params.
98
-        array_walk_recursive($params, function (&$key, &$value) {
98
+        array_walk_recursive($params, function(&$key, &$value) {
99 99
             $key   = rawurlencode(rawurldecode($key));
100 100
             $value = rawurlencode(rawurldecode($value));
101 101
         });
@@ -152,6 +152,6 @@  discard block
 block discarded – undo
152 152
     {
153 153
         // The joining ampersand after the encoded Client's secret is correctly left in even if no Token is being
154 154
         // included in the key.
155
-        return rawurlencode($client->getSecret()) . '&' . (isset($token) ? rawurlencode($token->getSecret()) : '');
155
+        return rawurlencode($client->getSecret()).'&'.(isset($token) ? rawurlencode($token->getSecret()) : '');
156 156
     }
157 157
 }
Please login to merge, or discard this patch.
src/auth/id/protocols/oauth1/providers/Twitter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
      */
34 34
     public function getIdentifyUrl() : string
35 35
     {
36
-        return static::URL_IDENTIFY . $this->shouldProvideEmailAddress() ? '?include_email=true' : '';
36
+        return static::URL_IDENTIFY.$this->shouldProvideEmailAddress() ? '?include_email=true' : '';
37 37
     }
38 38
 }
Please login to merge, or discard this patch.
src/auth/id/protocols/oauth2/Token.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      *
109 109
      * @return  auth\Token
110 110
      */
111
-    public function getRefreshToken() : ?auth\Token
111
+    public function getRefreshToken() : ? auth\Token
112 112
     {
113 113
         return $this->refreshToken;
114 114
     }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      *
139 139
      * @return  int
140 140
      */
141
-    public function getExpiry() : ?int
141
+    public function getExpiry() : ? int
142 142
     {
143 143
         return $this->expiry;
144 144
     }
Please login to merge, or discard this patch.