for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace drupol\valuewrapper\Object;
use drupol\valuewrapper\AbstractValue;
use drupol\valuewrapper\Hashable;
/**
* Class ObjectValue
*/
class ObjectValue extends AbstractValue
{
* {@inheritdoc}
public function hash(): string
if ($this->value instanceof Hashable) {
return $this->doHash(gettype($this->value) . get_class($this->value) . $this->value->hash());
}
return $this->doHash(gettype($this->value) . get_class($this->value) . \spl_object_hash($this->value));
protected function doHash(string $string) : string
return \sha1($string);