Fixing style errors.

This commit is contained in:
stickler-ci 2020-08-08 20:58:51 +00:00
parent 9b00a1f61a
commit d7a65a540e
3 changed files with 225 additions and 225 deletions

File diff suppressed because it is too large Load Diff

View File

@ -143,7 +143,7 @@ class ProductAttribute extends CommonObject
} }
// End call triggers // End call triggers
} }
//Ref must be uppercase //Ref must be uppercase
$this->ref = strtoupper($this->ref); $this->ref = strtoupper($this->ref);
@ -178,7 +178,7 @@ class ProductAttribute extends CommonObject
} }
// End call triggers // End call triggers
} }
//Ref must be uppercase //Ref must be uppercase
$this->ref = trim(strtoupper($this->ref)); $this->ref = trim(strtoupper($this->ref));
$this->label = trim($this->label); $this->label = trim($this->label);
@ -209,7 +209,7 @@ class ProductAttribute extends CommonObject
} }
// End call triggers // End call triggers
} }
$sql = "DELETE FROM ".MAIN_DB_PREFIX."product_attribute WHERE rowid = ".(int) $this->id; $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_attribute WHERE rowid = ".(int) $this->id;
if ($this->db->query($sql)) { if ($this->db->query($sql)) {

View File

@ -175,7 +175,7 @@ class ProductAttributeValue extends CommonObject
} }
// End call triggers // End call triggers
} }
return 1; return 1;
} }
@ -199,7 +199,7 @@ class ProductAttributeValue extends CommonObject
} }
// End call triggers // End call triggers
} }
//Ref must be uppercase //Ref must be uppercase
$this->ref = trim(strtoupper($this->ref)); $this->ref = trim(strtoupper($this->ref));
$this->value = trim($this->value); $this->value = trim($this->value);
@ -224,7 +224,7 @@ class ProductAttributeValue extends CommonObject
*/ */
public function delete(User $user, $notrigger = 0) public function delete(User $user, $notrigger = 0)
{ {
if (empty($notrigger)) { if (empty($notrigger)) {
// Call trigger // Call trigger
$result = $this->call_trigger('PRODUCT_ATTRIBUTE_VALUE_DELETE', $user); $result = $this->call_trigger('PRODUCT_ATTRIBUTE_VALUE_DELETE', $user);
@ -237,7 +237,7 @@ class ProductAttributeValue extends CommonObject
if ($this->db->query($sql)) { if ($this->db->query($sql)) {
return 1; return 1;
} }
return -1; return -1;
} }
@ -251,17 +251,17 @@ class ProductAttributeValue extends CommonObject
public function deleteByFkAttribute($fk_attribute, User $user) public function deleteByFkAttribute($fk_attribute, User $user)
{ {
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product_attribute_value WHERE fk_product_attribute = ".(int) $fk_attribute; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product_attribute_value WHERE fk_product_attribute = ".(int) $fk_attribute;
$query = $this->db->query($sql); $query = $this->db->query($sql);
if (!$query) { if (!$query) {
return -1; return -1;
} }
if (!$this->db->num_rows($query)) { if (!$this->db->num_rows($query)) {
return 1; return 1;
} }
while ($obj = $this->db->fetch_object($query)) { while ($obj = $this->db->fetch_object($query)) {
$tmp = new ProductAttributeValue($this->db); $tmp = new ProductAttributeValue($this->db);
if ($tmp->fetch($obj->rowid) > 0) { if ($tmp->fetch($obj->rowid) > 0) {
@ -273,7 +273,7 @@ class ProductAttributeValue extends CommonObject
return -1; return -1;
} }
} }
return 1; return 1;
} }
} }