Completed
Push — master ( 2305de...2a1e7c )
by smiley
02:23
created
src/CurlHandle.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
 	}
96 96
 
97 97
 	/**
98
-	 * @return \Psr\Http\Message\ResponseInterface
98
+	 * @return resource
99 99
 	 */
100 100
 	public function init(){
101 101
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -214,12 +214,12 @@
 block discarded – undo
214 214
 		$options[CURLOPT_HTTPHEADER] = $curlHeaders;
215 215
 
216 216
 		// If the Expect header is not present, prevent curl from adding it
217
-		if (!$this->request->hasHeader('Expect')) {
217
+		if(!$this->request->hasHeader('Expect')){
218 218
 			$options[CURLOPT_HTTPHEADER][] = 'Expect:';
219 219
 		}
220 220
 
221 221
 		// cURL sometimes adds a content-type by default. Prevent this.
222
-		if (!$this->request->hasHeader('Content-Type')) {
222
+		if(!$this->request->hasHeader('Content-Type')){
223 223
 			$options[CURLOPT_HTTPHEADER][] = 'Content-Type:';
224 224
 		}
225 225
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -214,12 +214,12 @@
 block discarded – undo
214 214
 		$options[CURLOPT_HTTPHEADER] = $curlHeaders;
215 215
 
216 216
 		// If the Expect header is not present, prevent curl from adding it
217
-		if (!$this->request->hasHeader('Expect')) {
217
+		if (!$this->request->hasHeader('Expect')){
218 218
 			$options[CURLOPT_HTTPHEADER][] = 'Expect:';
219 219
 		}
220 220
 
221 221
 		// cURL sometimes adds a content-type by default. Prevent this.
222
-		if (!$this->request->hasHeader('Content-Type')) {
222
+		if (!$this->request->hasHeader('Content-Type')){
223 223
 			$options[CURLOPT_HTTPHEADER][] = 'Content-Type:';
224 224
 		}
225 225
 
Please login to merge, or discard this patch.
src/Psr17/UploadedFileFactory.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 	 * @see http://php.net/manual/features.file-upload.post-method.php
27 27
 	 * @see http://php.net/manual/features.file-upload.errors.php
28 28
 	 *
29
-	 * @param StreamInterface $stream          Underlying stream representing the
29
+	 * @param \Psr\Http\Message\StreamInterface $stream          Underlying stream representing the
30 30
 	 *                                         uploaded file content.
31 31
 	 * @param int             $size            in bytes
32 32
 	 * @param int             $error           PHP file upload error
Please login to merge, or discard this patch.
src/Psr7/UploadedFile.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@
 block discarded – undo
203 203
 	 *
204 204
 	 * @author Michael Dowling and contributors to guzzlehttp/psr7
205 205
 	 *
206
-	 * @param StreamInterface $dest   Stream to write to
206
+	 * @param \Psr\Http\Message\StreamInterface $dest   Stream to write to
207 207
 	 *
208 208
 	 * @throws \RuntimeException on error
209 209
 	 */
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	/**
157 157
 	 * @inheritdoc
158 158
 	 */
159
-	public function getSize():?int{
159
+	public function getSize(): ?int{
160 160
 		return $this->size;
161 161
 	}
162 162
 
@@ -170,14 +170,14 @@  discard block
 block discarded – undo
170 170
 	/**
171 171
 	 * @inheritdoc
172 172
 	 */
173
-	public function getClientFilename():?string{
173
+	public function getClientFilename(): ?string{
174 174
 		return $this->clientFilename;
175 175
 	}
176 176
 
177 177
 	/**
178 178
 	 * @inheritdoc
179 179
 	 */
180
-	public function getClientMediaType():?string{
180
+	public function getClientMediaType(): ?string{
181 181
 		return $this->clientMediaType;
182 182
 	}
183 183
 
Please login to merge, or discard this patch.
Unused Use Statements   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,8 @@
 block discarded – undo
14 14
 
15 15
 use chillerlan\HTTP\{Psr17, Psr17\StreamFactory};
16 16
 use Psr\Http\Message\{StreamInterface, UploadedFileInterface};
17
-use InvalidArgumentException, RuntimeException;
17
+use InvalidArgumentException;
18
+use RuntimeException;
18 19
 
19 20
 final class UploadedFile implements UploadedFileInterface{
20 21
 
Please login to merge, or discard this patch.
src/Psr7/Uri.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 	 * @return int|null
308 308
 	 * @throws \InvalidArgumentException
309 309
 	 */
310
-	private function filterPort($port):?int{
310
+	private function filterPort($port): ?int{
311 311
 
312 312
 		if($port === null){
313 313
 			return null;
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
 	/**
326 326
 	 * @inheritdoc
327 327
 	 */
328
-	public function getPort():?int{
328
+	public function getPort(): ?int{
329 329
 		return $this->port;
330 330
 	}
331 331
 
Please login to merge, or discard this patch.
src/Psr7/Stream.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@
 block discarded – undo
169 169
 	/**
170 170
 	 * @inheritdoc
171 171
 	 */
172
-	public function getSize():?int{
172
+	public function getSize(): ?int{
173 173
 
174 174
 		if($this->size !== null){
175 175
 			return $this->size;
Please login to merge, or discard this patch.
Unused Use Statements   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,8 +12,10 @@
 block discarded – undo
12 12
 
13 13
 namespace chillerlan\HTTP\Psr7;
14 14
 
15
+use Exception;
16
+use InvalidArgumentException;
15 17
 use Psr\Http\Message\StreamInterface;
16
-use Exception, InvalidArgumentException, RuntimeException;
18
+use RuntimeException;
17 19
 
18 20
 final class Stream implements StreamInterface{
19 21
 
Please login to merge, or discard this patch.
src/MagicAPI/EndpointDocblock.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
 			}
81 81
 
82
-			$str.= ' * @method \\'.$returntype.' '.$methodName.'('.implode(', ', $args).')'.PHP_EOL;
82
+			$str .= ' * @method \\'.$returntype.' '.$methodName.'('.implode(', ', $args).')'.PHP_EOL;
83 83
 		}
84 84
 
85 85
 		$str .= ' *'.'/'.PHP_EOL;
@@ -113,13 +113,13 @@  discard block
 block discarded – undo
113 113
 			}
114 114
 
115 115
 			$args = [];
116
-			$str.= "\t".'/**'.PHP_EOL;
116
+			$str .= "\t".'/**'.PHP_EOL;
117 117
 
118 118
 			if(is_array($params['path_elements']) && count($params['path_elements']) > 0){
119 119
 
120 120
 				foreach($params['path_elements'] as $i){
121 121
 					$a = 'string $'.$i;
122
-					$str.= "\t".' * @param '.$a.PHP_EOL;
122
+					$str .= "\t".' * @param '.$a.PHP_EOL;
123 123
 
124 124
 					$args[] = $a;
125 125
 				}
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
 			if(!empty($params['query'])){
130 130
 				$a = 'array $params = [\''.implode('\', \'', $params['query']).'\']';
131
-				$str.= "\t".' * @param '.$a.PHP_EOL;
131
+				$str .= "\t".' * @param '.$a.PHP_EOL;
132 132
 				$args[] = $a;
133 133
 			}
134 134
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
 				if($params['body'] !== null){
138 138
 					$a = is_array($params['body']) ? 'array $body = [\''.implode('\', \'', $params['body']).'\']' : 'array $body = []';
139
-					$str.= "\t".' * @param '.$a.PHP_EOL;
139
+					$str .= "\t".' * @param '.$a.PHP_EOL;
140 140
 					$args[] = $a;
141 141
 				}
142 142
 
@@ -144,9 +144,9 @@  discard block
 block discarded – undo
144 144
 
145 145
 			$r = new ReflectionClass($returntype);
146 146
 
147
-			$str.= "\t".' * @return \\'.$r->getName().PHP_EOL;
148
-			$str.= "\t".' */'.PHP_EOL;
149
-			$str.= "\t".'public function '.$methodName.'('.implode(', ', $args).'):'.$r->getShortName().';'.PHP_EOL.PHP_EOL;
147
+			$str .= "\t".' * @return \\'.$r->getName().PHP_EOL;
148
+			$str .= "\t".' */'.PHP_EOL;
149
+			$str .= "\t".'public function '.$methodName.'('.implode(', ', $args).'):'.$r->getShortName().';'.PHP_EOL.PHP_EOL;
150 150
 		}
151 151
 
152 152
 		$str .= '}'.PHP_EOL;
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,9 +105,9 @@
 block discarded – undo
105 105
 		$interfaceName = $name.'Interface';
106 106
 
107 107
 		$str = '<?php'.PHP_EOL.PHP_EOL
108
-		       .'namespace '.__NAMESPACE__.';'.PHP_EOL.PHP_EOL
109
-		       .'use \\'.$returntype.';'.PHP_EOL.PHP_EOL
110
-		       .'interface '.$interfaceName.'{'.PHP_EOL.PHP_EOL;
108
+			   .'namespace '.__NAMESPACE__.';'.PHP_EOL.PHP_EOL
109
+			   .'use \\'.$returntype.';'.PHP_EOL.PHP_EOL
110
+			   .'interface '.$interfaceName.'{'.PHP_EOL.PHP_EOL;
111 111
 
112 112
 		$ep = $this->endpointMap->toArray();
113 113
 		ksort($ep);
Please login to merge, or discard this patch.