aboutsummaryrefslogtreecommitdiff
path: root/parser.php
diff options
context:
space:
mode:
authorJean-Michel Vedrine <vedrine@vedrine.org>2018-01-01 19:19:33 +0100
committerJean-Michel Vedrine <vedrine@vedrine.org>2018-01-01 19:19:33 +0100
commitddb061f88f3958ea17701090774d1f582376a348 (patch)
treebb4c02c697acdf64378a2740539e2d73d9e377f7 /parser.php
parent294edec77a967e743631bfe2cde6b8ecc47b980c (diff)
Fix bug in parser equals function
Diffstat (limited to 'parser.php')
-rw-r--r--parser.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/parser.php b/parser.php
index 05440a7..0b08bb7 100644
--- a/parser.php
+++ b/parser.php
@@ -1083,7 +1083,7 @@ class qtype_algebra_parser_special extends qtype_algebra_parser_term {
* constant which is defined by an internal switch based on the constant's name.
*
* @param $params array of values keyed by variable name
- * @return the numerical value of the term given the provided values for the variables
+ * @return int the numerical value of the term given the provided values for the variables
*/
public function evaluate($params) {
if ($this->_sign == '-') {
@@ -1127,7 +1127,7 @@ class qtype_algebra_parser_special extends qtype_algebra_parser_term {
public function equals($expr) {
// Call the default method first to check type.
if (parent::equals($expr)) {
- return $this->_value == $expr->_value and $this->_sign == $this->_sign;
+ return $this->_value == $expr->_value and $this->_sign == $expr->_sign;
} else {
return false;
}
@@ -1280,7 +1280,7 @@ class qtype_algebra_parser_function extends qtype_algebra_parser_term {
public function equals($expr) {
// Call the default method first to check type.
if (parent::equals($expr)) {
- return $this->_value == $expr->_value and $this->_sign == $this->_sign;
+ return $this->_value == $expr->_value and $this->_sign == $expr->_sign;
} else {
return false;
}