Completed
Pull Request — master (#9)
by Arthur
02:12
created
src/WebThumbnailer/Utils/UrlUtils.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public static function getDomain($url)
22 22
     {
23
-        if (! parse_url($url, PHP_URL_SCHEME)) {
24
-            $url = 'http://' . $url;
23
+        if (!parse_url($url, PHP_URL_SCHEME)) {
24
+            $url = 'http://'.$url;
25 25
         }
26 26
         return strtolower(parse_url($url, PHP_URL_HOST));
27 27
     }
@@ -41,12 +41,12 @@  discard block
 block discarded – undo
41 41
     public static function generateRelativeUrlFromPath($server, $path)
42 42
     {
43 43
         if (isset($server['DOCUMENT_ROOT'])) {
44
-            $root = ! empty($server['DOCUMENT_ROOT']) ? rtrim($server['DOCUMENT_ROOT'], '/') .'/' : '';
44
+            $root = !empty($server['DOCUMENT_ROOT']) ? rtrim($server['DOCUMENT_ROOT'], '/').'/' : '';
45 45
             $path = substr($path, strlen($root));
46 46
         }
47 47
 
48 48
         if (isset($server['SCRIPT_NAME']) && preg_match('#(.*/)\w+\.php$#', $server['SCRIPT_NAME'], $matches) > 0) {
49
-            $path = substr($path, strlen($matches[1]));;
49
+            $path = substr($path, strlen($matches[1])); ;
50 50
         }
51 51
 
52 52
         return $path;
Please login to merge, or discard this patch.