Spaces Added

This commit is contained in:
Devansh 2021-10-26 13:00:32 +05:30
parent 510840bf8b
commit 7a1ef2bb85
1 changed files with 7 additions and 7 deletions

View File

@ -102,18 +102,18 @@ class ProductFlatRepository extends Repository
$attributeKeys = array_keys($attribute->toArray());
foreach ($attributeKeys as $key) {
if (!is_null($attribute[$key])) {
if ($key == 'integer_value' && !in_array($attribute[$key], $attributeInfo['attributeOptions'])) {
if (! is_null($attribute[$key])) {
if ($key == 'integer_value' && ! in_array($attribute[$key], $attributeInfo['attributeOptions'])) {
array_push($attributeInfo['attributeOptions'], $attribute[$key]);
} else if ($key == 'text_value' && !in_array($attribute[$key], $attributeInfo['attributeOptions'])) {
} else if ($key == 'text_value' && ! in_array($attribute[$key], $attributeInfo['attributeOptions'])) {
$multiSelectArrributes = explode(",", $attribute[$key]);
foreach ($multiSelectArrributes as $multi) {
if (!in_array($multi, $attributeInfo['attributeOptions'])) {
if (! in_array($multi, $attributeInfo['attributeOptions'])) {
array_push($attributeInfo['attributeOptions'], $multi);
}
}
} else if (($key == 'attribute_id' || $key == 'attributeId') && !in_array($attribute[$key], $attributeInfo['attributes'])) {
} else if (($key == 'attribute_id' || $key == 'attributeId') && ! in_array($attribute[$key], $attributeInfo['attributes'])) {
array_push($attributeInfo['attributes'], $attribute[$key]);
}
}
@ -169,7 +169,7 @@ class ProductFlatRepository extends Repository
{
static $loadedCategoryMaxPrice = [];
if (!$category) {
if (! $category) {
return $this->model->max('max_price');
}
@ -197,7 +197,7 @@ class ProductFlatRepository extends Repository
$filterAttributes = $this->getProductsRelatedFilterableAttributes($category);
}
if (!count($filterAttributes) > 0) {
if (! count($filterAttributes) > 0) {
$filterAttributes = $this->attributeRepository->getFilterAttributes();
}