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/Enviroment/ServerRequestFactory.php 1 patch
Unused Use Statements   -6 removed lines patch added patch discarded remove patch
@@ -2,16 +2,10 @@
 block discarded – undo
2 2
 namespace Kambo\HttpMessage\Factories\Enviroment;
3 3
 
4 4
 // \Spl
5
-use InvalidArgumentException;
6 5
 
7 6
 // \Psr
8
-use Psr\Http\Message\ServerRequestInterface;
9
-use Psr\Http\Message\UriInterface;
10 7
 
11 8
 // \HttpMessage
12
-use Kambo\HttpMessage\Uri;
13
-use Kambo\HttpMessage\UploadedFile;
14
-use Kambo\HttpMessage\Headers;
15 9
 use Kambo\HttpMessage\ServerRequest;
16 10
 
17 11
 // \HttpMessage\Enviroment
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/RequestTrait.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -5,13 +5,10 @@
 block discarded – undo
5 5
 use InvalidArgumentException;
6 6
 
7 7
 // \Psr
8
-use Psr\Http\Message\RequestInterface;
9 8
 use Psr\Http\Message\UriInterface;
10 9
 
11 10
 // \HttpMessage
12
-use Kambo\HttpMessage\Uri;
13 11
 use Kambo\HttpMessage\Message;
14
-use Kambo\HttpMessage\Headers;
15 12
 
16 13
 /**
17 14
  * Shared methods for outgoing, client-side request and server request.
Please login to merge, or discard this 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.
src/ServerRequest.php 2 patches
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.
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -7,12 +7,10 @@
 block discarded – undo
7 7
 // \Psr
8 8
 use Psr\Http\Message\ServerRequestInterface;
9 9
 use Psr\Http\Message\UriInterface;
10
-use Psr\Http\Message\StreamInterface;
11 10
 
12 11
 // \HttpMessage
13 12
 use Kambo\HttpMessage\Uri;
14 13
 use Kambo\HttpMessage\Message;
15
-use Kambo\HttpMessage\UploadedFile;
16 14
 use Kambo\HttpMessage\Headers;
17 15
 use Kambo\HttpMessage\Parser\Parser;
18 16
 use Kambo\HttpMessage\RequestTrait;
Please login to merge, or discard this patch.
src/Stream.php 2 patches
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.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 namespace Kambo\HttpMessage;
3 3
 
4 4
 // \Spl
5
-use InvalidArgumentException;
6 5
 use RuntimeException;
7 6
 
8 7
 // \Psr
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.