Completed
Push — master ( 0d7fa9...b2be26 )
by Julián
02:20
created
src/Transport/TransportAware.php 3 patches
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -68,6 +68,8 @@  discard block
 block discarded – undo
68 68
 
69 69
     /**
70 70
      * {@inheritdoc}
71
+     * @param integer $option
72
+     * @param integer $value
71 73
      */
72 74
     public function hasOption($option, $value = null)
73 75
     {
@@ -92,6 +94,7 @@  discard block
 block discarded – undo
92 94
 
93 95
     /**
94 96
      * {@inheritdoc}
97
+     * @param integer $option
95 98
      */
96 99
     public function removeOption($option)
97 100
     {
@@ -107,6 +110,10 @@  discard block
 block discarded – undo
107 110
 
108 111
         $this->options = array_filter(
109 112
             $this->options,
113
+
114
+            /**
115
+             * @param integer $transportOption
116
+             */
110 117
             function ($transportOption) use ($option) {
111 118
                 /** @var \Jgut\Spiral\Option $transportOption */
112 119
                 return !($transportOption->getOption() === $option);
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
- *
5
- * @link https://github.com/juliangut/spiral for the canonical source repository
6
- * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
- */
3
+     * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
+     *
5
+     * @link https://github.com/juliangut/spiral for the canonical source repository
6
+     * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
+     */
8 8
 
9 9
 namespace Jgut\Spiral\Transport;
10 10
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 
108 108
         $this->options = array_filter(
109 109
             $this->options,
110
-            function ($transportOption) use ($option) {
110
+            function($transportOption) use ($option) {
111 111
                 /** @var \Jgut\Spiral\Option $transportOption */
112 112
                 return !($transportOption->getOption() === $option);
113 113
             }
Please login to merge, or discard this patch.
src/Exception/OptionException.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
- *
5
- * @link https://github.com/juliangut/spiral for the canonical source repository
6
- * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
- */
3
+     * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
+     *
5
+     * @link https://github.com/juliangut/spiral for the canonical source repository
6
+     * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
+     */
8 8
 
9 9
 namespace Jgut\Spiral\Transport;
10 10
 
Please login to merge, or discard this patch.
src/Option/OptionFactory.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
- *
5
- * @link https://github.com/juliangut/spiral for the canonical source repository
6
- * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
- */
3
+     * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
+     *
5
+     * @link https://github.com/juliangut/spiral for the canonical source repository
6
+     * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
+     */
8 8
 
9 9
 namespace Jgut\Spiral\Transport;
10 10
 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
      * Build cURL option.
184 184
      *
185 185
      * @param int|string $option
186
-     * @param mixed      $value
186
+     * @param string      $value
187 187
      *
188 188
      * @return \Jgut\Spiral\Option
189 189
      *
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
      * Configure option callback.
266 266
      *
267 267
      * @param \Jgut\Spiral\Option\OptionCallback $optionClass
268
-     * @param                                    $option
268
+     * @param                                    integer $option
269 269
      *
270 270
      * @return \Jgut\Spiral\Option\OptionCallback
271 271
      */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
         $curlConstants = array_filter(
250 250
             get_defined_constants(true)['curl'],
251
-            function ($val, $key) {
251
+            function($val, $key) {
252 252
                 return is_int($val) && strpos($key, 'CURLOPT_') === 0;
253 253
             },
254 254
             ARRAY_FILTER_USE_BOTH
@@ -273,13 +273,13 @@  discard block
 block discarded – undo
273 273
     {
274 274
         switch ($option) {
275 275
             case CURLOPT_HTTPAUTH:
276
-                $optionClass->setCallback(function ($value) {
276
+                $optionClass->setCallback(function($value) {
277 277
                     return $value === false ? false : CURLAUTH_BASIC;
278 278
                 });
279 279
                 break;
280 280
 
281 281
             case CURLOPT_HTTP_VERSION:
282
-                $optionClass->setCallback(function ($value) {
282
+                $optionClass->setCallback(function($value) {
283 283
                     $value = number_format((float) $value, 1, '.', '');
284 284
 
285 285
                     if (!preg_match('/^1.(0|1)$/', $value)) {
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
                 break;
292 292
 
293 293
             case CURLOPT_COOKIE:
294
-                $optionClass->setCallback(function ($value) {
294
+                $optionClass->setCallback(function($value) {
295 295
                     if (is_array($value)) {
296 296
                         $value = http_build_query($value, '', '; ');
297 297
                     }
Please login to merge, or discard this patch.
src/Option/OptionFile.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
- *
5
- * @link https://github.com/juliangut/spiral for the canonical source repository
6
- * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
- */
3
+     * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
+     *
5
+     * @link https://github.com/juliangut/spiral for the canonical source repository
6
+     * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
+     */
8 8
 
9 9
 namespace Jgut\Spiral\Transport;
10 10
 
Please login to merge, or discard this patch.
src/Option/OptionRegex.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
- *
5
- * @link https://github.com/juliangut/spiral for the canonical source repository
6
- * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
- */
3
+     * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
+     *
5
+     * @link https://github.com/juliangut/spiral for the canonical source repository
6
+     * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
+     */
8 8
 
9 9
 namespace Jgut\Spiral\Transport;
10 10
 
Please login to merge, or discard this patch.
src/Option/OptionString.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
- *
5
- * @link https://github.com/juliangut/spiral for the canonical source repository
6
- * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
- */
3
+     * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
+     *
5
+     * @link https://github.com/juliangut/spiral for the canonical source repository
6
+     * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
+     */
8 8
 
9 9
 namespace Jgut\Spiral\Transport;
10 10
 
Please login to merge, or discard this patch.
src/Transport.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
- *
5
- * @link https://github.com/juliangut/spiral for the canonical source repository
6
- * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
- */
3
+     * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
+     *
5
+     * @link https://github.com/juliangut/spiral for the canonical source repository
6
+     * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
+     */
8 8
 
9 9
 namespace Jgut\Spiral\Transport;
10 10
 
Please login to merge, or discard this patch.
src/Transport/Curl.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
- *
5
- * @link https://github.com/juliangut/spiral for the canonical source repository
6
- * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
- */
3
+     * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
+     *
5
+     * @link https://github.com/juliangut/spiral for the canonical source repository
6
+     * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
+     */
8 8
 
9 9
 namespace Jgut\Spiral\Transport;
10 10
 
Please login to merge, or discard this patch.
src/Option/Option.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
- *
5
- * @link https://github.com/juliangut/spiral for the canonical source repository
6
- * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
- */
3
+     * Spiral: PSR7 aware cURL client (https://github.com/juliangut/spiral)
4
+     *
5
+     * @link https://github.com/juliangut/spiral for the canonical source repository
6
+     * @license https://raw.githubusercontent.com/juliangut/spiral/master/LICENSE
7
+     */
8 8
 
9 9
 namespace Jgut\Spiral\Transport;
10 10
 
Please login to merge, or discard this patch.