code: public function isLocked()
      {
          if (!$this->lockFile->exists()) {
              return false;
          }
  
          $data = $this->getLockData();
  
          return isset($data['packages']);
      }
docs: Checks whether locker has been locked (lockfile found).
  
  @return bool