Completed
Branch master (294c1a)
by Alex
01:57
created
tests/Psr7UriExtensionTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use PHPUnit_Framework_TestCase;
6 6
 use Psr\Http\Message\UriInterface;
7 7
 use Psr\Http\Message\ServerRequestInterface;
8
-use Twig_ExtensionInterface;
9 8
 use Asmaster\TwigExtension\Psr7UriExtension;
10 9
 
11 10
 class Psr7UriExtensionTest extends PHPUnit_Framework_TestCase
Please login to merge, or discard this patch.
src/Psr7UriExtension.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
         }
45 45
 
46 46
         if (null !== $uri->getPort()) {
47
-            $host .= ':' . $uri->getPort();
47
+            $host .= ':'.$uri->getPort();
48 48
         }
49 49
 
50 50
         if (!$this->hasLeadingSlash($path)) {
51
-            $path = rtrim($uri->getPath(), '/') . '/' . $path;
51
+            $path = rtrim($uri->getPath(), '/').'/'.$path;
52 52
         }
53 53
 
54
-        return $uri->getScheme() . '://' . $host . $path;
54
+        return $uri->getScheme().'://'.$host.$path;
55 55
     }
56 56
 
57 57
     /**
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
             }
84 84
         }
85 85
 
86
-        $path = str_repeat('../', count($baseParts)) . implode('/', $pathParts);
86
+        $path = str_repeat('../', count($baseParts)).implode('/', $pathParts);
87 87
 
88 88
         if (empty($path)) {
89 89
             return './';
90 90
         }
91 91
 
92 92
         if (empty($baseParts) && false !== strpos(current($pathParts), ':')) {
93
-            $path = './' . $path;
93
+            $path = './'.$path;
94 94
         }
95 95
 
96 96
         return $path;
Please login to merge, or discard this patch.