Completed
Push — master ( cfd0e6...d7683b )
by Michał
06:41
created
id/protocols/oauth1/middlewares/Authorization.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
      * See the class description for which kind of additional options are supported/mandatory.
105 105
      *
106 106
      * @param   callable    $handler
107
-     * @return  callable
107
+     * @return  \Closure
108 108
      */
109 109
     public function __invoke(callable $handler) : callable
110 110
     {
Please login to merge, or discard this 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']->getSignatureMethod() : $this->signer->getSignatureMethod(),
192 192
             'oauth_nonce'            => utils\Random::string(6, utils\str\Character::CHARS_BASE64, utils\Random::STRENGTH_NONE),
193 193
             'oauth_timestamp'        => time(),
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
             $params[$key] = $key.'="'.rawurlencode($value).'"';
251 251
         }
252 252
 
253
-        return $request->withHeader('Authorization', 'OAuth ' . implode(', ', $params));
253
+        return $request->withHeader('Authorization', 'OAuth '.implode(', ', $params));
254 254
     }
255 255
 
256 256
     /**
Please login to merge, or discard this patch.
id/Identity.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     /**
88 88
      * {@inheritDoc}
89 89
      */
90
-    public function getUsername() : ?string
90
+    public function getUsername() : ? string
91 91
     {
92 92
         return $this->username;
93 93
     }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
     /**
96 96
      * {@inheritDoc}
97 97
      */
98
-    public function getName() : ?string
98
+    public function getName() : ? string
99 99
     {
100 100
         return $this->name;
101 101
     }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     /**
104 104
      * {@inheritDoc}
105 105
      */
106
-    public function getEmail() : ?string
106
+    public function getEmail() : ? string
107 107
     {
108 108
         return $this->email;
109 109
     }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     /**
112 112
      * {@inheritDoc}
113 113
      */
114
-    public function getAvatar() : ?string
114
+    public function getAvatar() : ? string
115 115
     {
116 116
         return $this->avatar;
117 117
     }
Please login to merge, or discard this patch.
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.