original_string: private function writeTable($file, $value, $indentation, $fallback = true)
      {
          if (!\is_array($value) && !$value instanceof \Traversable) {
              throw new UnexpectedTypeException($value, 'array or \Traversable');
          }
  
          if (!$fallback) {
              fwrite($file, ':table(nofallback)');
          }
  
          fwrite($file, "{\n");
  
          foreach ($value as $key => $entry) {
              fwrite($file, str_repeat('    ', $indentation + 1));
  
              // escape colons, otherwise they are interpreted as resource types
              if (false !== strpos($key, ':') || false !== strpos($key, ' ')) {
                  $key = '"'.$key.'"';
              }
  
              fwrite($file, $key);
  
              $this->writeResource($file, $entry, $indentation + 1);
  
              fwrite($file, "\n");
          }
  
          fprintf($file, '%s}', str_repeat('    ', $indentation));
      }
code: private function writeTable($file, $value, $indentation, $fallback = true)
      {
          if (!\is_array($value) && !$value instanceof \Traversable) {
              throw new UnexpectedTypeException($value, 'array or \Traversable');
          }
  
          if (!$fallback) {
              fwrite($file, ':table(nofallback)');
          }
  
          fwrite($file, "{\n");
  
          foreach ($value as $key => $entry) {
              fwrite($file, str_repeat('    ', $indentation + 1));
  
              // escape colons, otherwise they are interpreted as resource types
              if (false !== strpos($key, ':') || false !== strpos($key, ' ')) {
                  $key = '"'.$key.'"';
              }
  
              fwrite($file, $key);
  
              $this->writeResource($file, $entry, $indentation + 1);
  
              fwrite($file, "\n");
          }
  
          fprintf($file, '%s}', str_repeat('    ', $indentation));
      }
code_tokens: private function writeTable ( $ file , $ value , $ indentation , $ fallback = true ) { if ( ! \ is_array ( $ value ) && ! $ value instanceof \ Traversable ) { throw new UnexpectedTypeException ( $ value , 'array or \Traversable' ) ; } if ( ! $ fallback ) { fwrite ( $ file , ':table(nofallback)' ) ; } fwrite ( $ file , "{\n" ) ; foreach ( $ value as $ key => $ entry ) { fwrite ( $ file , str_repeat ( '    ' , $ indentation + 1 ) ) ; // escape colons, otherwise they are interpreted as resource types if ( false !== strpos ( $ key , ':' ) || false !== strpos ( $ key , ' ' ) ) { $ key = '"' . $ key . '"' ; } fwrite ( $ file , $ key ) ; $ this -> writeResource ( $ file , $ entry , $ indentation + 1 ) ; fwrite ( $ file , "\n" ) ; } fprintf ( $ file , '%s}' , str_repeat ( '    ' , $ indentation ) ) ; }
docstring: Writes a "table" node.
  
  @param resource $file        The file handle to write to
  @param iterable $value       The value of the node
  @param int      $indentation The number of levels to indent
  @param bool     $fallback    Whether the table should be merged
  with the fallback locale
  
  @throws UnexpectedTypeException when $value is not an array and not a
  \Traversable instance
docstring_tokens: Writes a table node .