Passed
Push — master ( 61b3ff...44b74f )
by Nicolaas
09:32
created
src/ExternalURL.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -104,17 +104,17 @@
 block discarded – undo
104 104
         $fieldName = $this->name;
105 105
         if ($fieldName) {
106 106
             $url = (string) $this->value;
107
-            if (! $url) {
107
+            if (!$url) {
108 108
                 return '';
109 109
             }
110 110
             $config = Config::inst()->get(ExternalURLField::class, 'default_config');
111 111
             $defaults = $config['defaultparts'];
112
-            if (! preg_match('#^[a-zA-Z]+://#', $url)) {
112
+            if (!preg_match('#^[a-zA-Z]+://#', $url)) {
113 113
                 $url = $defaults['scheme'] . '://' . $url;
114 114
             }
115 115
 
116 116
             $parts = parse_url($url);
117
-            if (! $parts) {
117
+            if (!$parts) {
118 118
                 //can't parse url, abort
119 119
                 return '';
120 120
             }
Please login to merge, or discard this patch.
src/ExternalURLFinder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,12 +22,12 @@
 block discarded – undo
22 22
     public static function find(string $link, string $className, string $field, ?bool $removeFinalSlash = true): DataList
23 23
     {
24 24
         $link = strtolower($link);
25
-        if($removeFinalSlash) {
25
+        if ($removeFinalSlash) {
26 26
             $link = rtrim($link, '/');
27 27
         }
28 28
         $linkObject = DBField::create_field('ExternalURL', $link);
29 29
         $domain = $linkObject->Domain();
30
-        if(strpos($domain, 'www.') === 0) {
30
+        if (strpos($domain, 'www.') === 0) {
31 31
             $domainWWW = $domain;
32 32
             $domainNoWWW = substr($domain, 4);
33 33
         } else {
Please login to merge, or discard this patch.