Skip to content
Code-Schnipsel Gruppen Projekte
Commit 4910ce75 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

refactor(phpstan): simplify boolean condition in autoloadafter attribute

Changed the boolean condition to check for false on `autoloadAfter` attribute. Instead of checking
equality with false, the code now uses a not operator which makes it easier to read and follow.
This change has been applied to both `ProductList.php` and `ManufacturerList.php` files.
Übergeordneter bb40fb1a
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
2 Merge Requests!106Update 'next-3.x' with latest changes from 'main',!105fix: products -> get child frontend cache
Pipeline-Nr. 14849 bestanden
......@@ -144,7 +144,7 @@ public function getBody(): string
}
// global settings: product autoload after x clicks
if ($this->getAttribute('autoloadAfter') == '' || $this->getAttribute('autoloadAfter') === false) {
if ($this->getAttribute('autoloadAfter') == '' || !$this->getAttribute('autoloadAfter')) {
$this->setAttribute('autoloadAfter', $Config->get('products', 'autoloadAfter'));
}
......
......@@ -49,7 +49,7 @@ public function getBody(): string
$Config = QUI::getPackage('quiqqer/products')->getConfig();
// global settings: product autoload after x clicks
if ($this->getAttribute('autoloadAfter') == '' || $this->getAttribute('autoloadAfter') === false) {
if ($this->getAttribute('autoloadAfter') == '' || !$this->getAttribute('autoloadAfter')) {
// @todo get setting from site
$this->setAttribute('autoloadAfter', $Config->get('products', 'autoloadAfter'));
}
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren