Merge pull request #6491 from dseguy/refactor_counts
refactored conditions with simpler terms
This commit is contained in:
commit
0653cdfa11
|
|
@ -329,7 +329,7 @@ class ProductController extends Controller
|
|||
return redirect()->back();
|
||||
}
|
||||
|
||||
if (! $data['massaction-type'] == 'update') {
|
||||
if ($data['massaction-type'] !== 'update') {
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class ReviewController extends Controller
|
|||
return redirect()->back();
|
||||
}
|
||||
|
||||
if (! $data['massaction-type'] == 'update') {
|
||||
if ($data['massaction-type'] !== 'update') {
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ class ProductFlatRepository extends Repository
|
|||
$filterAttributes = $this->getProductsRelatedFilterableAttributes($category);
|
||||
}
|
||||
|
||||
if (! count($filterAttributes) > 0) {
|
||||
if (empty($filterAttributes)) {
|
||||
$filterAttributes = $this->attributeRepository->getFilterAttributes();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class ProductController extends Controller
|
|||
$filterAttributes = $this->productFlatRepository->getFilterAttributes($category);
|
||||
}
|
||||
|
||||
if (! count($filterAttributes) > 0) {
|
||||
if (empty($filterAttributes)) {
|
||||
$filterAttributes = $attributeRepository->getFilterAttributes();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ class Helper extends Review
|
|||
|
||||
$priceHTML = view('shop::products.price', ['product' => $product])->render();
|
||||
|
||||
$isProductNew = ($product->new && ! strpos($priceHTML, 'sticker sale') > 0) ? __('shop::app.products.new') : false;
|
||||
$isProductNew = ($product->new && strpos($priceHTML, 'sticker sale') === false) ? __('shop::app.products.new') : false;
|
||||
|
||||
return [
|
||||
'priceHTML' => $priceHTML,
|
||||
|
|
|
|||
Loading…
Reference in New Issue