Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove AbstractCriterion::hashCode() (unused)

  • Loading branch information...
commit 827e8d25514d70545eeffd398aa0aed35146268f 1 parent 571d010
Francois Zaninotto fzaninotto authored
30 src/Propel/Runtime/Query/Criterion/AbstractCriterion.php
View
@@ -314,36 +314,6 @@ public function equals($obj)
}
/**
- * Returns a hash code value for the object.
- */
- public function hashCode()
- {
- $h = crc32(serialize($this->value)) ^ crc32($this->comparison);
-
- if (null !== $this->table) {
- $h ^= crc32($this->table);
- }
-
- if (null !== $this->column) {
- $h ^= crc32($this->column);
- }
-
- foreach ($this->clauses as $clause) {
- // TODO: i KNOW there is a php incompatibility with the following line
- // but i don't remember what it is, someone care to look it up and
- // replace it if it doesn't bother us?
- // $clause->appendPsTo($sb='',$params=array());
- $sb = '';
- $params = array();
- $clause->appendPsTo($sb,$params);
- $h ^= crc32(serialize(array($sb,$params)));
- unset ($sb, $params);
- }
-
- return $h;
- }
-
- /**
* Get all tables from nested criterion objects
* @return array
*/
31 src/Propel/Runtime/Query/Criterion/AbstractModelCriterion.php
View
@@ -88,35 +88,4 @@ public function equals($obj)
return $isEquiv;
}
-
- /**
- * Returns a hash code value for the object.
- */
- public function hashCode()
- {
- $h = crc32(serialize($this->value)) ^ crc32($this->comparison) ^ crc32($this->clause);
-
- if (null !== $this->table) {
- $h ^= crc32($this->table);
- }
-
- if (null !== $this->column) {
- $h ^= crc32($this->column);
- }
-
- foreach ($this->clauses as $clause) {
- // TODO: i KNOW there is a php incompatibility with the following line
- // but i don't remember what it is, someone care to look it up and
- // replace it if it doesn't bother us?
- // $clause->appendPsTo($sb='',$params=array());
- $sb = '';
- $params = array();
- $clause->appendPsTo($sb,$params);
- $h ^= crc32(serialize(array($sb,$params)));
- unset($sb, $params);
- }
-
- return $h;
- }
-
}
3  tests/Propel/Tests/Runtime/Query/CriteriaCombineTest.php
View
@@ -141,9 +141,6 @@ public function testNestedCriterion()
$this->assertEquals($crit3->getTable(), $tables[1]);
$this->assertEquals($crit4->getTable(), $tables[2]);
$this->assertEquals($crit5->getTable(), $tables[3]);
-
- // simple confirmations that equality operations work
- $this->assertTrue($crit2->hashCode() === $crit2->hashCode());
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.