/**
  * {@inheritdoc}
  */
 public function getHash(CommandInterface $command)
 {
     $hash = $command->getHash();
     if (!isset($hash) && isset($this->commands[$cmdID = $command->getId()])) {
         $key = call_user_func($this->commands[$cmdID], $command);
         if (isset($key)) {
             $hash = $this->getKeyHash($key);
             $command->setHash($hash);
         }
     }
     return $hash;
 }
 /**
  * {@inheritdoc}
  */
 public function getHash(CommandInterface $command)
 {
     $hash = $command->getHash();
     if (!isset($hash) && isset($this->commands[$cmdID = $command->getId()])) {
         if (null !== ($key = call_user_func($this->commands[$cmdID], $command))) {
             $hash = $this->hashGenerator->hash($key);
             $command->setHash($hash);
         }
     }
     return $hash;
 }