Example #1
0
 /**
  * @see EntityDocument::equals
  *
  * @param mixed $target
  *
  * @return bool
  */
 public function equals($target)
 {
     if ($this === $target) {
         return true;
     }
     return $target instanceof self && $this->labels->equals($target->labels) && $this->descriptions->equals($target->descriptions) && $this->statements->equals($target->statements);
 }
Example #2
0
 /**
  * @see Comparable::equals
  *
  * @since 0.7.4
  *
  * @param mixed $target
  *
  * @return bool
  */
 public function equals($target)
 {
     if ($this === $target) {
         return true;
     }
     return $target instanceof self && $this->descriptions->equals($target->getDescriptions()) && $this->labels->equals($target->getLabels()) && $this->aliasGroups->equals($target->getAliasGroups());
 }
Example #3
0
 public function testGivenListsThatOnlyDifferInOrder_equalsReturnsTrue()
 {
     $list = new TermList(array(new Term('en', 'foo'), new Term('de', 'bar')));
     $this->assertTrue($list->equals(new TermList(array(new Term('de', 'bar'), new Term('en', 'foo')))));
 }