original_string: public function createLock($resource, $ttl = 300.0, $autoRelease = true)
      {
          $lock = new Lock(new Key($resource), $this->store, $ttl, $autoRelease);
          $lock->setLogger($this->logger);
  
          return $lock;
      }
code: public function createLock($resource, $ttl = 300.0, $autoRelease = true)
      {
          $lock = new Lock(new Key($resource), $this->store, $ttl, $autoRelease);
          $lock->setLogger($this->logger);
  
          return $lock;
      }
code_tokens: public function createLock ( $ resource , $ ttl = 300.0 , $ autoRelease = true ) { $ lock = new Lock ( new Key ( $ resource ) , $ this -> store , $ ttl , $ autoRelease ) ; $ lock -> setLogger ( $ this -> logger ) ; return $ lock ; }
docstring: Creates a lock for the given resource.
  
  @param string     $resource    The resource to lock
  @param float|null $ttl         Maximum expected lock duration in seconds
  @param bool       $autoRelease Whether to automatically release the lock or not when the lock instance is destroyed
  
  @return Lock
docstring_tokens: Creates a lock for the given resource .