Completed
Push — master ( 60a6a6...8c89eb )
by Bohuslav
02:56
created
src/Enviroment/Enviroment.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,6 @@
 block discarded – undo
44 44
     /**
45 45
      * Constructor
46 46
      *
47
-     * @param string $providerName 
48 47
      * @param array  $server       An associative array containing information such as headers, paths, 
49 48
      *                             and script locations, must have same structure as $_SERVER 
50 49
      * @param array  $cookie       An associative array of variables, must have same structure as $_COOKIE. 
Please login to merge, or discard this patch.
src/Factories/String/UriFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@
 block discarded – undo
16 16
     /**
17 17
      * Create new Uri from provided string.
18 18
      *
19
-     * @param string $url url that will be parsed into URI object
20 19
      *
20
+     * @param string $uri
21 21
      * @return Uri Instance of Uri based on provided string
22 22
      */
23 23
     public static function create($uri)
Please login to merge, or discard this patch.
src/Headers.php 1 patch
Doc Comments   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,6 +124,9 @@  discard block
 block discarded – undo
124 124
         return $this->data;
125 125
     }
126 126
 
127
+    /**
128
+     * @param string $name
129
+     */
127 130
     public function remove($name)
128 131
     {
129 132
         $name = $this->normalizeName($name);
@@ -169,7 +172,7 @@  discard block
 block discarded – undo
169 172
     /**
170 173
      * Normalize header value
171 174
      *
172
-     * @param array $name Name of header - some headers should not be normalized.
175
+     * @param string $name Name of header - some headers should not be normalized.
173 176
      * @param array $data Header data for normalization.
174 177
      *  
175 178
      * @return array Normalized value of header
@@ -188,7 +191,7 @@  discard block
 block discarded – undo
188 191
      *
189 192
      * @param array $name Name of header for normalization
190 193
      *  
191
-     * @return array Normalized name of header
194
+     * @return string Normalized name of header
192 195
      */
193 196
     private function normalizeName($name)
194 197
     {
Please login to merge, or discard this patch.
src/Parser/Parser.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      * Parse data according their type.
32 32
      * If the data type is not support input data are returned without any modification.
33 33
      *
34
-     * @param mixed $data data for parsing
34
+     * @param \Psr\Http\Message\StreamInterface $data data for parsing
35 35
      *
36 36
      * @return mixed Type of returned valus is based on type of data if the type is XML 
37 37
      *               an instance of SimpleXMLElement is returned, else an array is returned
Please login to merge, or discard this patch.
src/ServerRequest.php 1 patch
Doc Comments   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -126,13 +126,14 @@
 block discarded – undo
126 126
      *
127 127
      * Adds a host header when none was provided and a host is defined in uri.
128 128
      *
129
-     * @param string           $method        The request method
130 129
      * @param UriInterface     $uri           The request URI object
131
-     * @param HeadersInterface $headers       The request headers collection
130
+     * @param Headers $headers       The request headers collection
132 131
      * @param array            $cookies       The request cookies collection
133
-     * @param array            $serverParams  The server environment variables
132
+     * @param array            $serverVariables  The server environment variables
134 133
      * @param String           $body          The request body object
135
-     * @param array            $uploadedFiles The request uploadedFiles collection
134
+     * @param array            $uploadFiles The request uploadedFiles collection
135
+     * @param string $requestMethod
136
+     * @param string $protocol
136 137
      */
137 138
     public function __construct(
138 139
         Uri $uri,
Please login to merge, or discard this patch.
src/Stream.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      *
82 82
      * After the stream has been detached, the stream is in an unusable state.
83 83
      *
84
-     * @return resource|null Underlying PHP stream, if any
84
+     * @return string Underlying PHP stream, if any
85 85
      */
86 86
     public function detach()
87 87
     {
@@ -314,6 +314,7 @@  discard block
 block discarded – undo
314 314
     /**
315 315
      * XXX
316 316
      *
317
+     * @param resource $stream
317 318
      * @return void
318 319
      */
319 320
     private function atach($stream)
Please login to merge, or discard this patch.
src/UploadedFile.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,6 @@
 block discarded – undo
41 41
     /**
42 42
      * Construct a new UploadedFile instance.
43 43
      *
44
-     * @param string      $fileServerPath   The full path to the uploaded file provided by the client.
45 44
      * @param string|null $clientName       The file name.
46 45
      * @param string|null $clientMediaType  The file media type.
47 46
      * @param int|null    $size             The file size in bytes.
Please login to merge, or discard this patch.
src/Uri.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
      * If no port is present, but a scheme is present, this method MAY return
258 258
      * the standard port for that scheme, but SHOULD return null.
259 259
      *
260
-     * @return null|int The URI port.
260
+     * @return integer The URI port.
261 261
      */
262 262
     public function getPort()
263 263
     {
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
      * Path must NOT contain query string or URI fragment. It can be object,
633 633
      * but then the class must implement __toString method.
634 634
      *
635
-     * @param  string|object $path The Uri path
635
+     * @param  string $path The Uri path
636 636
      *
637 637
      * @return void
638 638
      *
@@ -665,8 +665,8 @@  discard block
 block discarded – undo
665 665
      * Path must NOT contain query string or URI fragment. It can be object,
666 666
      * but then the class must implement __toString method.
667 667
      *
668
-     * @param  string|object $path The Uri path
669 668
      *
669
+     * @param string $query
670 670
      * @return void
671 671
      *
672 672
      * @throws InvalidArgumentException If the path is invalid.
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      *
41 41
      * @var integer
42 42
      */
43
-    const HTTP_PORT  = 80;
43
+    const HTTP_PORT = 80;
44 44
 
45 45
     /**
46 46
      * Https port
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
         $port     = $this->getPort();
199 199
         $userInfo = $this->getUserInfo();
200 200
 
201
-        return ($userInfo ? $userInfo. '@' : '').$this->getHost().($port ? ':' . $port : '');
201
+        return ($userInfo ? $userInfo . '@' : '') . $this->getHost() . ($port ? ':' . $port : '');
202 202
     }
203 203
 
204 204
     /**
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         if (!empty($this->user)) {
221 221
             $userInfo = $this->user;
222 222
             if (!empty($this->password)) {
223
-                $userInfo .= ':'.$this->password;
223
+                $userInfo .= ':' . $this->password;
224 224
             }
225 225
         }
226 226
 
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
         $this->validatePath($path);
471 471
 
472 472
         $clone       = clone $this;
473
-        $clone->path = $this->urlEncode((string)$path);
473
+        $clone->path = $this->urlEncode((string) $path);
474 474
 
475 475
         return $clone;
476 476
     }
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
         $this->validateQuery($query);
498 498
 
499 499
         $clone        = clone $this;
500
-        $clone->query = $this->urlEncode((string)$query);
500
+        $clone->query = $this->urlEncode((string) $query);
501 501
 
502 502
         return $clone;
503 503
     }
@@ -566,8 +566,8 @@  discard block
 block discarded – undo
566 566
 
567 567
         $path = '/' . ltrim($path, '/');
568 568
 
569
-        return ($scheme ? $scheme.':' : '').($authority ? '//'.$authority : '')
570
-            .$path.($query ? '?' . $query : '').($fragment ? '#' . $fragment : '');
569
+        return ($scheme ? $scheme . ':' : '') . ($authority ? '//' . $authority : '')
570
+            .$path . ($query ? '?' . $query : '') . ($fragment ? '#' . $fragment : '');
571 571
     }
572 572
 
573 573
     // ------------ PRIVATE METHODS
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
             throw new InvalidArgumentException('Uri scheme must be a string');
600 600
         }
601 601
 
602
-        $scheme = str_replace('://', '', strtolower((string)$scheme));
602
+        $scheme = str_replace('://', '', strtolower((string) $scheme));
603 603
         if (!isset($this->validSchema[$scheme])) {
604 604
             throw new InvalidArgumentException('Uri scheme must be one of: "", "https", "http"');
605 605
         }
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
     {
703 703
         return preg_replace_callback(
704 704
             '/(?:[^a-zA-Z0-9_\-\.~:@&=\+\$,\/;%]+|%(?![A-Fa-f0-9]{2}))/',
705
-            function ($match) {
705
+            function($match) {
706 706
                 return rawurlencode($match[0]);
707 707
             },
708 708
             $path
Please login to merge, or discard this patch.
src/RequestTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
             $target = '/';
52 52
             if ($this->uri->getPath() !== null) {
53 53
                 $target = $this->uri->getPath();
54
-                $target .= (!empty($this->uri->getQuery())) ? '?'.$this->uri->getQuery() : '';
54
+                $target .= (!empty($this->uri->getQuery())) ? '?' . $this->uri->getQuery() : '';
55 55
             }
56 56
 
57 57
             $this->requestTarget = $target;
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
      */
177 177
     public function withUri(UriInterface $uri, $preserveHost = false)
178 178
     {
179
-        $clone       = clone $this;
179
+        $clone = clone $this;
180 180
         $clone->uri = $uri;
181 181
 
182 182
         if (!$preserveHost) {
Please login to merge, or discard this patch.