Completed
Branch master (e24eb4)
by richard
04:53 queued 02:43
created
src/Helpers/URI.php 1 patch
Doc Comments   +7 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,6 +11,7 @@  discard block
 block discarded – undo
11 11
      * Retrieve the parameters from the URI
12 12
      *
13 13
      * @param type name 		description
14
+     * @param null|string $uri
14 15
      * @return type 				description
15 16
      */
16 17
     public static function getQueryParams($uri, $serialized = true)
@@ -64,7 +65,6 @@  discard block
 block discarded – undo
64 65
     /**
65 66
      * Serializes the query params
66 67
      *
67
-     * @param array $params 		The query params
68 68
      * @return string
69 69
      */
70 70
     public static function serializeQueryParams(array $queryParams)
@@ -105,6 +105,9 @@  discard block
 block discarded – undo
105 105
         return htmlentities(strip_tags($query), ENT_QUOTES);
106 106
     }
107 107
 
108
+    /**
109
+     * @param string $query
110
+     */
108 111
     public static function isQueryValid($query)
109 112
     {
110 113
         if (!is_string($query) && !method_exists($query, '__toString')) {
@@ -114,6 +117,9 @@  discard block
 block discarded – undo
114 117
         return true;
115 118
     }
116 119
 
120
+    /**
121
+     * @param string $uri
122
+     */
117 123
     public static function isValid($uri)
118 124
     {
119 125
         if (!($uri instanceof PsrUri) && !is_string($uri)) {
Please login to merge, or discard this patch.
src/Psr/Messages/Message.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
      * Adds a header. Does not replace the value if it already exists.
249 249
      *
250 250
      * @param string $name         The header's name
251
-    * @param mixed $value         The header's value
251
+    * @param string $value         The header's value
252 252
      * @return void
253 253
      */
254 254
     public function addHeader($name, $value)
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
     /**
292 292
      * Returns the message's body.
293 293
      *
294
-     * @return Psr\Http\Message\StreamInterface
294
+     * @return StreamInterface|null
295 295
      */
296 296
     public function getBody()
297 297
     {
Please login to merge, or discard this patch.
src/Psr/Messages/Request.php 2 patches
Doc Comments   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,6 @@  discard block
 block discarded – undo
196 196
      *
197 197
      * @link http://tools.ietf.org/html/rfc7230#section-5.3 (for the various
198 198
      *     request-target forms allowed in request messages)
199
-     * @param mixed $requestTarget
200 199
      * @return static
201 200
      */
202 201
     public function withRequestTarget($target)
@@ -222,6 +221,9 @@  discard block
 block discarded – undo
222 221
         return $this -> _method;
223 222
     }
224 223
 
224
+    /**
225
+     * @param string $method
226
+     */
225 227
     public function setMethod($method)
226 228
     {
227 229
         $this -> _method = $method;
@@ -357,6 +359,9 @@  discard block
 block discarded – undo
357 359
         return null;
358 360
     }
359 361
 
362
+    /**
363
+     * @param string $method
364
+     */
360 365
     protected function fillFields($method)
361 366
     {
362 367
         $server = new Server;
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -5,11 +5,8 @@
 block discarded – undo
5 5
 use Psr\Http\Message\RequestInterface;
6 6
 use Psr\Http\Message\UriInterface;
7 7
 use Almendra\Http\Psr\Messages\Environment;
8
-
9 8
 use Almendra\Http\Server;
10 9
 
11
-use Almendra\Http\Requests\Field;
12
-
13 10
 /**
14 11
  * Represents an incomming request.
15 12
  * Server specific methods are left to ServerRequest.
Please login to merge, or discard this patch.
src/Psr/Messages/ServerRequest.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     /**
49 49
      * Returns the deserialized query parameters
50 50
      *
51
-     * @return array 				The query parameters
51
+     * @return boolean 				The query parameters
52 52
      */
53 53
     public function getQueryParams()
54 54
     {
Please login to merge, or discard this patch.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,6 @@
 block discarded – undo
3 3
 namespace Almendra\Http\Psr\Messages;
4 4
 
5 5
 use Psr\Http\Message\ServerRequestInterface as RequestInterface;
6
-use Psr\Http\Message\UriInterface;
7
-use Psr\Http\Message\Environment;
8 6
 
9 7
 class ServerRequest extends Message implements RequestInterface
10 8
 {
Please login to merge, or discard this patch.
src/Psr/Messages/Stream.php 1 patch
Doc Comments   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     /**
50 50
      * Closes the stream and any underlying resources.
51 51
      *
52
-     * @return void
52
+     * @return boolean
53 53
      */
54 54
     public function close()
55 55
     {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      *
62 62
      * After the stream has been detached, the stream is in an unusable state.
63 63
      *
64
-     * @return resource|null Underlying PHP stream, if any
64
+     * @return boolean Underlying PHP stream, if any
65 65
      */
66 66
     public function detach()
67 67
     {
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     /**
82 82
      * Returns the current position of the file read/write pointer
83 83
      *
84
-     * @return int Position of the file pointer
84
+     * @return boolean Position of the file pointer
85 85
      * @throws \RuntimeException on error.
86 86
      */
87 87
     public function tell()
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      * @param int $length Read up to $length bytes from the object and return
181 181
      *     them. Fewer than $length bytes may be returned if underlying stream
182 182
      *     call returns fewer bytes.
183
-     * @return string Returns the data read from the stream, or an empty string
183
+     * @return boolean Returns the data read from the stream, or an empty string
184 184
      *     if no bytes are available.
185 185
      * @throws \RuntimeException if an error occurs.
186 186
      */
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
     /**
193 193
      * Returns the remaining contents in a string
194 194
      *
195
-     * @return string
195
+     * @return boolean
196 196
      * @throws \RuntimeException if unable to read or an error occurs while
197 197
      *     reading.
198 198
      */
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
     /**
232 232
      * Sets the value of _raw.
233 233
      *
234
-     * @param mixed $_raw the raw
234
+     * @param mixed $raw the raw
235 235
      *
236 236
      * @return self
237 237
      */
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     /**
256 256
      * Sets the value of _body.
257 257
      *
258
-     * @param mixed $_body the body
258
+     * @param mixed $body the body
259 259
      *
260 260
      * @return self
261 261
      */
Please login to merge, or discard this patch.
src/Psr/Messages/Uri.php 2 patches
Doc Comments   +20 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * Constructs a new URI
66 66
      *
67 67
      * @param string $uri 		The URI
68
-     * @return boolean			true if success
68
+     * @return boolean|null			true if success
69 69
      */
70 70
     public function __construct($uri = null)
71 71
     {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      * Returns the user authority in the "[user-info@]host[:port]" format.
99 99
      *
100 100
      * @param type name 		description
101
-     * @return type 				description
101
+     * @return string 				description
102 102
      */
103 103
     public function getAuthority()
104 104
     {
@@ -254,6 +254,9 @@  discard block
 block discarded – undo
254 254
         return $this -> _fragment;
255 255
     }
256 256
 
257
+    /**
258
+     * @param string $fragment
259
+     */
257 260
     protected function setFragment($fragment = null)
258 261
     {
259 262
         $this -> _fragment = (isset($fragment) && null !== $fragment) ?
@@ -284,6 +287,9 @@  discard block
 block discarded – undo
284 287
         return $clone;
285 288
     }
286 289
 
290
+    /**
291
+     * @param string $scheme
292
+     */
287 293
     protected function setScheme($scheme)
288 294
     {
289 295
         $this -> _scheme = $scheme;
@@ -312,11 +318,17 @@  discard block
 block discarded – undo
312 318
         return $clone;
313 319
     }
314 320
 
321
+    /**
322
+     * @param string $user
323
+     */
315 324
     protected function setUser($user)
316 325
     {
317 326
         $this -> _username = $user;
318 327
     }
319 328
 
329
+    /**
330
+     * @param null|string $password
331
+     */
320 332
     protected function setPassword($password)
321 333
     {
322 334
         $this -> _password = $password;
@@ -371,6 +383,9 @@  discard block
 block discarded – undo
371 383
         return $clone;
372 384
     }
373 385
 
386
+    /**
387
+     * @param null|integer $port
388
+     */
374 389
     protected function setPort($port) {
375 390
         $this -> _port = $port;
376 391
     }
@@ -421,6 +436,9 @@  discard block
 block discarded – undo
421 436
         return $clone;
422 437
     }
423 438
 
439
+    /**
440
+     * @param string $query
441
+     */
424 442
     public function setQuery($query)
425 443
     {
426 444
         $this -> _query = $query;
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace Almendra\Http\Psr\Messages;
4 4
 
5 5
 use Psr\Http\Message\UriInterface;
6
-
7 6
 use Almendra\Http\Helpers\URI as URIHelper;
8 7
 use Almendra\Http\Server;
9 8
 
Please login to merge, or discard this patch.
src/Server.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
      * Retrieves a value define in the superglobal $_SERVER.
11 11
      *
12 12
      * @param string $value 		The key's name.
13
-     * @return string|mixed
13
+     * @return string
14 14
      */
15 15
     public static function getValue($value, $default = '')
16 16
     {
Please login to merge, or discard this patch.