code: public function setTempDirectory($dir)
      {
          $dir = rtrim($dir, ' \\/');
          if (!is_dir($dir) || !is_readable($dir)) {
              throw new InvalidArgumentException('Invalid cache directory: "'.$dir.'"');
          }
          $this->tempDirectory = $dir;
          return $this;
      }
docs: Set the cache directory of the project being mutated
  
  @param string $dir