original_string: public function getDisk()
      {
          if ($this->disk_instance === null) {
              // Create disk class
              $class = "\\Torann\\MediaSort\\Disks\\" . ucfirst($this->config('disk'));
  
              // Verify disk
              if (class_exists($class) === false) {
                  throw new InvalidClassException("Disk type \"{$class}\" not found.");
              }
  
              // Create disk instance
              $this->disk_instance = Container::getInstance()->makeWith($class, ['media' => $this]);
          }
  
          return $this->disk_instance;
      }
code: public function getDisk()
      {
          if ($this->disk_instance === null) {
              // Create disk class
              $class = "\\Torann\\MediaSort\\Disks\\" . ucfirst($this->config('disk'));
  
              // Verify disk
              if (class_exists($class) === false) {
                  throw new InvalidClassException("Disk type \"{$class}\" not found.");
              }
  
              // Create disk instance
              $this->disk_instance = Container::getInstance()->makeWith($class, ['media' => $this]);
          }
  
          return $this->disk_instance;
      }
code_tokens: public function getDisk ( ) { if ( $ this -> disk_instance === null ) { // Create disk class $ class = "\\Torann\\MediaSort\\Disks\\" . ucfirst ( $ this -> config ( 'disk' ) ) ; // Verify disk if ( class_exists ( $ class ) === false ) { throw new InvalidClassException ( "Disk type \"{$class}\" not found." ) ; } // Create disk instance $ this -> disk_instance = Container :: getInstance ( ) -> makeWith ( $ class , [ 'media' => $ this ] ) ; } return $ this -> disk_instance ; }
docstring: Get disk instance.
  
  @return \Torann\MediaSort\Disks\AbstractDisk
  @throws \Torann\MediaSort\Exceptions\InvalidClassException
docstring_tokens: Get disk instance .