original_string: protected function unlock(string $key)
      {
          if (!isset($this->locks[$key])) {
              throw new InvalidArgumentError('No lock was set on the given key.');
          }
  
          $awaitable = $this->locks[$key];
          unset($this->locks[$key]);
          $awaitable->resolve();
      }
code: protected function unlock(string $key)
      {
          if (!isset($this->locks[$key])) {
              throw new InvalidArgumentError('No lock was set on the given key.');
          }
  
          $awaitable = $this->locks[$key];
          unset($this->locks[$key]);
          $awaitable->resolve();
      }
code_tokens: protected function unlock ( string $ key ) { if ( ! isset ( $ this -> locks [ $ key ] ) ) { throw new InvalidArgumentError ( 'No lock was set on the given key.' ) ; } $ awaitable = $ this -> locks [ $ key ] ; unset ( $ this -> locks [ $ key ] ) ; $ awaitable -> resolve ( ) ; }
docstring: Unlocks the given key. Throws if the key was not locked.
  
  @param string $key
  
  @throws \Icicle\Exception\InvalidArgumentError
docstring_tokens: Unlocks the given key . Throws if the key was not locked .