when inserting identifiers into $this->_valueList : in function
public function addValue($value)
{
array_push($this->_valueList, $value);
}
directly pushing the value of identifier and if the values are already present in the array it makes
execution time much more since it starts fetching same product number of times,
there can be small enhancement to reduce such complexities like below :
we can first check wheather or not values already present in an array before pushing them.
public function addValue($value)
{
if (!in_array($value, $this->_valueList)) {
array_push($this->_valueList, $value);
}
}
when inserting identifiers into $this->_valueList : in function
public function addValue($value) { array_push($this->_valueList, $value); }
directly pushing the value of identifier and if the values are already present in the array it makes execution time much more since it starts fetching same product number of times,
there can be small enhancement to reduce such complexities like below : we can first check wheather or not values already present in an array before pushing them.
public function addValue($value) { if (!in_array($value, $this->_valueList)) { array_push($this->_valueList, $value); } }