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

Commit e1d057c

Browse files
authored
Merge pull request #12 from grayloon/analysis-Yj0Rdv
Apply fixes from StyleCI
2 parents 6d0d95f + b9b6b3e commit e1d057c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/Jobs/DownloadMagentoProductImage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct($uri, $directory = null)
4343
{
4444
$this->uri = $uri;
4545
$this->directory = $this->directory ?: '/pub/media/catalog/product';
46-
$this->fullUrl = config('magento.base_url') . $this->directory . $this->uri;
46+
$this->fullUrl = config('magento.base_url').$this->directory.$this->uri;
4747
}
4848

4949
/**
@@ -55,7 +55,7 @@ public function handle()
5555
{
5656
$contents = file_get_contents($this->fullUrl);
5757
$name = substr($this->fullUrl, strrpos($this->fullUrl, '/') + 1);
58-
58+
5959
Storage::put('product/'.$name, $contents);
6060
}
6161
}

src/Support/MagentoProducts.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ protected function syncCustomAttributes($attributes, $product)
106106
if ($attribute['attribute_code'] === 'category_ids') {
107107
$this->syncProductCategories($attribute['value'], $product);
108108
}
109-
109+
110110
if ($this->isImageType($attribute['attribute_code'])) {
111111
$this->downloadImage($attribute['value']);
112112
}
@@ -127,7 +127,7 @@ protected function syncCustomAttributes($attributes, $product)
127127
* Determine if the Custom Attribute type is an image.
128128
*
129129
* @param string $attribute_type
130-
* @return boolean
130+
* @return bool
131131
*/
132132
protected function isImageType($attribute_type)
133133
{
@@ -137,7 +137,7 @@ protected function isImageType($attribute_type)
137137
'small_image',
138138
];
139139

140-
return ((in_array($attribute_type, $types)));
140+
return in_array($attribute_type, $types);
141141
}
142142

143143
/**

tests/Support/MagentoProductsTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function test_magento_product_adds_associated_category()
7171
public function test_magento_product_launches_job_to_download_product_image()
7272
{
7373
Queue::fake();
74-
74+
7575
factory(MagentoCategory::class)->create();
7676

7777
$products = [
@@ -108,7 +108,7 @@ public function test_magento_product_launches_job_to_download_product_image()
108108
public function test_magento_product_does_not_job_on_invalid_image_download()
109109
{
110110
Queue::fake();
111-
111+
112112
factory(MagentoCategory::class)->create();
113113

114114
$products = [
@@ -145,7 +145,7 @@ public function test_magento_product_does_not_job_on_invalid_image_download()
145145
public function test_magento_product_download_image_is_correctly_constructed()
146146
{
147147
Queue::fake();
148-
148+
149149
factory(MagentoCategory::class)->create();
150150

151151
$products = [

0 commit comments

Comments
 (0)