Completed
Pull Request — master (#11)
by
unknown
56s
created
models/ReviewImport.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
         'rating' => 'required'
17 17
     ];
18 18
 
19
-    public $categoryNameCache = [];
19
+    public $categoryNameCache = [ ];
20 20
 
21 21
 
22 22
     public function importData($results, $sessionKey = null)
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
                 $reviewExists = $review->exists;
42 42
 
43
-                $except = ['id', 'categories', 'approved', 'created_at'];
43
+                $except = [ 'id', 'categories', 'approved', 'created_at' ];
44 44
 
45 45
                 foreach (array_except($data, $except) as $attribute => $value) {
46 46
                     $review->{$attribute} = $value ?: null;
@@ -73,18 +73,18 @@  discard block
 block discarded – undo
73 73
     {
74 74
         $categoryNames = $this->decodeArrayValue(array_get($data, 'categories'));
75 75
 
76
-        $ids = [];
76
+        $ids = [ ];
77 77
 
78 78
         foreach ($categoryNames as $name) {
79 79
             if (!$name = trim($name)) {
80 80
                 continue;
81 81
             }
82 82
 
83
-            if (isset($this->categoryNameCache[$name])) {
84
-                $ids[] = $this->categoryNameCache[$name];
83
+            if (isset($this->categoryNameCache[ $name ])) {
84
+                $ids[ ] = $this->categoryNameCache[ $name ];
85 85
             } else {
86 86
                 $category = CategoryModel::where('name', $name)->first();
87
-                $ids[] = $this->categoryNameCache[$name] = $category->id;
87
+                $ids[ ] = $this->categoryNameCache[ $name ] = $category->id;
88 88
             }
89 89
         }
90 90
 
Please login to merge, or discard this patch.
models/CategoryImport.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
                     $category->{$attribute} = $value ?: null;
48 48
                 }
49 49
 
50
-                $category->enabled = !!array_get($data,'enabled');
50
+                $category->enabled = !!array_get($data, 'enabled');
51 51
 
52 52
                 $category->forceSave();
53 53
 
Please login to merge, or discard this patch.