src/ObjectIdentifier/AliasedObjectIdentifier.php
public function getIdentity($object)
    {
        if (in_array(get_class($object), $this->aliases)) {
            return $this->getIdentityForAliasedObject($object);
        }

        return $this->identifier->getIdentity($object);
    }
public function getIdentity($object)
    {
        if (in_array(get_class($object), $this->aliases)) {
            return $this->getIdentityForAliasedObject($object);
        }

        return $this->identifier->getIdentity($object);
    }
{@inheritdoc}