original_string: protected function validateRenderer()
      {
          if ($this->renderer === null) {
              $settingsInstance = $this->getSettingsInstance();
  
              if ($this->type === static::TYPE_EXCEL) {
                  $writerClasses = $settingsInstance->getDefaultExcelWriterClasses();
                  $rendererClass = $settingsInstance->getDefaultExcelRendererClass();
              } elseif ($this->type === static::TYPE_PDF) {
                  $writerClasses = $settingsInstance->getDefaultPDFWriterClasses();
                  $rendererClass = $settingsInstance->getDefaultPDFRendererClass();
              } else {
                  $writerClasses = $settingsInstance->getDefaultWriterClasses();
                  $rendererClass = $settingsInstance->getDefaultRendererClass();
              }
  
              $writerInstances = [];
              foreach ($writerClasses as $writerClass) {
                  $writerInstances[] = new $writerClass();
              }
  
              $this->renderer = new $rendererClass($writerInstances);
          }
      }
code: protected function validateRenderer()
      {
          if ($this->renderer === null) {
              $settingsInstance = $this->getSettingsInstance();
  
              if ($this->type === static::TYPE_EXCEL) {
                  $writerClasses = $settingsInstance->getDefaultExcelWriterClasses();
                  $rendererClass = $settingsInstance->getDefaultExcelRendererClass();
              } elseif ($this->type === static::TYPE_PDF) {
                  $writerClasses = $settingsInstance->getDefaultPDFWriterClasses();
                  $rendererClass = $settingsInstance->getDefaultPDFRendererClass();
              } else {
                  $writerClasses = $settingsInstance->getDefaultWriterClasses();
                  $rendererClass = $settingsInstance->getDefaultRendererClass();
              }
  
              $writerInstances = [];
              foreach ($writerClasses as $writerClass) {
                  $writerInstances[] = new $writerClass();
              }
  
              $this->renderer = new $rendererClass($writerInstances);
          }
      }
code_tokens: protected function validateRenderer ( ) { if ( $ this -> renderer === null ) { $ settingsInstance = $ this -> getSettingsInstance ( ) ; if ( $ this -> type === static :: TYPE_EXCEL ) { $ writerClasses = $ settingsInstance -> getDefaultExcelWriterClasses ( ) ; $ rendererClass = $ settingsInstance -> getDefaultExcelRendererClass ( ) ; } elseif ( $ this -> type === static :: TYPE_PDF ) { $ writerClasses = $ settingsInstance -> getDefaultPDFWriterClasses ( ) ; $ rendererClass = $ settingsInstance -> getDefaultPDFRendererClass ( ) ; } else { $ writerClasses = $ settingsInstance -> getDefaultWriterClasses ( ) ; $ rendererClass = $ settingsInstance -> getDefaultRendererClass ( ) ; } $ writerInstances = [ ] ; foreach ( $ writerClasses as $ writerClass ) { $ writerInstances [ ] = new $ writerClass ( ) ; } $ this -> renderer = new $ rendererClass ( $ writerInstances ) ; } }
docstring: Construct a renderer from setting defaults, if none has been provided.
  
  @return void
docstring_tokens: Construct a renderer from setting defaults if none has been provided .