Passed
Push — master ( 05dd47...4dec78 )
by Nicolaas
10:48 queued 01:11
created
src/ExternalURLField.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         }
76 76
 
77 77
         if (is_array($this->config[$name])) {
78
-            if (! is_array($val)) {
78
+            if (!is_array($val)) {
79 79
                 user_error("The value for {$name} must be an array");
80 80
             }
81 81
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         $parentAttributes = parent::getAttributes();
112 112
         $attributes = [];
113 113
 
114
-        if (! isset($parentAttributes['placeholder'])) {
114
+        if (!isset($parentAttributes['placeholder'])) {
115 115
             $attributes['placeholder'] = $this->config['defaultparts']['scheme'] . '://example.com'; //example url
116 116
         }
117 117
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     {
155 155
         $this->value = trim(string: (string) $this->value);
156 156
         $regex = $this->config['validregex'];
157
-        if ($this->value && $regex && ! preg_match($regex, $this->value)) {
157
+        if ($this->value && $regex && !preg_match($regex, $this->value)) {
158 158
             $validator->validationError(
159 159
                 $this->name,
160 160
                 _t('ExternalURLField.VALIDATION', 'Please enter a valid URL'),
@@ -189,12 +189,12 @@  discard block
 block discarded – undo
189 189
     protected function rebuildURL($url)
190 190
     {
191 191
         $defaults = $this->config['defaultparts'];
192
-        if (! preg_match('#^[a-zA-Z]+://#', $url)) {
192
+        if (!preg_match('#^[a-zA-Z]+://#', $url)) {
193 193
             $url = $defaults['scheme'] . '://' . $url;
194 194
         }
195 195
 
196 196
         $parts = parse_url($url);
197
-        if (! $parts) {
197
+        if (!$parts) {
198 198
             //can't parse url, abort
199 199
             return '';
200 200
         }
Please login to merge, or discard this patch.