original_string: public function setDataDirectory(string $directory)
      {
          if (!is_dir($directory)) {
              $exception = new StorageException(sprintf(StorageException::DIRECTORY_NOT_FOUND, $directory));
              $exception->setDirectory($exception);
              $exception->setProvider(static::class);
              throw $exception;
          }
  
          $this->dataDirectory = $directory;
      }
code: public function setDataDirectory(string $directory)
      {
          if (!is_dir($directory)) {
              $exception = new StorageException(sprintf(StorageException::DIRECTORY_NOT_FOUND, $directory));
              $exception->setDirectory($exception);
              $exception->setProvider(static::class);
              throw $exception;
          }
  
          $this->dataDirectory = $directory;
      }
code_tokens: public function setDataDirectory ( string $ directory ) { if ( ! is_dir ( $ directory ) ) { $ exception = new StorageException ( sprintf ( StorageException :: DIRECTORY_NOT_FOUND , $ directory ) ) ; $ exception -> setDirectory ( $ exception ) ; $ exception -> setProvider ( static :: class ) ; throw $ exception ; } $ this -> dataDirectory = $ directory ; }
docstring: Set data directory
  @param string $directory
  @throws StorageException
docstring_tokens: Set data directory