original_string: private function addItem(
          string $file,
          bool $flatroot = false,
          int $compression = self::CM_DEFAULT,
          int $encryption = self::EM_NONE,
          ?string $base = null
      ): void {
  
          $file = is_null($this->getPath()) ? $file : $this->getPath()."/$file";
          $real_file = str_replace('\\', '/', realpath($file));
          $real_name = basename($real_file);
  
          if (
              $base !== null &&
              (
                  (
                      $real_name[0] == "." &&
                      in_array($this->getSkipMode(), ["HIDDEN", "ALL"])
                  ) ||
                  (
                      $real_name[0] == "." &&
                      @$real_name[1] == "_" &&
                      in_array($this->getSkipMode(), ["COMODOJO", "ALL"])
                  )
              )
          ) {
              return;
          }
  
          if ( is_dir($real_file) ) {
              $this->addDirectoryItem($real_file, $real_name, $compression, $encryption, $base, $flatroot);
          } else {
              $this->addFileItem($real_file, $real_name, $compression, $encryption, $base);
          }
  
      }
code: private function addItem(
          string $file,
          bool $flatroot = false,
          int $compression = self::CM_DEFAULT,
          int $encryption = self::EM_NONE,
          ?string $base = null
      ): void {
  
          $file = is_null($this->getPath()) ? $file : $this->getPath()."/$file";
          $real_file = str_replace('\\', '/', realpath($file));
          $real_name = basename($real_file);
  
          if (
              $base !== null &&
              (
                  (
                      $real_name[0] == "." &&
                      in_array($this->getSkipMode(), ["HIDDEN", "ALL"])
                  ) ||
                  (
                      $real_name[0] == "." &&
                      @$real_name[1] == "_" &&
                      in_array($this->getSkipMode(), ["COMODOJO", "ALL"])
                  )
              )
          ) {
              return;
          }
  
          if ( is_dir($real_file) ) {
              $this->addDirectoryItem($real_file, $real_name, $compression, $encryption, $base, $flatroot);
          } else {
              $this->addFileItem($real_file, $real_name, $compression, $encryption, $base);
          }
  
      }
code_tokens: private function addItem ( string $ file , bool $ flatroot = false , int $ compression = self :: CM_DEFAULT , int $ encryption = self :: EM_NONE , ? string $ base = null ) : void { $ file = is_null ( $ this -> getPath ( ) ) ? $ file : $ this -> getPath ( ) . "/$file" ; $ real_file = str_replace ( '\\' , '/' , realpath ( $ file ) ) ; $ real_name = basename ( $ real_file ) ; if ( $ base !== null && ( ( $ real_name [ 0 ] == "." && in_array ( $ this -> getSkipMode ( ) , [ "HIDDEN" , "ALL" ] ) ) || ( $ real_name [ 0 ] == "." && @ $ real_name [ 1 ] == "_" && in_array ( $ this -> getSkipMode ( ) , [ "COMODOJO" , "ALL" ] ) ) ) ) { return ; } if ( is_dir ( $ real_file ) ) { $ this -> addDirectoryItem ( $ real_file , $ real_name , $ compression , $ encryption , $ base , $ flatroot ) ; } else { $ this -> addFileItem ( $ real_file , $ real_name , $ compression , $ encryption , $ base ) ; } }
docstring: Add item to zip archive
  
  @param string $file File to add (realpath)
  @param bool $flatroot (optional) If true, source directory will be not included
  @param string $base (optional) Base to record in zip file
  @return void
  @throws ZipException
docstring_tokens: Add item to zip archive