Completed
Push — master ( f72deb...78ed9f )
by Derek
04:03
created
spec/Anshar/Http/RequestSpec.php 3 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 
3 3
 namespace spec\Subreality\Dilmun\Anshar\Http;
4 4
 
5
+use PhpSpec\ObjectBehavior;
5 6
 use Psr\Http\Message\StreamInterface;
6 7
 use Psr\Http\Message\UriInterface;
7 8
 use Subreality\Dilmun\Anshar\Http\Request;
8
-use PhpSpec\ObjectBehavior;
9 9
 
10 10
 /**
11 11
  * Class RequestSpec
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -455,7 +455,7 @@
 block discarded – undo
455 455
      * @param \PhpSpec\Wrapper\Collaborator|StreamInterface $new_body
456 456
      */
457 457
     function it_retains_its_body_when_returning_a_new_request_with_a_body(StreamInterface $old_body,
458
-                                                                          StreamInterface $new_body)
458
+                                                                            StreamInterface $new_body)
459 459
     {
460 460
         $old_body->getContents()->willReturn("I'm the original stream!");
461 461
         $new_body->getContents()->willReturn("I'm the new stream!");
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
 
703 703
         $uri->getHost()->willReturn($host);
704 704
 
705
-        $empty_host = $this->withHeader("host","");
705
+        $empty_host = $this->withHeader("host", "");
706 706
 
707 707
         $request = $empty_host->withUri($uri, true);
708 708
 
@@ -723,7 +723,7 @@  discard block
 block discarded – undo
723 723
     {
724 724
         $uri->getHost()->willReturn(null);
725 725
 
726
-        $empty_host = $this->withHeader("host","");
726
+        $empty_host = $this->withHeader("host", "");
727 727
 
728 728
         $request = $empty_host->withUri($uri);
729 729
 
Please login to merge, or discard this patch.
spec/Anshar/Http/UriSpec.php 1 patch
Unused Use Statements   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,9 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 namespace spec\Subreality\Dilmun\Anshar\Http;
3 3
 
4
-use Subreality\Dilmun\Anshar\Http\Uri;
5 4
 use PhpSpec\ObjectBehavior;
6
-use Prophecy\Argument;
5
+use Subreality\Dilmun\Anshar\Http\Uri;
7 6
 
8 7
 class UriSpec extends ObjectBehavior
9 8
 {
Please login to merge, or discard this patch.
src/Anshar/Http/Request.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@
 block discarded – undo
106 106
      * Checks if a header exists by the given case-insensitive name.
107 107
      *
108 108
      * @param string $name Case-insensitive header field name.
109
-     * @return bool Returns true if any header names match the given header
109
+     * @return boolean|null Returns true if any header names match the given header
110 110
      *     name using a case-insensitive string comparison. Returns false if
111 111
      *     no matching header name is found in the message.
112 112
      */
Please login to merge, or discard this patch.
src/Anshar/Http/Uri.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -397,6 +397,9 @@
 block discarded – undo
397 397
         // TODO: Implement __toString() method.
398 398
     }
399 399
 
400
+    /**
401
+     * @param string $uri
402
+     */
400 403
     private function explodeUri($uri)
401 404
     {
402 405
         echo $uri . "\n";
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -399,24 +399,24 @@  discard block
 block discarded – undo
399 399
 
400 400
     private function explodeUri($uri)
401 401
     {
402
-        echo $uri . "\n";
402
+        echo $uri."\n";
403 403
 
404 404
         $uri_parts = array();
405 405
 
406 406
         $reg_start              = '/^';
407
-        $scheme_part            = '(.+?)';  //Adding '?' makes it lazy since a URI may contain several colons
407
+        $scheme_part            = '(.+?)'; //Adding '?' makes it lazy since a URI may contain several colons
408 408
         $scheme_separator       = ':';
409 409
         $hier_part              = '(.+)';
410 410
         $query_part             = '\?';
411 411
         $query_separator        = '#';
412 412
         $reg_end                = '/';
413 413
 
414
-        $uri_syntax =   $reg_start .
415
-                        $scheme_part .
416
-                        $scheme_separator .
414
+        $uri_syntax = $reg_start.
415
+                        $scheme_part.
416
+                        $scheme_separator.
417 417
                         $reg_end;
418 418
 
419
-        echo $uri_syntax . "\n";
419
+        echo $uri_syntax."\n";
420 420
 
421 421
         $uri_valid = preg_match($uri_syntax, $uri, $parts);
422 422
 
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
             $uri_parts["scheme"] = "";
427 427
         }
428 428
 
429
-        echo $uri_parts["scheme"] . "\n";
429
+        echo $uri_parts["scheme"]."\n";
430 430
 
431 431
         return $uri_parts;
432 432
     }
Please login to merge, or discard this patch.