Completed
Branch master (ce13db)
by Rolf
06:23
created
src/Guzzle/Http/Url.php 2 patches
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      * @param string                   $password Password of the URL
117 117
      * @param int                      $port     Port of the URL
118 118
      * @param string                   $path     Path of the URL
119
-     * @param QueryString|array|string $query    Query string of the URL
119
+     * @param QueryString $query    Query string of the URL
120 120
      * @param string                   $fragment Fragment of the URL
121 121
      */
122 122
     public function __construct($scheme, $host, $username = null, $password = null, $port = null, $path = null, QueryString $query = null, $fragment = null)
@@ -543,6 +543,9 @@  discard block
 block discarded – undo
543 543
         return $this;
544 544
     }
545 545
 
546
+    /**
547
+     * @param boolean $strictRfc386
548
+     */
546 549
     private function addQuery(QueryString $new, $strictRfc386)
547 550
     {
548 551
         if (!$strictRfc386) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                 if (isset($parts['pass'])) {
73 73
                     $url .= ':' . $parts['pass'];
74 74
                 }
75
-                $url .=  '@';
75
+                $url .= '@';
76 76
             }
77 77
 
78 78
             $url .= $parts['host'];
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         // Add the path component if present
89 89
         if (isset($parts['path']) && 0 !== strlen($parts['path'])) {
90 90
             // Always ensure that the path begins with '/' if set and something is before the path
91
-            if ($url && $parts['path'][0] != '/' && substr($url, -1)  != '/') {
91
+            if ($url && $parts['path'][0] != '/' && substr($url, -1) != '/') {
92 92
                 $url .= '/';
93 93
             }
94 94
             $url .= $parts['path'];
Please login to merge, or discard this patch.
src/Guzzle/Plugin/Cache/DefaultCacheStorage.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     protected $defaultTtl;
26 26
 
27 27
     /**
28
-     * @param mixed  $cache      Cache used to store cache data
28
+     * @param CacheAdapterInterface  $cache      Cache used to store cache data
29 29
      * @param string $keyPrefix  Provide an optional key prefix to prefix on all cache keys
30 30
      * @param int    $defaultTtl Default cache TTL
31 31
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@
 block discarded – undo
259 259
         $headers = $message->getHeaders()->getAll();
260 260
         $headers = array_diff_key($headers, $noCache);
261 261
         // Cast the headers to a string
262
-        $headers = array_map(function ($h) { return (string) $h; }, $headers);
262
+        $headers = array_map(function($h) { return (string) $h; }, $headers);
263 263
 
264 264
         return $headers;
265 265
     }
Please login to merge, or discard this patch.
src/Guzzle/Plugin/Cookie/Cookie.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     /**
25 25
      * Gets an array of invalid cookie characters
26 26
      *
27
-     * @return array
27
+     * @return string
28 28
      */
29 29
     protected static function getInvalidCharacters()
30 30
     {
Please login to merge, or discard this patch.
src/Guzzle/Plugin/Md5/Md5ValidatorPlugin.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      *                                      applied is a more expensive comparison because the entity body will need to
25 25
      *                                      be compressed in order to get the correct hash.  Set to FALSE to not
26 26
      *                                      validate the MD5 hash of an entity body with an applied Content-Encoding.
27
-     * @param bool|int $contentLengthCutoff Maximum Content-Length (bytes) in which a MD5 hash will be validated. Any
27
+     * @param boolean $contentLengthCutoff Maximum Content-Length (bytes) in which a MD5 hash will be validated. Any
28 28
      *                                      response with a Content-Length greater than this value will not be validated
29 29
      *                                      because it will be deemed too memory intensive.
30 30
      */
Please login to merge, or discard this patch.
src/Guzzle/Plugin/Oauth/OauthPlugin.php 4 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      * Request before-send event handler
70 70
      *
71 71
      * @param Event $event Event received
72
-     * @return array
72
+     * @return Collection
73 73
      * @throws \InvalidArgumentException
74 74
      */
75 75
     public function onRequestBeforeSend(Event $event)
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     /**
106 106
      * Builds the Authorization header for a request
107 107
      *
108
-     * @param array $authorizationParams Associative array of authorization parameters
108
+     * @param Collection $authorizationParams Associative array of authorization parameters
109 109
      *
110 110
      * @return string
111 111
      */
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
     /**
169 169
      * Get the oauth parameters as named by the oauth spec
170 170
      *
171
-     * @param $timestamp
172
-     * @param $nonce
171
+     * @param integer $timestamp
172
+     * @param string $nonce
173 173
      * @return Collection
174 174
      */
175 175
     protected function getOauthParams($timestamp, $nonce)
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
      * overwritten e.g. the Flickr API incorrectly adds the post fields when the Content-Type
238 238
      * is 'application/x-www-form-urlencoded'
239 239
      *
240
-     * @param $request
240
+     * @param RequestInterface $request
241 241
      * @return bool Whether the post fields should be signed or not
242 242
      */
243 243
     public function shouldPostFieldsBeSigned($request)
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use Guzzle\Common\Collection;
7 7
 use Guzzle\Http\Message\RequestInterface;
8 8
 use Guzzle\Http\Message\EntityEnclosingRequestInterface;
9
-use Guzzle\Http\QueryString;
10 9
 use Guzzle\Http\Url;
11 10
 use Symfony\Component\EventDispatcher\EventSubscriberInterface;
12 11
 
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
         $url = Url::factory($request->getUrl())->setQuery('')->setFragment(null);
162 162
 
163 163
         return strtoupper($request->getMethod()) . '&'
164
-             . rawurlencode($url) . '&'
165
-             . rawurlencode((string) $parameterString);
164
+                . rawurlencode($url) . '&'
165
+                . rawurlencode((string) $parameterString);
166 166
     }
167 167
 
168 168
     /**
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
      */
275 275
     public function getTimestamp(Event $event)
276 276
     {
277
-       return $event['timestamp'] ?: time();
277
+        return $event['timestamp'] ?: time();
278 278
     }
279 279
 
280 280
     /**
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
         $request = $event['request'];
79 79
         $nonce = $this->generateNonce($request);
80 80
         $authorizationParams = $this->getOauthParams($timestamp, $nonce);
81
-        $authorizationParams['oauth_signature']  = $this->getSignature($request, $timestamp, $nonce);
81
+        $authorizationParams['oauth_signature'] = $this->getSignature($request, $timestamp, $nonce);
82 82
 
83 83
         switch ($this->config['request_method']) {
84 84
             case self::REQUEST_METHOD_HEADER:
Please login to merge, or discard this patch.
src/Guzzle/Service/Client.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @param string $method Name of the command object to instantiate
69 69
      * @param array  $args   Arguments to pass to the command
70 70
      *
71
-     * @return mixed Returns the result of the command
71
+     * @return \Guzzle\Http\Message\Response Returns the result of the command
72 72
      * @throws BadMethodCallException when a command is not found
73 73
      */
74 74
     public function __call($method, $args)
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     /**
182 182
      * Get the inflector used with the client
183 183
      *
184
-     * @return self
184
+     * @return InflectorInterface
185 185
      */
186 186
     public function getInflector()
187 187
     {
Please login to merge, or discard this patch.
src/Guzzle/Service/Command/Factory/CompositeFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
     }
33 33
 
34 34
     /**
35
-     * @param array $factories Array of command factories
35
+     * @param ConcreteClassFactory[] $factories Array of command factories
36 36
      */
37 37
     public function __construct(array $factories = array())
38 38
     {
Please login to merge, or discard this patch.
src/Guzzle/Service/Command/LocationVisitor/Request/XmlVisitor.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@
 block discarded – undo
207 207
      *
208 208
      * @param \XMLWriter $xmlWriter
209 209
      *
210
-     * @return \string the writer resource
210
+     * @return string the writer resource
211 211
      */
212 212
     protected function finishDocument($xmlWriter)
213 213
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
             foreach ((array) $root['namespaces'] as $prefix => $uri) {
98 98
                 $nsLabel = 'xmlns';
99 99
                 if (!is_numeric($prefix)) {
100
-                    $nsLabel .= ':'.$prefix;
100
+                    $nsLabel .= ':' . $prefix;
101 101
                 }
102 102
                 $xmlWriter->writeAttribute($nsLabel, $uri);
103 103
             }
Please login to merge, or discard this patch.
src/Guzzle/Service/Command/OperationResponseParser.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 use Guzzle\Service\Command\LocationVisitor\Response\ResponseVisitorInterface;
8 8
 use Guzzle\Service\Description\Parameter;
9 9
 use Guzzle\Service\Description\OperationInterface;
10
-use Guzzle\Service\Description\Operation;
11 10
 use Guzzle\Service\Exception\ResponseClassException;
12 11
 use Guzzle\Service\Resource\Model;
13 12
 
Please login to merge, or discard this patch.