Passed
Push — ft/urls ( cdb8a8...010a18 )
by Ben
26:40
created
src/Urls/SaveUrlSlugs.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -59,11 +59,9 @@
 block discarded – undo
59 59
             $nonRedirectsWithSameLocale->each(function($existingRecord){
60 60
                 $existingRecord->delete();
61 61
             });
62
-        }
63
-        elseif($nonRedirectsWithSameLocale->isEmpty()){
62
+        } elseif($nonRedirectsWithSameLocale->isEmpty()){
64 63
             $this->createRecord($locale, $slug);
65
-        }
66
-        else{
64
+        } else{
67 65
             // Only replace the existing records that differ from the current passed slugs
68 66
             $nonRedirectsWithSameLocale->each(function($existingRecord) use($slug){
69 67
                 if($existingRecord->slug != $slug){
Please login to merge, or discard this patch.
src/Urls/UrlSlugFields.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,9 @@
 block discarded – undo
64 64
 
65 65
         foreach ($records as $record) {
66 66
 
67
-            if(!isset($fields['url-slugs.'.$record->locale])) continue;
67
+            if(!isset($fields['url-slugs.'.$record->locale])) {
68
+                continue;
69
+            }
68 70
 
69 71
             $fields['url-slugs.'.$record->locale]
70 72
                 ->setUrlRecord($record)
Please login to merge, or discard this patch.