Пример #1
0
 /**
  * Get hash code
  *
  * @return string Hash code
  */
 public function getHashCode()
 {
     $hashElements = '';
     foreach ($this->richTextParagraphs as $element) {
         $hashElements .= $element->getHashCode();
     }
     return md5($hashElements . $this->fill->getHashCode() . $this->borders->getHashCode() . $this->width . __CLASS__);
 }
Пример #2
0
 /**
  * Test get/set hash code
  */
 public function testGetHashCode()
 {
     $object = new Borders();
     $this->assertEquals(md5($object->getLeft()->getHashCode() . $object->getRight()->getHashCode() . $object->getTop()->getHashCode() . $object->getBottom()->getHashCode() . $object->getDiagonalUp()->getHashCode() . $object->getDiagonalDown()->getHashCode() . get_class($object)), $object->getHashCode());
 }