Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit fc108dc

Browse files
authored
Merge pull request #15 from grayloon/analysis-aj4oA0
Apply fixes from StyleCI
2 parents 6afce6e + 6595fec commit fc108dc

File tree

5 files changed

+18
-21
lines changed

5 files changed

+18
-21
lines changed

src/Api/ProductAttributes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ class ProductAttributes extends AbstractApi
1212
*/
1313
public function show($attribute)
1414
{
15-
return $this->get('/products/attributes/'. $attribute);
15+
return $this->get('/products/attributes/'.$attribute);
1616
}
1717
}

src/Support/MagentoProducts.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ protected function syncCustomAttributes($attributes, $product)
108108
$type = $this->resolveCustomAttributeType($attribute['attribute_code']);
109109
$value = $this->resolveCustomAttributeValue($type, $attribute['value']);
110110

111-
112111
$product
113112
->customAttributes()
114113
->updateOrCreate(['attribute_type_id' => $type->id], [

tests/Support/MagentoCategoriesTest.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,21 +121,21 @@ public function test_can_apply_new_custom_attribute_type_to_category()
121121
return Http::response([
122122
'options' => [
123123
[
124-
"label" => 'New York',
124+
'label' => 'New York',
125125
'value' => '1',
126126
],
127127
[
128128
'label' => 'Los Angeles',
129129
'value' => '2',
130-
]
130+
],
131131
],
132132
'default_frontend_label' => 'Warehouse',
133133
], 200);
134134
});
135135

136136
factory(MagentoCustomAttributeType::class)->create(['name' => 'path']);
137137
factory(MagentoCustomAttributeType::class)->create(['name' => 'children_count']);
138-
138+
139139
$categories = [
140140
[
141141
'id' => '1',
@@ -167,7 +167,6 @@ public function test_can_apply_new_custom_attribute_type_to_category()
167167
],
168168
];
169169

170-
171170
(new MagentoCategories())->updateCategories($categories);
172171

173172
$category = MagentoCategory::first();
@@ -182,21 +181,21 @@ public function test_can_apply_raw_value_attribute_if_unknown_type_option_in_cat
182181
return Http::response([
183182
'options' => [
184183
[
185-
"label" => 'New York',
184+
'label' => 'New York',
186185
'value' => '1',
187186
],
188187
[
189188
'label' => 'Los Angeles',
190189
'value' => '2',
191-
]
190+
],
192191
],
193192
'default_frontend_label' => 'Warehouse',
194193
], 200);
195194
});
196195

197196
factory(MagentoCustomAttributeType::class)->create(['name' => 'path']);
198197
factory(MagentoCustomAttributeType::class)->create(['name' => 'children_count']);
199-
198+
200199
$categories = [
201200
[
202201
'id' => '1',
@@ -228,7 +227,6 @@ public function test_can_apply_raw_value_attribute_if_unknown_type_option_in_cat
228227
],
229228
];
230229

231-
232230
(new MagentoCategories())->updateCategories($categories);
233231

234232
$category = MagentoCategory::first();

tests/Support/MagentoCustomersTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ public function test_can_apply_new_custom_attribute_type_to_customer()
8989
return Http::response([
9090
'options' => [
9191
[
92-
"label" => 'Yes',
92+
'label' => 'Yes',
9393
'value' => '1',
9494
],
9595
[
9696
'label' => 'No',
9797
'value' => '0',
98-
]
98+
],
9999
],
100100
'default_frontend_label' => 'Rewards Member',
101101
], 200);

tests/Support/MagentoProductsTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ public function test_magento_product_adds_attribute_type()
3535
return Http::response([
3636
'options' => [
3737
[
38-
"label" => 'New York',
38+
'label' => 'New York',
3939
'value' => '1',
4040
],
4141
[
4242
'label' => 'Los Angeles',
4343
'value' => '2',
44-
]
44+
],
4545
],
4646
'default_frontend_label' => 'Warehouse',
4747
], 200);
@@ -67,7 +67,7 @@ public function test_magento_product_adds_attribute_type()
6767
'custom_attributes' => [
6868
[
6969
'attribute_code' => 'warehouse_id',
70-
'value' => "1",
70+
'value' => '1',
7171
],
7272
],
7373
],
@@ -93,13 +93,13 @@ public function test_magento_product_unknown_attribute_type_value_resolves_as_ra
9393
return Http::response([
9494
'options' => [
9595
[
96-
"label" => 'New York',
96+
'label' => 'New York',
9797
'value' => '1',
9898
],
9999
[
100100
'label' => 'Los Angeles',
101101
'value' => '2',
102-
]
102+
],
103103
],
104104
'default_frontend_label' => 'Warehouse',
105105
], 200);
@@ -125,7 +125,7 @@ public function test_magento_product_unknown_attribute_type_value_resolves_as_ra
125125
'custom_attributes' => [
126126
[
127127
'attribute_code' => 'warehouse_id',
128-
'value' => "Unknown",
128+
'value' => 'Unknown',
129129
],
130130
],
131131
],
@@ -147,10 +147,10 @@ public function test_magento_product_existing_attribute_uses_existing_values()
147147
factory(MagentoCategory::class)->create();
148148
$type = factory(MagentoCustomAttributeType::class)->create([
149149
'name' => 'warehouse_id',
150-
'display_name' => "Warehouse",
150+
'display_name' => 'Warehouse',
151151
'options' => [
152152
[
153-
"label" => 'New York',
153+
'label' => 'New York',
154154
'value' => '1',
155155
],
156156
[
@@ -178,7 +178,7 @@ public function test_magento_product_existing_attribute_uses_existing_values()
178178
'custom_attributes' => [
179179
[
180180
'attribute_code' => 'warehouse_id',
181-
'value' => "1",
181+
'value' => '1',
182182
],
183183
],
184184
],

0 commit comments

Comments
 (0)