@@ -16,7 +16,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -47,7 +47,7 @@ |
||
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 |